[asterisk-dev] Dial() Staggering
Eric "ManxPower" Wieling
eric at fnords.org
Tue Jul 10 15:18:24 CDT 2007
William Moore wrote:
>> Dial() already supports dialing multiple lines at once and connecting the
>> first answered line to the user. I want that exact same functionality but
>> would like to be able to space out (or stagger) the dialing of each line.
>> An example might be I want to dial 5 phone numbers with a wait time of 30
>> seconds. But I want it to try the first number for 2 seconds before
>> starting on the next number. Then at that point it would be ringing 2
>> numbers (with 2 seconds between when each was dialed).
>
> This can be accomplished in the dialplan by calling the first number
> for x seconds (using Dial's timeout option) and when it doesn't
> answer, use a ring group to call several people at once. I admit it's
> not *EXACTLY* what you're looking for, but it is close enough to be
> usable.
>
The line wraps make this suck. Anyway, add a Wait(10) as the first
priority of the main-1 main-2, etc to delay that.
This assume each line appearance is a separate SIP user ID.
exten => 3800,1,Set(CFU_DEST=${DB(${EXTEN}/CFU)})
exten => 3800,2,GotoIf($[${LEN(${CFU_DEST})} =
0]?3:toll-access,${CFU_DEST},1)
exten =>
3800,3,Dial(Local/main-1 at extensions&Local/main-2 at extensions&Local/main-3 at extensions,24)
exten => 3800,4,Voicemail(3800 at property-services,u)
exten => main-1,1,Dial(SIP/0004f20621b3-b)
exten => main-1,2,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?3:10)
exten => main-1,3,Dial(SIP/0004f20621b3-c)
exten => main-1,4,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?5:10)
exten => main-1,5,Dial(SIP/0004f20621b3-d)
exten => main-1,6,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?7:10)
exten => main-1,7,Dial(SIP/0004f20621b3-e)
exten => main-1,8,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?9:10)
exten => main-1,9,Dial(SIP/0004f20621b3-f)
exten => main-1,10,Hangup
exten => main-2,1,Dial(SIP/0004f2062301-b)
exten => main-2,2,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?3:10)
exten => main-2,3,Dial(SIP/0004f2062301-c)
exten => main-2,4,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?5:10)
exten => main-2,5,Dial(SIP/0004f2062301-d)
exten => main-2,6,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?7:10)
exten => main-2,7,Dial(SIP/0004f2062301-e)
exten => main-2,8,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?9:10)
exten => main-2,9,Dial(SIP/0004f2062301-f)
exten => main-2,10,Hangup
exten => main-3,1,Dial(SIP/0004f2062135-b)
exten => main-3,2,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?3:10)
exten => main-3,3,Dial(SIP/0004f2062135-c)
exten => main-3,4,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?5:10)
exten => main-3,5,Dial(SIP/0004f2062135-d)
exten => main-3,6,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?7:10)
exten => main-3,7,Dial(SIP/0004f2062135-e)
exten => main-3,8,GotoIf($["${DIALSTATUS}" = "BUSY" | "${DIALSTATUS}" =
"CHANUNAVAIL" | "${DIALSTATUS}" = "CONGESTION"]?9:10)
exten => main-3,9,Dial(SIP/0004f2062135-f)
exten => main-3,10,Hangup
More information about the asterisk-dev
mailing list