[asterisk-users] Answering the nTh call ...

Danny Nicholas danny at debsinc.com
Tue Jul 7 08:20:21 CDT 2009


Here is a crack at it
[globals]
CALLCOUNT=0
MAXCOUNT=25
[default]
- exten => s,1,answer()
- exten => s,n,Set(GLOBAL(CALLCOUNT)=${CALLCOUNT}+1)
- exten => s,n,Gotoif($["${CALLCOUNT}" = "${MAXCOUNT}"]?callout)
- exten => s,n,Dial(SIP/100,20,m)
- exten => s,n,Hangup
- exten => s,n(callout),Set(GLOBAL(CALLCOUNT)=0)
- exten => s,n,Dial(SIP/200,20,m)
- exten => s,n,Hangup
 

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of J. Oquendo
Sent: Tuesday, July 07, 2009 8:06 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Answering the nTh call ...


Curious to know if anyone's created something similar to the following,
if so and you'd care to share an AGI or dialplan, much appreciated.

I will be eventually write a script to answer the nTH call. (if I can't
find it (why reinvent wheels).

Looking to do some testing sending anywhere between 50-200 calls to a
machine. I'd like a Snom/Polycom/whatever to pick up after the nTh call
where nTh is whatever I set it to.

exten => _X.,1,{at_N_amount_of_rings}
exten => _X.,2,Dial(SIP/${EXTEN}@somwhere,45)

So as a script it would be something like: if call != 25th ; then go
elsewhere ; fi (make sense?) Where every 25th call or so would go
through, the others would go wherever, not important.

-- 

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
J. Oquendo
SGFA, SGFE, C|EH, CNDA, CHFI, OSCP

"It takes 20 years to build a reputation and five minutes to
ruin it. If you think about that, you'll do things
differently." - Warren Buffett

227C 5D35 7DCB 0893 95AA  4771 1DCE 1FD1 5CCD 6B5E
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x5CCD6B5E


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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