[asterisk-users] situation with ivr and four-channel gateway
    Steve Edwards 
    asterisk.org at sedwards.com
       
    Wed Feb 25 21:01:41 CST 2015
    
    
  
On Wed, 25 Feb 2015, John Kiniston wrote:
> I'd recommend using DEVICE_STATE
> 
> On your extension 101, Check the DEVICE_STATE of peer SIP/101, If it's 
> not 'NOT_INUSE' then dial it, Otherwise dial SIP/102
> 
> exten => 101,1,ExecIf($["${DEVICE_STATE(SIP/101)}"="NOT_INUSE"]?Dial(SIP/101,40))
>  same =>       n,Dial(SIP/102,40,t)
>  same =>       n,Hangup()
Remember to set 'callcounter = yes' in sip.conf.
-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000
    
    
More information about the asterisk-users
mailing list