hi: when using chan_sip, I can use set SIP_CODEC in dialplan to change the codec of endpoint. this method didn't work with pjsip in asterisk 12/13. I found asterisk 12/13 has a new function PJSIP_MEDIA_OFFER. according to the description, it seems can set codec, but the document didn't offer any example. i try to use something like PJSIP_MEDIA_OFFER(alaw) but didn't work. can someone give an example for the function? thanks for the help. Regards, tbskyd
Am 27.09.2014 17:28, schrieb d tbsky:> can someone give an example for the function? thanks for the help.Not a programmer here, just grep -r'ed through the code, but maybe try one of these: G711A G711_ALAW
Matthew Jordan
2014-Sep-30 15:52 UTC
[asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC?
On Sat, Sep 27, 2014 at 10:28 AM, d tbsky <tbskyd at gmail.com> wrote:> hi: > when using chan_sip, I can use set SIP_CODEC in dialplan to change > the codec of endpoint. this method didn't work with pjsip in asterisk > 12/13. > > I found asterisk 12/13 has a new function PJSIP_MEDIA_OFFER. > according to the description, it seems can set codec, but the document > didn't offer any example. i try to use something like > PJSIP_MEDIA_OFFER(alaw) but didn't work. > > can someone give an example for the function? thanks for the help. >The function should work on whatever channel it was set on. If you are going to use it on an outbound channel, then you should use a pre-dial handler to apply it to that channel. Matt -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org