aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-16 19:03:24 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-16 19:03:24 +0000
commit497bf0b92cad547930d1846fe2d23d3430a4316a (patch)
treeeb89a0c0e7202e0334ef137f72ccc24c3f646432 /channels
parent5c51759e156fdd9bcf254f965c63c4969e393055 (diff)
addition of G.719 pass-through support
(closes issue #16293) Reported by: malcolmd Patches: g719.passthrough.patch.7 uploaded by malcolmd (license 924) format_g719.c uploaded by malcolmd (license 924) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270940 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c1
-rw-r--r--channels/chan_sip.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 38646c323..f5cc5f813 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -316,6 +316,7 @@ static int (*iax2_regfunk)(const char *username, int onoff) = NULL;
~AST_FORMAT_SLINEAR16 & \
~AST_FORMAT_SIREN7 & \
~AST_FORMAT_SIREN14 & \
+ ~AST_FORMAT_G719 & \
~AST_FORMAT_ULAW & \
~AST_FORMAT_ALAW & \
~AST_FORMAT_G722)
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 588b63799..32f232c62 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8520,6 +8520,15 @@ static int process_sdp_a_audio(const char *a, struct sip_pvt *p, struct ast_rtp_
}
}
break;
+ case AST_FORMAT_G719:
+ if (sscanf(fmtp_string, "bitrate=%30u", &bit_rate) == 1) {
+ if (bit_rate != 64000) {
+ ast_log(LOG_WARNING, "Got G.719 offer at %d bps, but only 64000 bps supported; ignoring.\n", bit_rate);
+ ast_rtp_codecs_payloads_unset(newaudiortp, NULL, codec);
+ } else {
+ found = TRUE;
+ }
+ }
}
}
}
@@ -9771,6 +9780,10 @@ static void add_codec_to_sdp(const struct sip_pvt *p, format_t codec,
/* Indicate that we only expect 48Kbps */
ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=48000\r\n", rtp_code);
break;
+ case AST_FORMAT_G719:
+ /* Indicate that we only expect 64Kbps */
+ ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=64000\r\n", rtp_code);
+ break;
}
if (fmt.cur_ms && (fmt.cur_ms < *min_packet_size))