diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-13 01:38:47 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-13 01:38:47 +0000 |
commit | 471ba9658e1e88044c419e9740961620f3ef1545 (patch) | |
tree | ad7ef4ac83582f6e9e8b0e02e7746a6fbb49f569 /channels | |
parent | b2b23b395d856d8c40461ce058f870a02fd4305b (diff) |
allow users of RTP to use G726-32 AAL2 packing even when RFC3551 packing has been requested (Sipura/Grandstream ATAs and others will need this)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37501 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_jingle.c | 2 | ||||
-rw-r--r-- | channels/chan_mgcp.c | 10 | ||||
-rw-r--r-- | channels/chan_sip.c | 24 |
3 files changed, 18 insertions, 18 deletions
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c index c5957e399..cefecc783 100644 --- a/channels/chan_jingle.c +++ b/channels/chan_jingle.c @@ -882,7 +882,7 @@ static int jingle_newcall(struct jingle *client, ikspak *pak) while (codec) { ast_rtp_set_m_type(p->rtp, atoi(iks_find_attrib(codec, "id"))); ast_rtp_set_rtpmap_type(p->rtp, atoi(iks_find_attrib(codec, "id")), "audio", - iks_find_attrib(codec, "name")); + iks_find_attrib(codec, "name"), 0); codec = iks_next(codec); } diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index df7db1b8a..5ad6cb733 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1882,7 +1882,7 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req) if (sscanf(a, "rtpmap: %u %[^/]/", &codec, mimeSubtype) != 2) continue; /* Note: should really look at the 'freq' and '#chans' params too */ - ast_rtp_set_rtpmap_type(sub->rtp, codec, "audio", mimeSubtype); + ast_rtp_set_rtpmap_type(sub->rtp, codec, "audio", mimeSubtype, 0); } /* Now gather all of the codecs that were asked for: */ @@ -2081,7 +2081,7 @@ static int add_sdp(struct mgcp_request *resp, struct mgcp_subchannel *sub, struc if (codec > -1) { snprintf(costr, sizeof(costr), " %d", codec); strncat(m, costr, sizeof(m) - strlen(m) - 1); - snprintf(costr, sizeof(costr), "a=rtpmap:%d %s/8000\r\n", codec, ast_rtp_lookup_mime_subtype(1, x)); + snprintf(costr, sizeof(costr), "a=rtpmap:%d %s/8000\r\n", codec, ast_rtp_lookup_mime_subtype(1, x, 0)); strncat(a, costr, sizeof(a) - strlen(a) - 1); } } @@ -2095,7 +2095,7 @@ static int add_sdp(struct mgcp_request *resp, struct mgcp_subchannel *sub, struc if (codec > -1) { snprintf(costr, sizeof(costr), " %d", codec); strncat(m, costr, sizeof(m) - strlen(m) - 1); - snprintf(costr, sizeof(costr), "a=rtpmap:%d %s/8000\r\n", codec, ast_rtp_lookup_mime_subtype(0, x)); + snprintf(costr, sizeof(costr), "a=rtpmap:%d %s/8000\r\n", codec, ast_rtp_lookup_mime_subtype(0, x, 0)); strncat(a, costr, sizeof(a) - strlen(a) - 1); if (x == AST_RTP_DTMF) { /* Indicate we support DTMF... Not sure about 16, @@ -2140,7 +2140,7 @@ static int transmit_modify_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp snprintf(local, sizeof(local), "p:20"); for (x=1;x<= AST_FORMAT_MAX_AUDIO; x <<= 1) { if (p->capability & x) { - snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x)); + snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x, 0)); strncat(local, tmp, sizeof(local) - strlen(local) - 1); } } @@ -2170,7 +2170,7 @@ static int transmit_connect_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp snprintf(local, sizeof(local), "p:20"); for (x=1;x<= AST_FORMAT_MAX_AUDIO; x <<= 1) { if (p->capability & x) { - snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x)); + snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x, 0)); strncat(local, tmp, sizeof(local) - strlen(local) - 1); } } diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 91aaef100..35ac561a6 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4719,9 +4719,9 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) ast_verbose("Found description format %s for ID %d\n", mimeSubtype, codec); /* Note: should really look at the 'freq' and '#chans' params too */ - ast_rtp_set_rtpmap_type(newaudiortp, codec, "audio", mimeSubtype); + ast_rtp_set_rtpmap_type(newaudiortp, codec, "audio", mimeSubtype, 0); if (p->vrtp) - ast_rtp_set_rtpmap_type(newvideortp, codec, "video", mimeSubtype); + ast_rtp_set_rtpmap_type(newvideortp, codec, "video", mimeSubtype, 0); } if (udptlportno != -1) { @@ -4855,15 +4855,15 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) char s1[BUFSIZ], s2[BUFSIZ], s3[BUFSIZ], s4[BUFSIZ]; ast_verbose("Capabilities: us - %s, peer - audio=%s/video=%s, combined - %s\n", - ast_getformatname_multiple(s1, BUFSIZ, p->capability), - ast_getformatname_multiple(s2, BUFSIZ, newpeercapability), - ast_getformatname_multiple(s3, BUFSIZ, vpeercapability), - ast_getformatname_multiple(s4, BUFSIZ, newjointcapability)); + ast_getformatname_multiple(s1, BUFSIZ, p->capability), + ast_getformatname_multiple(s2, BUFSIZ, newpeercapability), + ast_getformatname_multiple(s3, BUFSIZ, vpeercapability), + ast_getformatname_multiple(s4, BUFSIZ, newjointcapability)); ast_verbose("Non-codec capabilities (dtmf): us - %s, peer - %s, combined - %s\n", - ast_rtp_lookup_mime_multiple(s1, BUFSIZ, noncodeccapability, 0), - ast_rtp_lookup_mime_multiple(s2, BUFSIZ, peernoncodeccapability, 0), - ast_rtp_lookup_mime_multiple(s3, BUFSIZ, newnoncodeccapability, 0)); + ast_rtp_lookup_mime_multiple(s1, BUFSIZ, noncodeccapability, 0, 0), + ast_rtp_lookup_mime_multiple(s2, BUFSIZ, peernoncodeccapability, 0, 0), + ast_rtp_lookup_mime_multiple(s3, BUFSIZ, newnoncodeccapability, 0, 0)); } if (!newjointcapability) { ast_log(LOG_NOTICE, "No compatible codecs, not accepting this offer!\n"); @@ -5571,7 +5571,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p, int codec, int sample_rate ast_build_string(m_buf, m_size, " %d", rtp_code); ast_build_string(a_buf, a_size, "a=rtpmap:%d %s/%d\r\n", rtp_code, - ast_rtp_lookup_mime_subtype(1, codec), + ast_rtp_lookup_mime_subtype(1, codec, 0), sample_rate); if (codec == AST_FORMAT_G729A) { /* Indicate that we don't support VAD (G.729 annex B) */ @@ -5727,13 +5727,13 @@ static void add_noncodec_to_sdp(const struct sip_pvt *p, int format, int sample_ int rtp_code; if (debug) - ast_verbose("Adding non-codec 0x%x (%s) to SDP\n", format, ast_rtp_lookup_mime_subtype(0, format)); + ast_verbose("Adding non-codec 0x%x (%s) to SDP\n", format, ast_rtp_lookup_mime_subtype(0, format, 0)); if ((rtp_code = ast_rtp_lookup_code(p->rtp, 0, format)) == -1) return; ast_build_string(m_buf, m_size, " %d", rtp_code); ast_build_string(a_buf, a_size, "a=rtpmap:%d %s/%d\r\n", rtp_code, - ast_rtp_lookup_mime_subtype(0, format), + ast_rtp_lookup_mime_subtype(0, format, 0), sample_rate); if (format == AST_RTP_DTMF) /* Indicate we support DTMF and FLASH... */ |