mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Merged revisions 53095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53095 | file | 2007-02-01 15:47:11 -0600 (Thu, 01 Feb 2007) | 2 lines Don't negotiate RFC2833 when not configured to do so. (issue #8799 reported by mdu113) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@53097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -558,7 +558,6 @@ static enum transfermodes global_allowtransfer; /*!< SIP Refer restriction schem
|
|||||||
|
|
||||||
/*! \brief Codecs that we support by default: */
|
/*! \brief Codecs that we support by default: */
|
||||||
static int global_capability = AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_H263;
|
static int global_capability = AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_H263;
|
||||||
static int noncodeccapability = AST_RTP_DTMF;
|
|
||||||
|
|
||||||
/* Object counters */
|
/* Object counters */
|
||||||
static int suserobjs = 0; /*!< Static users */
|
static int suserobjs = 0; /*!< Static users */
|
||||||
@@ -943,6 +942,7 @@ static struct sip_pvt {
|
|||||||
int peercapability; /*!< Supported peer capability */
|
int peercapability; /*!< Supported peer capability */
|
||||||
int prefcodec; /*!< Preferred codec (outbound only) */
|
int prefcodec; /*!< Preferred codec (outbound only) */
|
||||||
int noncodeccapability; /*!< DTMF RFC2833 telephony-event */
|
int noncodeccapability; /*!< DTMF RFC2833 telephony-event */
|
||||||
|
int jointnoncodeccapability; /*!< Joint Non codec capability */
|
||||||
int redircodecs; /*!< Redirect codecs */
|
int redircodecs; /*!< Redirect codecs */
|
||||||
int maxcallbitrate; /*!< Maximum Call Bitrate for Video Calls */
|
int maxcallbitrate; /*!< Maximum Call Bitrate for Video Calls */
|
||||||
struct t38properties t38; /*!< T38 settings */
|
struct t38properties t38; /*!< T38 settings */
|
||||||
@@ -5104,7 +5104,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
|||||||
|
|
||||||
newjointcapability = p->capability & (peercapability | vpeercapability);
|
newjointcapability = p->capability & (peercapability | vpeercapability);
|
||||||
newpeercapability = (peercapability | vpeercapability);
|
newpeercapability = (peercapability | vpeercapability);
|
||||||
newnoncodeccapability = noncodeccapability & peernoncodeccapability;
|
newnoncodeccapability = p->noncodeccapability & peernoncodeccapability;
|
||||||
|
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
@@ -5118,7 +5118,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
|||||||
ast_getformatname_multiple(s4, BUFSIZ, newjointcapability));
|
ast_getformatname_multiple(s4, BUFSIZ, newjointcapability));
|
||||||
|
|
||||||
ast_verbose("Non-codec capabilities (dtmf): us - %s, peer - %s, combined - %s\n",
|
ast_verbose("Non-codec capabilities (dtmf): us - %s, peer - %s, combined - %s\n",
|
||||||
ast_rtp_lookup_mime_multiple(s1, BUFSIZ, noncodeccapability, 0, 0),
|
ast_rtp_lookup_mime_multiple(s1, BUFSIZ, p->noncodeccapability, 0, 0),
|
||||||
ast_rtp_lookup_mime_multiple(s2, BUFSIZ, peernoncodeccapability, 0, 0),
|
ast_rtp_lookup_mime_multiple(s2, BUFSIZ, peernoncodeccapability, 0, 0),
|
||||||
ast_rtp_lookup_mime_multiple(s3, BUFSIZ, newnoncodeccapability, 0, 0));
|
ast_rtp_lookup_mime_multiple(s3, BUFSIZ, newnoncodeccapability, 0, 0));
|
||||||
}
|
}
|
||||||
@@ -5137,9 +5137,9 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
|||||||
|
|
||||||
/* We are now ready to change the sip session and p->rtp and p->vrtp with the offered codecs, since
|
/* We are now ready to change the sip session and p->rtp and p->vrtp with the offered codecs, since
|
||||||
they are acceptable */
|
they are acceptable */
|
||||||
p->jointcapability = newjointcapability; /* Our joint codec profile for this call */
|
p->jointcapability = newjointcapability; /* Our joint codec profile for this call */
|
||||||
p->peercapability = newpeercapability; /* The other sides capability in latest offer */
|
p->peercapability = newpeercapability; /* The other sides capability in latest offer */
|
||||||
p->noncodeccapability = newnoncodeccapability; /* DTMF capabilities */
|
p->jointnoncodeccapability = newnoncodeccapability; /* DTMF capabilities */
|
||||||
|
|
||||||
ast_rtp_pt_copy(p->rtp, newaudiortp);
|
ast_rtp_pt_copy(p->rtp, newaudiortp);
|
||||||
if (p->vrtp)
|
if (p->vrtp)
|
||||||
@@ -6276,7 +6276,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p)
|
|||||||
|
|
||||||
/* Now add DTMF RFC2833 telephony-event as a codec */
|
/* Now add DTMF RFC2833 telephony-event as a codec */
|
||||||
for (x = 1; x <= AST_RTP_MAX; x <<= 1) {
|
for (x = 1; x <= AST_RTP_MAX; x <<= 1) {
|
||||||
if (!(p->noncodeccapability & x))
|
if (!(p->jointnoncodeccapability & x))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
add_noncodec_to_sdp(p, x, 8000,
|
add_noncodec_to_sdp(p, x, 8000,
|
||||||
|
Reference in New Issue
Block a user