[Asterisk-Dev] Local channel (New subject)
Brancaleoni Matteo
mbrancaleoni at espia.it
Sat Jan 17 05:41:29 MST 2004
> Oh, the mysterious local channel again. There's no proper documentation on this
> anywhere. Could someone please take some time to explain when to use the local
> channel and how it works, so we could add this to the Wiki and the docs project?
chan_local is a proxy channel. think about it as a goto with return.
useful when you want to exec an extension in another context, without
exiting from current context, so avoiding duplicate actions.
for example:
[inbound] ; here falls all incoming calls
exten => s,1,Answer
exten => s,2,Dial(local/200 at internals,30,r)
exten => s,3,Playback(sorrynoanswer)
exten => s,4,Hangup
[internal] ; here where our phones falls for default
exten => 200,1,Dial(sip/blah)
exten => 200,102,VoiceMail(${EXTEN}@default)
exten => 201,1,Dial(zap/1)
exten => 201,102,VoiceMail(${EXTEN}@default)
exten => _0.,1,Dial(Zap/g1/${EXTEN:1}) ; outgoing calls with 0+number
so that let me to call a local (internal) extension,
without:
* duplicate the dial & voicemail statements
* don't letting them to dial out, since in internal
context I have the possibility to dialout.
This is a very quick & bad example... others may follow.
however, think at it as a goto with return.
matteo
--
Brancaleoni Matteo <mbrancaleoni at espia.it>
Espia - Emmegi Srl
More information about the asterisk-dev
mailing list