[asterisk-users] different codec for different extensions

Nasir Iqbal nasir at ictinnovations.com
Thu Jun 21 23:08:21 CDT 2007


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




More information about the asterisk-users mailing list