Summary: | ASTERISK-17204: Unable to set outbound call CODEC using SIP_CODEC_OUTBOUND | ||
Reporter: | Marco Marzetti (manzo_zeti) | Labels: | |
Date Opened: | 2011-01-05 08:12:19.000-0600 | Date Closed: | 2011-10-18 12:05:06 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | We're unable to set outbound call CODEC using SIP_CODEC_OUTBOUND. By the way SIP_CODEC_INBOUND works as expected. When called from transmit_invite pbx_builtin_getvar_helper finds these variables: DIALEDPEERNUMBER SIPCALLID OUTBOUND-TRUNKMSD OUTBOUND-TRUNK IAXINFO-AEL CONSOLE-AEL When called from transmit_response_with_sdp pbx_builtin_getvar_helper also finds these variables: SIP_CODEC_OUTBOUND SIP_CODEC_INBOUND ****** ADDITIONAL INFORMATION ****** Dialplan is: exten => _[0-9].,n,Set(SIP_CODEC_INBOUND=alaw) exten => _[0-9].,n,Set(SIP_CODEC_OUTBOUND=alaw) exten => _[0-9].,n,Dial(SIP/${numeroDaChiamare}@${sipGateway},180,gj) | ||
Comments: | By: ewieling (ewieling) 2011-08-15 13:26:14.579-0500 In my 1.6.2.20 the string "SIP_CODEC_INBOUND" and "SIP_CODEC_OUTBOUND" where nowhere in the code. Plain "SIP_CODEC" is in the code. [dev@ast02 asterisk-1.6.2.20]# grep -r SIP_CODEC_ * [dev@ast02 asterisk-1.6.2.20]# grep -r SIP_CODEC * Binary file channels/chan_sip.so matches Binary file channels/chan_sip.o matches channels/chan_sip.c:/*! \brief Try setting codec suggested by the SIP_CODEC channel variable */ channels/chan_sip.c: codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC"); channels/chan_sip.c: ast_log(LOG_NOTICE, "Changing codec to '%s' for this call because of ${SIP_CODEC} variable\n", codec); channels/chan_sip.c: ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because it is not shared by both ends.\n"); channels/chan_sip.c: ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because of unrecognized/not configured codec (check allow/disallow in sip.conf): %s\n", codec); doc/tex/asterisk/node99.html:${SIP_CODEC} Set the SIP codec for a call doc/tex/channelvariables.tex:${SIP_CODEC} Set the SIP codec for a call doc/tex/asterisk.txt:${SIP_CODEC} Set the SIP codec for a call Binary file doc/tex/asterisk.dvi matches By: Kevin P. Fleming (kpfleming) 2011-10-18 12:02:20.293-0500 In order for your setting of SIP_CODEC_OUTBOUND to be present on the outbound channel(s) created by Dial(), they must be inherited by prefixing them with either one or two underscores. Set(__SIP_CODEC_OUTBOUND=alaw) SIP_CODEC_INBOUND works because you are directly setting it on the inbound channel, but it's impossible to directly set SIP_CODEC_OUTBOUND on an outbound channel. |