[asterisk-users] different codec for different extensions

Yusuf yusuf at ecntelecoms.com
Fri Jun 22 10:13:51 CDT 2007


Hi,

what about this:

 >>> when user X (Sip) call 111 extension in default context. The Asterisk
 >>> response should be in GSM codec
 >>>

exten => 111,1,Set(SIP_CODEC=gsm)
exten => 111,2,Dial(SIP/.....)

 >>> When user X (Sip) call 222 extension in default context. the Asterisk
 >>> response should be in G711 Codec
 >>>

exten => 222,1,Set(SIP_CODEC=alaw)
exten => 222,2,Dial(SIP/.....)


Nasir Iqbal wrote:
> Hi Mojo,
> 
> I dont have control our calling party. and also called extension is only
> configured in extensions.conf not sip.conf etc.
> 
> So I must select the codec within my dialplan (extensions.com) 
> 
> I found one solution by using "SIP_CODEC" variable
> 
> like 
> 
> [fax]
> exten => 605,1,ringing()
> exten => 605,n,set(SIP_CODEC=ulaw)
> exten => 605,n,RxFAX(/tmp/nasir.tiff|ecm)
> exten => 605,n,hangup()
> 
> but Thanks for your answer
> 
> 
> Thanks 
> 
> Nasir Iqbal
> 
>> [userX]
>> ...
>> context=internal
>> disallow=all
>> allow=gsm
>> allow=ulaw
>> ...
>>
>> [fax]
>> ...
>> disallow=all
>> allow=ulaw
>> ...
>>
>>
>> Then any IVRs that userX accesses should be in gsm because it's the 
>> preferred codec?  Assuming that the gsm sound files ARE installed?  You 
>> might experiment with this.
>>
>> But when userX is bridged to the fax channel, ulaw is the only one the 
>> fax channel allows, so it's chosen on both ends.
>>
>> Shouldn't this work?
>>
>> Mojo
>>
>>
>> Nasir Iqbal wrote:
>>> Hi All,
>>>
>>> I am wondering that how I can setup different codec for different
>>> extensions in my dial plan.
>>>
>>> scanario will 
>>>
>>> when user X (Sip) call 111 extension in default context. The Asterisk
>>> response should be in GSM codec
>>>
>>> When user X (Sip) call 222 extension in default context. the Asterisk
>>> response should be in G711 Codec
>>>
>>> Actually I want to setup an extension for FAX receiving (rx_fax) and
>>> other for IVR. when your call FAX extension the codec will be G711 and
>>> when user call IVR the codec must be GSM
>>>
>>>
>>> Please help me
>>>
>>>
>>> Thanks 
>>>
>>> Nasir Iqbal
>>>
>>>
>>>
>>> _______________________________________________
>>> --Bandwidth and Colocation provided by Easynews.com --
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

thanks,
Yusuf



More information about the asterisk-users mailing list