[asterisk-users] Simultaneous Ring

Haley,Scott A scott.haley at edwardjones.com
Fri Jul 18 08:01:22 CDT 2014


I have this working but I have one problem. I need to grab values from variables that I have set in the calling context to dial. How would I do that.


[tbs-utils]
exten => s,1,NoOp(Entering tbs-utils for extension ${ARG1})
;Set local variables to be used in the call
same => n,Set(NUMBER=${ARG1})
same => n,Set(GLOBAL(DIALGROUP1)=)
same => n,Set(GLOBAL(DIALGROUP2)=)
same => n,Set(_VM=)
same => n,Set(_TIMER1=)
same => n,Set(_TIMER2=)
same => n,Set(BRANCH=)
same => n,Set(_TO_VM=0)

;Check to see if the Primary SIP trunk is up
same => n,Set(NETWORKSTATUS=${SIPPEER(${GLOBAL(TRUNK1)},status)})

;Setting the TRUNK variable based upon the status of whether Trunk1 is reachable
same => n,Set(TRUNK=${IF($[$[NETWORKSTATUS=UNREACHABLE]]?${GLOBAL(TRUNK2)}:${GLOBAL(TRUNK1)})})

;Calling the agi script
same => n,AGI(agi://localhost/tbs.agi)

;Displaying the values of the variables set in the agi script
same => n,NoOp(Branch number is: ${BRANCH})
same => n,NoOp(DIALGROUP1 is: ${DIALGROUP1})
same => n,NoOp(DIALGROUP2 is: ${DIALGROUP2})
same => n,NoOp(TIMER1 is: ${TIMER1})
same => n,NoOp(TIMER2 is: ${TIMER2})
same => n,NoOp(VM is: ${VM})
same => n,NoOp(TO_VM is: ${TO_VM})

;Check to see if we should go straight to VM
same => n,Gotoif($[${TO_VM} = 1]?200:)

;Dial the primary number and to to the return status
same => n,Dial(Local/Group1-101 at Delay&Local/Group2-101 at Delay,30)
same => n,Hangup();


[Delay]
;Dial Group 1
exten => Group1-101,1,Verbose(2,Dialing Group 1 set of phones ${GLOBAL(DIALGROUP1)})
same => n,Dial(${DIALGROUP1},20,t)

;Dial Group 2
exten => Group2-101,1,Verbose(2,Dialing Group2 set of phones)
same => n,Verbose(2, Waiting 10 seconds before dialing)
same => n,Wait(10)
same => n,Dial(${DIALGROUP2},${TIMER2},t)




Thanks,
Scott Haley
5-2244

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Haley,Scott A
Sent: Thursday, July 17, 2014 6:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Simultaneous Ring

Thanks AJ, this sounds like what I need.

Thanks,
Scott Haley





If you are not the intended recipient of this message (including attachments), or if you have received this message in error,  immediately notify us and delete it and any attachments.

If you do not wish to receive any email messages from us, excluding administrative communications, please email this request to messages at edwardjones.com along with the email address you wish to unsubscribe.

For important additional information related to this email, visit www.edwardjones.com/US_email_disclosure. Edward D. Jones & Co., L.P. d/b/a Edward Jones, 12555 Manchester Road, St. Louis, MO 63131 © Edward Jones. All rights reserved.


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of A J Stiles
Sent: Thursday, July 17, 2014 2:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Simultaneous Ring

On Wednesday 16 Jul 2014, Haley,Scott A wrote:
> I have a need to issue a dial command to a number:
>
> same => n,Dial(${DIALGROUP1},${TIMER1},t)
>
> After a number of seconds, let's say 10 seconds. I want to dial 
> another set of numbers while continuing to ring, or interrupting the 
> first group of numbers.
>
> same => n,Dial(${DIALGROUP2},${TIMER1},t)
>
> Is there a way to do this without interrupting the first call?

This sounds exactly like the sort of situation for which local channels were invented .....

Dial(${DIALGROUP1}&LOCAL/foo at bar) with a longer timeout than 10 seconds.  Then in your local channel, wait 10" and Dial(${DIALGROUP2}).  The first Dial() will be satisfied when someone answers either a phone in dial group 1, or a phone in dial group 2 set ringing by the Dial() in the local channel.

--
AJS

Note:  Originating address only accepts e-mail from list!  If replying off- list, change address to asterisk1list at earthshod dot co dot uk .

--
_____________________________________________________________________
-- 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
--
_____________________________________________________________________
-- 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


More information about the asterisk-users mailing list