[Asterisk-Users] SIP_CODEC, reinvites, and changing codecs

Michael George george at mutualdata.com
Fri Jun 3 06:21:52 MST 2005


I am wondering if the SIP protocol and its implementation in * allows for
changing codecs mid-connection.

I've seen some questions regarding this on the list, but I've not found any
clear answers.

I've also seen the SIP_CODEC variable, but it's not clear that it will change
the codec on an existing call.  Also, there are mentions of needing a reinvite
to make the change, but most of the sample sip.conf contexts I've used for
setting up our sip channels reccommend "canreinvite=no".  Does that preclude
any change I might've had in changing codecs?

Basically, what I have is polycom phones with 729 licenses and access to the
VoIP provider which can do 729.  Native bridging will not consume licenses,
but accessing VM on either side will.  Same with MOH.

I have a license for each of the VoIP provider channels, so I'm not worried
about changing their codec because I want the compression there always.  They
can just have licenses...

I would like to have the polycoms connect initially with 729 which will
eventually natively bridge for internal channel-to-channels calls,
internal-to-trunk calls, and trunk-to-internal calls.  But when an internal
channel is accessing voicemail, I would like to change the codec in use from
729 to ulaw to release the license.  Since these are on an internal 'net the
bandwidth usage is not a big deal.

Is this possible with "canreinvite=no" in the sip.conf entry for the polycoms?
Can I achieve this with SetVar(SIP_CODEC, "ulaw") in my dialplan before
sending the internal call to VoiceMailMain()?

Thank you.

-- 
-M

There are 10 kinds of people in this world:
	Those who can count in binary and those who cannot.



More information about the asterisk-users mailing list