[Asterisk-Users] Need Help with Dial Plan

Steven Critchfield critch at basesys.com
Tue Apr 20 08:45:04 MST 2004


I'm top posting just so you have what you said for reference. 

First, you seem to have some circular includes. This is not good. Define
a section for each purpose, and then make aggregate sections where calls
are processed. This keeps you includes limited to the aggregates and
reduces unintended consequences of those extra includes.

Second, I didn't see any place where you had a specific outbound dial
match. Since your did is a wildcard match, did is included by main,
TNE-SG includes main, and default-tne includes TNE-SG, you end up with
that wildcard match everywhere and causes your ills.

So go back and re evaluate how you need to split functionality. Consider
each class of users, inbound callers, outbound caller, and any other
types, then make an context just for their calls which includes the
other contexts they need to get where they need to go.  Ideally you only
need includes for these aggregating contexts and no where else.

On Mon, 2004-04-19 at 20:25, AstGrp wrote:
> Let me lay it out for you....
> 
> Call comes in over a T1 - Signal is em_w.  The extension is seen as
> *<callerid>*<last 4 digits of number being called>*.  Which is fine in
> it self.
> 
> I have my extension.conf file set up as follows...
> 
> 
> [did]
> 
> ; Receive call as *<calling>*<called>
> exten => _.,1,Answer
> exten => _.,2,Cut(CALLING=EXTEN,*,2)
> exten => _.,3,SetCIDNum(${CALLING})
> exten => _.,4,Cut(CALLED=EXTEN,*,3)
> exten => _.,5,Goto(main,${CALLED},1)
> 
> include => main
> 
> [main]
> 
> exten => 0031,1,Answer
> exten => 0031,2,Goto(TNE-SG,s,1)
> 
> Include => did
> include => TNE-SG
> 
> [TNE-SG]
> 
> exten => s,1,Answer
> ;exten => s,2,agi,tne.agi
> exten => s,2,Background(tne-main-thanks)
> exten => s,3,Background(tne-main-menu)
> exten => 1,1,Goto(default-tne,9100,1)
> exten => 2,1,Goto(default-tne,4100,1)
> exten => 3,1,Goto(default-tne,4200,1)
> exten => 4,1,Goto(default-tne,4300,1)
> exten => 5,1,Goto(default-tne,4400,1)
> exten => 6,1,Goto(tne-main-menu,s,3)
> exten => 7,1,Hangup
> 
> include => default-tne
> include => main
> 
> [default-tne]
> 
> include => TNE-SG
> 
> ; Geoff Clark
> exten => 4001,1,Macro(stdexten,4001,SIP/gclark)
> ;exten => 4001,1,Dial(IAX/home:1234 at 69.132.68.17/${EXTEN}@local)
> exten => 4004,1,Macro(stdexten,4004,SIP/home)
> 
> ; Kyle Elworthy
> exten => 4002,1,Macro(stdexten,4002,SIP/kelworth)
> exten => 4003,1,Macro(stdexten,4003,SIP/khome)
> 
> ; Tech Support Agents
> exten => *6,1,AgentCallbackLogin(4001,401 at default-tne)
> exten => *7,1,AgentCallbackLogin(4002,402 at default-tne)
> exten => 401,1,Dial(Zap/g1/7046223905)
> exten => 402,1,Dial(Zap/g1/7049071514)
> 
> exten => 411,1,Answer
> exten => 411,2,Wait,2
> exten => 411,3,Background(auth-thankyou)
> exten => 411,4,Queue(tech-supp)
> 
> Where the problem comes in is - I can dial in fine in this scenerio -
> but when I go to make an outbound call, it calls the did context and
> cut's the call up.  
> 
> My problem appears to be I need it one way but not the other.. I hope
> this makes since...
> 
> Thanks,
> 
> -gcc
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list