login | register
Sat 17 of May, 2008 [07:14 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.40s
  • Memory usage: 2.22MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 0.61

Asterisk local channels

Local channel


chan_local is a pseudo-channel. Use of this channel simply loops calls back into the dialplan in a different context. Useful for recursive routing; it is able to return to the dialplan after call completion.

Syntax:

 Local/extension@context[/n]

Adding "/n" at the end of the string will make the Local channel not do a native transfer (the "n" stands for "n"o release) upon the remote end answering the line. This is an esoteric, but important feature if you expect the Local channel to handle calls exactly like a normal channel. If you do not have the "no release" feature set, then as soon as the destination (inside of the Local channel) answers the line, the variables and dial plan will revert back to that of the original call, and the Local channel will become a zombie and be removed from the active channels list. This is desirable in some circumstances, but can result in unexpected dialplan behavior if you are doing fancy things with variables in your call handling.


Purpose:

The Local channel construct can be used to establish dialling into any part of the dialplan.

Imagine you have a TE410P in your box. You want to do something for which you must use a Dial statement (for instance when dropping files in /var/spool/outgoing) but you do want to be able to use your dialplans least-cost-routes or other intelligent stuff. What you could do before we had chan_local was create a cross-link between two ports of the TE410P and then Dial out one port and in the other. This way you could control where the call was going.

Of course, this was a nasty hack, and to make it more sensible, chan_local was built.

The "Local" channel driver allows you to convert an arbitrary extension into a channel. It is used in a variety of places, including agents, etc.

Here are some examples (primarily using conferencing) where it might be useful:
  • Suppose you wanted to build a web GUI for building conferences... You could make your script ask for what number to call and use Local/number@context as the channel in your .call file, and set the conference as the extension to go to.
  • Imagine you had a conference going on and you wanted to be able to add someone in sales. You could use Local/salesexten@context as the channel to add to the conference, which would then ring everyone in sales.
  • Imagine you wanted to link two conferences together.
  • Imagine you wanted to add MusicOnHold to a conference.
  • You'd like to use .call files for automated dialling and still want to make sure that a CDR record = log entry gets created

This also allows us to hop to contexts like a GoSub routine; See examples below.

Examples:


[inbound]
; here falls all incoming calls
exten => s,1,Answer
exten => s,2,Dial(local/200@internals,30,r)
exten => s,3,Playback(sorrynoanswer)
exten => s,4,Hangup

[internals]
; 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.

Caveats:

If you use chan_local from a call-file and you want to pass channel variables into your context, make sure you append the '/n', because otherwise chan_local will 'optimize' itself out of the call-path, and the variables will get lost. i.e.

 Local/00531234567@pbx becomes Local/00531234567@pbx/n

See also



Go back to Asterisk channels

Created by oej, Last modification by srt on Wed 18 of Apr, 2007 [16:34 UTC]

Comments Filter

DIALSTATUS after dialing a Local channel

by mimmus on Monday 15 of January, 2007 [14:11:55 UTC]
What's the destiny of DIALSTATUS variable after dialing a Local channel?
If I have:

exten => s,n, Dial(Local/200@context)
exten => s,n,NoOp(${DIALSTATUS})

context
exten => _X.,1,Macro(dundi,${EXTEN})

macro-dundi
include => dundi-lookup

dundi-lookup
switch => DUNDI/priv

I get always CHANUNAVAIL even if dialing ends with NOANSWER or BUSY.

by Artem on Thursday 14 of December, 2006 [09:19:51 UTC]

Re: Linking two conferences together.

by Artem on Thursday 14 of December, 2006 [09:04:26 UTC]
You may do it, particularly, using Manager API. Send Originate Action from channel local:'meetme1 extension' to 'meetme2 extension'. Also you may use Call files for this purpose and probably AGI.

Using local channels for a large page group

by Adam Luker on Saturday 29 of July, 2006 [01:30:42 UTC]
I was trying to set up a paging system in our new building. The problem is that the meetme rooms seem to only allow 64 channels in them, unless I'm just missing something, and we have about 120 users here. So paging everybody at once was going to be a problem.<p>

I had already created different paging areas, though (for example, group 68 is the marketing group, so you can dial 768 and only page them), and it was trivial after that to simply page the entire group of paging areas. It's a meetme room full of meetme rooms, each of which has a bunch of users.<p>

Here's how it looks:<p>
<pre>
pagegroup
Note
groups are defined in globals.conf.

Also
condense-group(group) returns the extensions of everyone in the group who is available in CGRP

exten => _7Δ-8]X,1,Macro(condense-group,${EXTEN:1:2})
exten => _7Δ-8]X,n,Page(${CGRP})

exten => 700,1,Set(PageGrp=Local/760@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/761@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/762@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/763@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/764@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/765@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/766@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/767@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/768@pagegroup)
exten => 700,n,Set(PageGrp=${PageGrp}&Local/769@pagegroup)
exten => 700,n,Page(${PageGrp})
</pre>
Of course I could have done all that in one big line, but who wants to read that? Ick. :)<p>

- Adam<p>

PS - I'm obviously not familiar with the syntax of posting comments here... if anybody wants to send a link to instructions, I'd appreciate it. (hlagfarj on gmail)



Originating with Extension/Priority instead of Channel

by harlequin516 on Monday 27 of March, 2006 [04:46:13 UTC]
In normal callouts the channel is the origination side, and the exten/priority is the destination side.

If you want to use an exten for the origination side you do it via a local channel... local/exten@context.
Then you can have control over the dialout from extensions.conf using the dial command with parameters or variables (or referenced agi) .


but...


Okay ya know when you originate a call from astreisk, commonly you need to specify the channel
(zap/1/623666-7777), context(callout), extension (2000), priority(1)
But I want the channel speicied later in the the agi script called from the dialplan.
I was told to use local channel to do this.
The callout file still needs the four parameters as exemplied above.
So I do channel (local/2000@callout), context(callout), extension (2000), priority(1)
Won't this connect two calls to exten 2000 of context callout?
Anyone know what I am talking about/

Linking two conferences together.

by beave on Saturday 04 of June, 2005 [05:22:07 UTC]
The wiki says, "Imagine you wanted to link two conferences together".  Well,  how?  It would seem to me that using the local channel,  you'd hit the exact same problems that you hit using IAX2/SIP.   Meaning,  the "local" channel still operates the same.  How exactly is this suppose to help?  I think this is a very incorrect statement from the author.   I understand the usage and value of local channels,  but it's not going to help "bridge" anything.

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver