mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
actually implement the setting of noFastStart and noH245Tunneling.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -100,6 +100,9 @@ static int usingGk;
|
|||||||
static int port = 1720;
|
static int port = 1720;
|
||||||
static int gkroute = 0;
|
static int gkroute = 0;
|
||||||
|
|
||||||
|
static int noFastStart = 1;
|
||||||
|
static int noH245Tunneling = 0;
|
||||||
|
|
||||||
/* to find user by alias is default, alternative is the incomming call's source IP address*/
|
/* to find user by alias is default, alternative is the incomming call's source IP address*/
|
||||||
static int userbyalias = 1;
|
static int userbyalias = 1;
|
||||||
|
|
||||||
@@ -486,6 +489,9 @@ static int oh323_call(struct ast_channel *c, char *dest, int timeout)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p->calloptions.noFastStart = noFastStart;
|
||||||
|
p->calloptions.noH245Tunneling = noH245Tunneling;
|
||||||
|
|
||||||
res = h323_make_call(called_addr, &(p->cd), p->calloptions);
|
res = h323_make_call(called_addr, &(p->cd), p->calloptions);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
@@ -1141,6 +1147,7 @@ int setup_incoming_call(call_details_t cd)
|
|||||||
strncpy(p->accountcode, user->accountcode, sizeof(p->accountcode)-1);
|
strncpy(p->accountcode, user->accountcode, sizeof(p->accountcode)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Increment the usage counter */
|
/* Increment the usage counter */
|
||||||
user->inUse++;
|
user->inUse++;
|
||||||
}
|
}
|
||||||
@@ -1566,7 +1573,7 @@ int reload_config(void)
|
|||||||
|
|
||||||
/* fire up the H.323 Endpoint */
|
/* fire up the H.323 Endpoint */
|
||||||
if (!h323_end_point_exist()) {
|
if (!h323_end_point_exist()) {
|
||||||
h323_end_point_create();
|
h323_end_point_create(noFastStart,noH245Tunneling);
|
||||||
}
|
}
|
||||||
h323debug=0;
|
h323debug=0;
|
||||||
dtmfmode = H323_DTMF_RFC2833;
|
dtmfmode = H323_DTMF_RFC2833;
|
||||||
@@ -1644,6 +1651,10 @@ int reload_config(void)
|
|||||||
userbyalias = ast_true(v->value);
|
userbyalias = ast_true(v->value);
|
||||||
} else if (!strcasecmp(v->name, "bridge")) {
|
} else if (!strcasecmp(v->name, "bridge")) {
|
||||||
bridge_default = ast_true(v->value);
|
bridge_default = ast_true(v->value);
|
||||||
|
} else if (!strcasecmp(v->name, "noFastStart")) {
|
||||||
|
noFastStart = ast_true(v->value);
|
||||||
|
} else if (!strcasecmp(v->name, "noH245Tunneling")) {
|
||||||
|
noH245Tunneling = ast_true(v->value);
|
||||||
}
|
}
|
||||||
v = v->next;
|
v = v->next;
|
||||||
}
|
}
|
||||||
|
@@ -62,7 +62,7 @@ int mode = H323_DTMF_RFC2833;
|
|||||||
|
|
||||||
/** Options for connections creation */
|
/** Options for connections creation */
|
||||||
BOOL noFastStart = TRUE;
|
BOOL noFastStart = TRUE;
|
||||||
BOOL noH245Tunnelling;
|
BOOL noH245Tunneling;
|
||||||
BOOL noSilenceSuppression;
|
BOOL noSilenceSuppression;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -479,7 +479,7 @@ H323Connection * MyH323EndPoint::CreateConnection(unsigned callReference, void *
|
|||||||
if (noFastStart)
|
if (noFastStart)
|
||||||
options |= H323Connection::FastStartOptionDisable;
|
options |= H323Connection::FastStartOptionDisable;
|
||||||
|
|
||||||
if (noH245Tunnelling)
|
if (noH245Tunneling)
|
||||||
options |= H323Connection::H245TunnelingOptionDisable;
|
options |= H323Connection::H245TunnelingOptionDisable;
|
||||||
|
|
||||||
return new MyH323Connection(*this, callReference, options);
|
return new MyH323Connection(*this, callReference, options);
|
||||||
@@ -816,9 +816,13 @@ int h323_end_point_exist(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void h323_end_point_create(void)
|
void h323_end_point_create(int no_fast_start, int no_h245_tunneling)
|
||||||
{
|
{
|
||||||
channelsOpen = 0;
|
channelsOpen = 0;
|
||||||
|
|
||||||
|
noFastStart = (BOOL)no_fast_start;
|
||||||
|
noH245Tunneling = (BOOL)no_h245_tunneling;
|
||||||
|
|
||||||
localProcess = new MyProcess();
|
localProcess = new MyProcess();
|
||||||
localProcess->Main();
|
localProcess->Main();
|
||||||
}
|
}
|
||||||
@@ -1103,12 +1107,14 @@ int h323_make_call(char *host, call_details_t *cd, call_options_t call_options)
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
PString token;
|
PString token;
|
||||||
|
PString dest(host);
|
||||||
|
|
||||||
if (!h323_end_point_exist()) {
|
if (!h323_end_point_exist()) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
PString dest(host);
|
noFastStart = call_options.noFastStart;
|
||||||
|
noH245Tunneling = call_options.noH245Tunneling;
|
||||||
|
|
||||||
res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port, call_options.callerid, call_options.callername);
|
res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port, call_options.callerid, call_options.callername);
|
||||||
memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength());
|
memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength());
|
||||||
|
@@ -65,8 +65,8 @@ struct oh323_peer {
|
|||||||
int bridge;
|
int bridge;
|
||||||
int nat;
|
int nat;
|
||||||
int dtmfmode;
|
int dtmfmode;
|
||||||
struct sockaddr_in addr;
|
|
||||||
int delme;
|
int delme;
|
||||||
|
struct sockaddr_in addr;
|
||||||
struct oh323_peer *next;
|
struct oh323_peer *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ typedef struct call_options {
|
|||||||
char *callerid;
|
char *callerid;
|
||||||
char *callername;
|
char *callername;
|
||||||
int noFastStart;
|
int noFastStart;
|
||||||
int noH245Tunnelling;
|
int noH245Tunneling;
|
||||||
int noSilenceSuppression;
|
int noSilenceSuppression;
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
} call_options_t;
|
} call_options_t;
|
||||||
@@ -98,7 +98,6 @@ typedef struct call_options {
|
|||||||
asterisk channels to acutal h.323 connections */
|
asterisk channels to acutal h.323 connections */
|
||||||
typedef struct call_details {
|
typedef struct call_details {
|
||||||
unsigned int call_reference;
|
unsigned int call_reference;
|
||||||
|
|
||||||
const char *call_token;
|
const char *call_token;
|
||||||
const char *call_source_aliases;
|
const char *call_source_aliases;
|
||||||
const char *call_dest_alias;
|
const char *call_dest_alias;
|
||||||
@@ -167,7 +166,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void h323_gk_urq(void);
|
void h323_gk_urq(void);
|
||||||
void h323_end_point_create(void);
|
void h323_end_point_create(int, int);
|
||||||
void h323_end_process(void);
|
void h323_end_process(void);
|
||||||
int h323_end_point_exist(void);
|
int h323_end_point_exist(void);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user