System information
Time period
(in seconds)
channel_1 channel_2 channel_3
25
30 Hangup()
35
40
In this table, we can see that channel_1 started dialing location SIP/0000FFFF0001 im-
mediately and waited for a period of 20 seconds. After 20 seconds, that Local channel
hung up. Our channel_2 waited for 10 seconds prior to dialing the endpoint DAHDI/
g0/14165551212. There was no maximum time associated with this Dial(), so its dialing
period ended when the master time out of 40 seconds (which we set when we initially
called the Local channels) expired. Finally, channel_3 waited 15 seconds prior to dial-
ing, then dialed SIP/MyITSP/12565551212 and waited for a period of 15 seconds prior to
hanging up.
If we put all this together, we end up with the following dialplan:
[LocalSets]
exten => 107,1,Verbose(2,Dialing multiple locations with time delay)
; *** This all needs to be on a single line
same => n,Dial(Local/channel_1@TimeDelay&Local/channel_2@TimeDelay
&Local/channel_3@TimeDelay,40)
same => n,Hangup()
[TimeDelay]
exten => channel_1,1,Verbose(2,Dialing the first channel)
same => n,Dial(SIP/0000FFFF0001,20)
same => n,Hangup()
exten => channel_2,1,Verbose(2,Dialing the second channel with a delay)
same => n,Wait(10)
same => n,Dial(DAHDI/g0/14165551212)
exten => channel_3,1,Verbose(2,Dialing the third channel with a delay)
same => n,Wait(15)
same => n,Dial(SIP/MyITSP/12565551212,15)
same => n,Hangup()
You’ll see Local channels used throughout this book, for various purposes. Remember
that the intention is simply to perform some dialplan logic from a location where you
can only dial a location, but require some dialplan logic to be executed prior to dialing
the endpoint you eventually want to get to. A good example of this is with the use of
the Queue() application, which we’ll discuss in “Using Local Channels” on page 293.
Local Channels | 213