<div dir="ltr"><div><div><div>I'd recommend using DEVICE_STATE <br><br>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<br><br></div>exten => 101,1,ExecIf($["${DEVICE_STATE(SIP/101)}"="NOT_INUSE"]?Dial(SIP/101,40))<br></div> same => n,Dial(SIP/102,40,t)<br></div> same => n,Hangup()<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 2:08 PM, ricky gutierrez <span dir="ltr"><<a href="mailto:xserverlinux@gmail.com" target="_blank">xserverlinux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list, I need your help ,I have an incoming call x the ivr and the<br>
operator takes the call. ext "101" , If a second call reenters and the<br>
operator is talking, I want to send to the extension 102 I use the<br>
Variable DIALSTATUS , but not working<br>
<br>
check IVR<br>
<br>
[IVRINMA]<br>
<br>
exten => s,1,Wait(1)<br>
exten => s,n,Set(CHANNEL(language)=es)<br>
same=> n,Set(TIMEOUT(digit)=4)<br>
same=> n,Set(TIMEOUT(response)=5)<br>
same=> n,Wait(1)<br>
same=> n,Background(/tmp/ivr/menu)<br>
same=> n,WaitExten(5)<br>
exten => 0,1,Playback(pls-wait-connect-call)<br>
exten => 0,n,Goto(operadora,101,1)<br>
exten => _10[1-3],1,Dial(SIP/${EXTEN},40,t)<br>
same=> n,Hangup<br>
exten => i,1,Playback(invalid)<br>
same=> n,Goto(IVRINMA,s,2)<br>
exten=> t,1,Dial(SIP/101,38,t)<br>
exten=> t,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?2,1:)<br>
exten => 2,1,Dial(SIP/102,38,t)<br>
same=> n,Hangup()<br>
<br>
## the second option, if possible ###<br>
<br>
I have a gw wiht 4 port gsm , my provider gives me 4 lines and one of<br>
them is the main , the problem is that all my incoming calls using<br>
this number and is always busy , and the other three are always free,<br>
it is possible that the call is transferred to another channel?<br>
<br>
Channel 1 : XXXXXXX1 "Main Number"<br>
Channel 2 : XXXXXXX2 "other"<br>
Channel 3 : XXXXXXX3 "other"<br>
Channel 4 : XXXXXXX4 "other"<br>
<br>
regardss<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
rickygm<br>
<br>
<a href="http://gnuforever.homelinux.com" target="_blank">http://gnuforever.homelinux.com</a><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein</div>
</div>