Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
tbskyd at gmail.com
Guest





PostPosted: Sat Sep 27, 2014 10:28 am    Post subject: [asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC? Reply with quote

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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
universe at truemetal.org
Guest





PostPosted: Sun Sep 28, 2014 1:01 am    Post subject: [asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC? Reply with quote

Am 27.09.2014 17:28, schrieb d tbsky:
Quote:
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



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
tbskyd at gmail.com
Guest





PostPosted: Sun Sep 28, 2014 10:08 am    Post subject: [asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC? Reply with quote

2014-09-28 14:01 GMT+08:00 Markus <universe@truemetal.org>:
Quote:
Am 27.09.2014 17:28, schrieb d tbsky:
Quote:

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

thanks a lot for help!! I tried both but none works. maybe this
function can not work like the old channel variable "SIP_CODEC", which
can change inbound call codec. but I do notice something different
between chan_sip and chan_pjsip.

I use zoiper softphone for testing:

when I dialout sip trunk with chan_sip, the remote peer rings, and
zoiper now shows what codec to use. if I use "SIP_CODEC" before dial
to change the codec, zoiper will use the new CODEC, but asterisk
internal won't change and still transcoding in the middle.(at least
"core show channel sip/xxxxx" told me transcoding)

when I dialout sip trunk with chan_pjsip, the remote peer rings, but
zoiper didn't show what codec to use. only after the callee answer the
phone, zoiper shows what codec to use. so it seems chan_pjsip have
better chance to do the right thing without transcoding. it's sad that
chan_pjsip won't select best codec match two peers automatically
without transcoding. but I hope it at least can provide a magic
function or channel variable like "SIP_CODEC/SIP_CODEC_INBOUND" to
make correct codec selection.

Regards,
tbskyd

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mjordan at digium.com
Guest





PostPosted: Tue Sep 30, 2014 10:53 am    Post subject: [asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC? Reply with quote

On Sat, Sep 27, 2014 at 10:28 AM, d tbsky <tbskyd@gmail.com> wrote:
Quote:
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
tbskyd at gmail.com
Guest





PostPosted: Tue Sep 30, 2014 12:48 pm    Post subject: [asterisk-users] can PJSIP_MEDIA_OFFER work like SIP_CODEC? Reply with quote

2014-09-30 23:52 GMT+08:00 Matthew Jordan <mjordan@digium.com>:
Quote:
On Sat, Sep 27, 2014 at 10:28 AM, d tbsky <tbskyd@gmail.com> wrote:
Quote:
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.


it sounds good. could you give out an one line dialplan example so I
can try to use it? and the real thing I want to change is the inbound
codec, can it work like the chan_sip channel variable
SIP_CODEC_INBOUND?

thanks a lot for your help!!

Regards,
tbskyd

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services