[asterisk-dev] SIP codec selection. Can I select a codec and reinvite?
Eric "ManxPower" Wieling
eric at fnords.org
Mon Nov 19 14:49:34 CST 2007
There is this super secret document in the Asterisk source code called
"channelvariables.txt" (or README.variables if using 1.2.x) that
contains information on an even more super secret channel variable
called SIP_CODEC. You might want to look into it.
Gregory Boehnlein wrote:
>> On outbound calls every thing works fine. The phone picks the codec and
>> asterisk passes it on to the sip trunk. On inbound calls (from the
>> SIP trunk) the Sip trunks proffered codec is selected.
>>
>> Is there any way (in asterisk) that I can select the codec per call?
>>
>> i.e. Call comes in. before answering the call look up the destination
>> peers codec, (function SIPPEER?) and set the codec to use and then
>> answer?
>>
>> Or is there any way to set the codec and do an manual re-invite?
>>
>> Thanks
>> Doug Gillespie
>
> BJ Wescke wrote a patch for me last year for 1.2 that allowed us to do codec
> based routing via a new DialPlan Function called "SIPPrefCodec". I don't
> know if it will work for you, but I've attached a link to the patch.
>
> http://www.nacs.net/~damin/sip_codec-1.2.diff
>
> Basically, that would let you define multiple peers ala:
>
> [itspG723]
> disallow=all
> allow=g723
>
> [itspG729]
> disallow=all
> allow=g729
>
> Using the function, you could then build your Dial string to send it to the
> specific peer that matched the codec of the inbound call leg.
>
> Hackish, and not clean, but it worked for us at the time.
>
>
>
>
>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
More information about the asterisk-dev
mailing list