mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
on outbound calls make sure we use requested codec
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -94,23 +94,23 @@ static char secret[50];
|
|||||||
struct oh323_pvt {
|
struct oh323_pvt {
|
||||||
ast_mutex_t lock; /* Channel private lock */
|
ast_mutex_t lock; /* Channel private lock */
|
||||||
call_options_t calloptions; /* Options to be used during call setup */
|
call_options_t calloptions; /* Options to be used during call setup */
|
||||||
int alreadygone; /* Whether or not we've already been destroyed by or peer */
|
int alreadygone; /* Whether or not we've already been destroyed by or peer */
|
||||||
int needdestroy; /* if we need to be destroyed */
|
int needdestroy; /* if we need to be destroyed */
|
||||||
call_details_t cd; /* Call details */
|
call_details_t cd; /* Call details */
|
||||||
struct ast_channel *owner; /* Who owns us */
|
struct ast_channel *owner; /* Who owns us */
|
||||||
int capability; /* Special capability */
|
int capability; /* audio capability */
|
||||||
int nonCodecCapability;
|
int nonCodecCapability; /* non-audio capability */
|
||||||
int outgoing; /* Outgoing or incoming call? */
|
int outgoing; /* Outgoing or incoming call? */
|
||||||
int nat; /* Are we talking to a NAT EP?*/
|
int nat; /* Are we talking to a NAT EP?*/
|
||||||
int bridge; /* Determine of we should native bridge or not*/
|
int bridge; /* Determine of we should native bridge or not*/
|
||||||
char exten[AST_MAX_EXTENSION]; /* Requested extension */
|
char exten[AST_MAX_EXTENSION]; /* Requested extension */
|
||||||
char context[AST_MAX_EXTENSION]; /* Context where to start */
|
char context[AST_MAX_EXTENSION]; /* Context where to start */
|
||||||
char username[81]; /* H.323 alias using this channel */
|
char username[81]; /* H.323 alias using this channel */
|
||||||
char accountcode[256]; /* Account code */
|
char accountcode[256]; /* Account code */
|
||||||
int amaflags; /* AMA Flags */
|
int amaflags; /* AMA Flags */
|
||||||
char callerid[80]; /* Caller*ID if available */
|
char callerid[80]; /* Caller*ID if available */
|
||||||
struct ast_rtp *rtp; /* RTP Session */
|
struct ast_rtp *rtp; /* RTP Session */
|
||||||
int dtmfmode;
|
int dtmfmode; /* What DTMF Mode is being used */
|
||||||
struct ast_dsp *vad; /* Used for in-band DTMF detection */
|
struct ast_dsp *vad; /* Used for in-band DTMF detection */
|
||||||
struct oh323_pvt *next; /* Next channel in list */
|
struct oh323_pvt *next; /* Next channel in list */
|
||||||
} *iflist = NULL;
|
} *iflist = NULL;
|
||||||
@@ -805,7 +805,6 @@ static struct ast_channel *oh323_request(char *type, int format, void *data)
|
|||||||
h323_set_id(h323id);
|
h323_set_id(h323id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
p = oh323_alloc(0);
|
p = oh323_alloc(0);
|
||||||
|
|
||||||
if (!p) {
|
if (!p) {
|
||||||
@@ -815,13 +814,15 @@ static struct ast_channel *oh323_request(char *type, int format, void *data)
|
|||||||
|
|
||||||
/* Assign a default capability */
|
/* Assign a default capability */
|
||||||
p->capability = capability;
|
p->capability = capability;
|
||||||
|
|
||||||
if (p->dtmfmode) {
|
if (p->dtmfmode) {
|
||||||
if (p->dtmfmode & H323_DTMF_RFC2833)
|
if (p->dtmfmode & H323_DTMF_RFC2833)
|
||||||
p->nonCodecCapability |= AST_RTP_DTMF;
|
p->nonCodecCapability |= AST_RTP_DTMF;
|
||||||
else
|
else
|
||||||
p->nonCodecCapability &= ~AST_RTP_DTMF;
|
p->nonCodecCapability &= ~AST_RTP_DTMF;
|
||||||
}
|
}
|
||||||
|
/* pass on our preferred codec to the H.323 stack */
|
||||||
|
h323_set_capability(format, dtmfmode);
|
||||||
|
|
||||||
if (ext) {
|
if (ext) {
|
||||||
strncpy(p->username, ext, sizeof(p->username) - 1);
|
strncpy(p->username, ext, sizeof(p->username) - 1);
|
||||||
@@ -1435,7 +1436,7 @@ int reload_config(void)
|
|||||||
struct oh323_alias *alias = NULL;
|
struct oh323_alias *alias = NULL;
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
char *cat;
|
char *cat;
|
||||||
char *utype;
|
char *utype;
|
||||||
|
|
||||||
cfg = ast_load(config);
|
cfg = ast_load(config);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user