ricky gutierrez
2015-Feb-25 21:08 UTC
[asterisk-users] situation with ivr and four-channel gateway
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
John Kiniston
2015-Feb-26 00:23 UTC
[asterisk-users] situation with ivr and four-channel gateway
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>
Steve Edwards
2015-Feb-26 03:01 UTC
[asterisk-users] situation with ivr and four-channel gateway
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
ricky gutierrez
2015-Feb-26 15:54 UTC
[asterisk-users] situation with ivr and four-channel gateway
2015-02-25 18:23 GMT-06:00 John Kiniston <johnkiniston at gmail.com>:> 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() >Hi john and Steve , I do tests with advice -- rickygm http://gnuforever.homelinux.com
A J Stiles
2015-Feb-26 16:45 UTC
[asterisk-users] situation with ivr and four-channel gateway
On Wednesday 25 Feb 2015, ricky gutierrez wrote:> 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"You just need to use call groups. In your chan_extra.conf (if it's an OpenVox) or chan_dahdi.conf, add something like group=1 to the definition for each span. Now in the [globals] section of your dialplah, have something like MOBILE=EXTRA/r1 for an OpenVox card, or MOBILE=DAHDI/r1 for other makes. Now you need your Dial() statements to be something like Dial(${MOBILE}/${EXTEN},180 Calls will then be made by trying each span in turn until an available one is found. So if you have an incoming call on span 1, Asterisk will try spans 2, 3 and 4 in turn before giving up. It also will remember which span it used last, and start with the next one next time; so the calls should be distributed roughly evenly across your SIMs. For more information about this (and some other modes you can use which do slightly different things than "r"), see http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels (yes, it refers to Zaptel; but the syntax is the same for DAHDI and EXTRA channels). -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
ricky gutierrez
2015-Feb-26 22:52 UTC
[asterisk-users] situation with ivr and four-channel gateway
2015-02-26 10:45 GMT-06:00 A J Stiles <asterisk_list at earthshod.co.uk>:> > You just need to use call groups. > > In your chan_extra.conf (if it's an OpenVox) or chan_dahdi.conf, add > something like > group=1 > to the definition for each span. > > Now in the [globals] section of your dialplah, have something like > MOBILE=EXTRA/r1 > for an OpenVox card, or > MOBILE=DAHDI/r1 > for other makes. Now you need your Dial() statements to be something like > Dial(${MOBILE}/${EXTEN},180 > > Calls will then be made by trying each span in turn until an available one is > found. So if you have an incoming call on span 1, Asterisk will try spans 2, > 3 and 4 in turn before giving up. It also will remember which span it used > last, and start with the next one next time; so the calls should be > distributed roughly evenly across your SIMs. > > For more information about this (and some other modes you can use which do > slightly different things than "r"), see > http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels > (yes, it refers to Zaptel; but the syntax is the same for DAHDI and EXTRA > channels). >Hi A J , I have a sangoma gsm gateway "4"channels , not use chan dahdi http://gnuforever.homelinux.com