Why codec negotiation isn't working with dial plan variables SIP_CODEC_OUTBOUND/SIP_CODEC_INBOUND in Asterisk 18.2.1

Am using Asterisk 18.2.1 and pjsip. Am trying to mandate audio codecs in the dialplan as below, but not getting the expected results. Please help.

exten = 108,1,Answer()
same = n,Set(SIP_CODEC_INBOUND=alaw)
same = n,Set(SIP_CODEC_OUTBOUND=alaw)

The reason is you are trying to use chan_sip functionality with chan_pjsip, which won’t work. PJSIP has the media offer dialplan function[1] which has some of the functionality.

[1] PJSIP_MEDIA_OFFER - Asterisk Documentation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.