-----------
* Added preferred_codec_only option in sip.conf. This feature limits the joint
codecs sent in response to an INVITE to the single most preferred codec.
+ * Added SIP_CODEC_OUTBOUND dialplan variable which can be used to set the codec
+ to be used for the outgoing call. It must be one of the codecs configured
+ for the device.
Applications
------------
int fmt;
const char *codec;
- codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC");
+ if (p->outgoing_call) {
+ codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC_OUTBOUND");
+ } else if (!(codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC_INBOUND"))) {
+ codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC");
+ }
+
if (!codec)
return;
if (p->do_history)
append_history(p, "ReInv", "Re-invite sent");
+ try_suggested_sip_codec(p);
if (t38version)
add_sdp(&req, p, oldsdp, FALSE, TRUE);
else
ast_udptl_offered_from_local(p->udptl, 1);
ast_debug(1, "T38 is in state %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
add_sdp(&req, p, FALSE, FALSE, TRUE);
- } else if (p->rtp)
+ } else if (p->rtp) {
+ try_suggested_sip_codec(p);
add_sdp(&req, p, FALSE, TRUE, FALSE);
+ }
} else {
if (!p->notify_headers) {
add_header_contentLength(&req, 0);
${SIPFROMDOMAIN} Set SIP domain on outbound calls
${SIPUSERAGENT} * SIP user agent (deprecated)
${SIPURI} * SIP uri
-${SIP_CODEC} Set the SIP codec for a call
+${SIP_CODEC} Set the SIP codec for an inbound call
+${SIP_CODEC_INBOUND} Set the SIP codec for an inbound call
+${SIP_CODEC_OUTBOUND} Set the SIP codec for an outbound call
${SIP_URI_OPTIONS} * additional options to add to the URI for an outgoing call
${RTPAUDIOQOS} RTCP QoS report for the audio of this call
${RTPVIDEOQOS} RTCP QoS report for the video of this call