[asterisk-users] situation with ivr and four-channel gateway

John Kiniston johnkiniston at gmail.com
Wed Feb 25 18:23:05 CST 2015


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()

On Wed, Feb 25, 2015 at 2:08 PM, ricky gutierrez <xserverlinux at gmail.com>
wrote:

> Hi list, I need your help ,I have an incoming call x the ivr and the
> operator takes the call. ext "101" , If a second call reenters and the
> operator is talking, I want to send to the extension 102 I use the
> Variable DIALSTATUS , but not working
>
> check IVR
>
> [IVRINMA]
>
> exten => s,1,Wait(1)
> exten => s,n,Set(CHANNEL(language)=es)
> same=> n,Set(TIMEOUT(digit)=4)
> same=> n,Set(TIMEOUT(response)=5)
> same=> n,Wait(1)
> same=> n,Background(/tmp/ivr/menu)
> same=> n,WaitExten(5)
> exten => 0,1,Playback(pls-wait-connect-call)
> exten => 0,n,Goto(operadora,101,1)
> exten => _10[1-3],1,Dial(SIP/${EXTEN},40,t)
> same=> n,Hangup
> exten => i,1,Playback(invalid)
> same=> n,Goto(IVRINMA,s,2)
> exten=> t,1,Dial(SIP/101,38,t)
> exten=> t,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?2,1:)
> exten => 2,1,Dial(SIP/102,38,t)
> same=> n,Hangup()
>
> ## the second option, if possible ###
>
> I have a gw  wiht 4 port gsm , my provider gives me 4 lines and one of
> them is the main , the problem is that all my incoming calls using
> this number and is always busy , and the other three are always free,
> it is possible that the call is transferred to another channel?
>
> Channel 1 : XXXXXXX1 "Main Number"
> Channel 2 : XXXXXXX2 "other"
> Channel 3 : XXXXXXX3 "other"
> Channel 4 : XXXXXXX4 "other"
>
> regardss
>
> --
> rickygm
>
> http://gnuforever.homelinux.com
>
> --
> _____________________________________________________________________
> -- 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
>



-- 
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.
---Heinlein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150225/9e128a8a/attachment.html>


More information about the asterisk-users mailing list