[Asterisk-Users] Connecting two phones with different codecs
Lisa Wolf
lwolf at tpg.com.au
Tue Feb 14 21:37:01 MST 2006
I've got a situation here that I thought was trivial. I have two
phones, and an asterisk box.
The first phone knows about g723, alaw and g729, as does the second phone.
sip.conf has allows for those codecs.
Now, within the dialplan I make a determination which codec will be used
(this is a simulation, obviously. Think 'within the office', 'to
another office' and 'to a device that only knows g723').
I do this with setvar(SIP_CODEC=[appropriatecodecname]). Then I can
either do an immediate answer, or wait for the other end to pick up to
ensure the answer.
However, what I'm finding is that the originating phone decides on the
codec specified in SIP_CODEC, but the destination phone replies with its
preferred codec (whichever I specified first) out of the three. If this
isn't what I put in the SIP_CODEC, then asterisk is unable to connect
the channels.
My question is this: is it possible for the codec chosen with something
like the SIP_CODEC to be 'passed' to the second channel as the only
choice? Or another way to get asterisk to determine the codec that
should be used based on destination?
Thanks,
Lisa
More information about the asterisk-users
mailing list