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       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to