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:
Jeremy McNamara
2004-04-05 20:45:14 +00:00
parent f897350521
commit 70dfab8be0

View File

@@ -98,8 +98,8 @@ struct oh323_pvt {
int needdestroy; /* if we need to be destroyed */
call_details_t cd; /* Call details */
struct ast_channel *owner; /* Who owns us */
int capability; /* Special capability */
int nonCodecCapability;
int capability; /* audio capability */
int nonCodecCapability; /* non-audio capability */
int outgoing; /* Outgoing or incoming call? */
int nat; /* Are we talking to a NAT EP?*/
int bridge; /* Determine of we should native bridge or not*/
@@ -110,7 +110,7 @@ struct oh323_pvt {
int amaflags; /* AMA Flags */
char callerid[80]; /* Caller*ID if available */
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 oh323_pvt *next; /* Next channel in list */
} *iflist = NULL;
@@ -805,7 +805,6 @@ static struct ast_channel *oh323_request(char *type, int format, void *data)
h323_set_id(h323id);
}
p = oh323_alloc(0);
if (!p) {
@@ -822,6 +821,8 @@ static struct ast_channel *oh323_request(char *type, int format, void *data)
else
p->nonCodecCapability &= ~AST_RTP_DTMF;
}
/* pass on our preferred codec to the H.323 stack */
h323_set_capability(format, dtmfmode);
if (ext) {
strncpy(p->username, ext, sizeof(p->username) - 1);