Currently there's no way to influence original/calling channel codec selection from dialplan. PJSIP_MEDIA_OFFER function only works for oubound/called channel.
Influencing original/calling channel codec selection is sometimes necessary to avoid transcoding. Please consider the following scenario:
internal extensions are set to talk to each other using g722. so their codec setting is "allow=!all,g722,ulaw"
carriers trunks support ulaw only (allow=!all,ulaw)
calls between internal extensions naturally happen over g722 as its their preferred codec
external calls result in g722-to-ulaw transcoding. With chan_sip it's possible to set SIP_CODEC_INBOUND=ulaw on calling channel to avoid transcoding. The same functionality is highly desirable with chan_pjsip.
I would imagine extending PJSIP_MEDIA_OFFER to work on original/calling channel as well would be the best way to do it
Currently there's no way to influence original/calling channel codec selection from dialplan. PJSIP_MEDIA_OFFER function only works for oubound/called channel.
Influencing original/calling channel codec selection is sometimes necessary to avoid transcoding. Please consider the following scenario:
I would imagine extending PJSIP_MEDIA_OFFER to work on original/calling channel as well would be the best way to do it
Thank you