[asterisk-users] runtime codec selection

virendra bhati virbhati at gmail.com
Mon Feb 27 01:19:49 CST 2012


Hi All,

I don't know it's possible or not. I want to do run time codec selection by
asterisk.

I have an account in sip.conf and I have active only g729 on it

[2209]
.......
disallow=all
allow=g729
.......

When try to dial that number when I want to use codec GSM.

Is this possbile to change code after making call to exten ?

*extensions.conf  information is below:-*

exten => _2xxx,1,Answer()
        same => n,GotoIf($["${EXTEN}" = "2209"]?setchannel:gowithoutit)
        same => n(setchannel),Set(foo=${CHANNEL(audioreadformat)})
;       same => n,Set(CHANNEL(audioreadformat)=gsm)    it's not update
anything might be readonly property, that's y commented.
        same => n,Set(_SIP_CODEC=gsm)
        same => n,Set(_SIP_CODEC_OUTBOUND=gsm)
;        same => n,Set(foo=${CHANNEL(audionativeformat)})
;        same => n,Set(foo=${CHANNEL(audiowriteformat)})
        same => n(gowithoutit),Dial(SIP/${EXTEN},60)
        same => n,GotoIf($["${EXTEN}" = "2209"]?voicemail)
        same => n(voicemail),VoiceMail(2209 at hyd,u)
        same => n,Hangup()


-- 

Thanks and regards

 Virendra Bhati
+91-8885268942
Software Engineer
E-mail-: virbhati at gmail.com
Skype id:- virbhati2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120227/06c5e5d6/attachment.htm>


More information about the asterisk-users mailing list