[Asterisk-Dev] Local channel (New subject)

Martin Kihlgren zond at troja.ath.cx
Sat Jan 17 06:32:09 MST 2004


Oops - I had a _lot_ of mail. Disregard my last reply.

On Sat, Jan 17, 2004 at 01:41:29PM +0100, Brancaleoni Matteo wrote:
> 
> > 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
> 
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev

-- 
###################################################################
Fame may be fleeting but obscurity is forever.
###################################################################
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20040117/9fd785b6/attachment.pgp


More information about the asterisk-dev mailing list