[Asterisk-Users] 1 extension entry for multiple purposes?

Jerimiah Cole jcole at tularosa.net
Tue Sep 21 07:50:07 MST 2004


Matthew Boehm wrote:

 > Not to flame a respond, but I only count 13 lines, not 200.

It's still obnoxious.

 > All 200 of our extensions need to be seen to the outside world as the
 > same number (212-433-3344) but internally need to be seen as their
 > 4 digit extension which has no outside world mapping (ie: no direct
 > number to extension).
 >
 > Is it possible to have 1 SetCIDNum line for all outgoing calls?

Here's a snippet from my dialplan that does exactly that:

; default context for 7960s
[pbx_tci_out]
include => pbx_tci_internal
include => pbx_tci_topstn

; internal extensions
[pbx_tci_internal]
exten => *101,1,Dial(SIP/pbx_tci_101,20,m)
exten => *101,2,Voicemail(u101 at pbx-tci)
exten => *101,102,Voicemail(u101 at pbx-tci)
exten => *102,1,Dial(SIP/pbx_tci_102,20,m)
exten => *102,2,Voicemail(u102 at pbx-tci)
exten => *102,102,Voicemail(u102 at pbx-tci)
exten => *103,1,Dial(SIP/pbx_tci_103,20,m)
exten => *103,2,Voicemail(u103 at pbx-tci)
exten => *103,102,Voicemail(u103 at pbx-tci)
exten => *104,1,Dial(SIP/pbx_tci_104,20,m)
exten => *104,2,Voicemail(u104 at pbx-tci)
exten => *104,102,Voicemail(u104 at pbx-tci)
exten => *109,1,SetVar(ALERT_INFO=<Bellcore-dr1>)
exten => *109,2,Dial(SIP/pbx_tci_109,10,r)
exten => *109,3,voicemail(u102 at pbx-tci)
exten => *109,103,voicemail(u102 at pbx-tci)
exten => *110,1,Goto(pbx_tci_vm,s,1)
exten => *111,1,VoiceMailMain(s111 at pbx-tci)
exten => *2,1,Voicemailmain(s${CALLERIDNUM})
exten => *2,2,Hangup()
exten => h,1,Hangup()
exten => i,1,Congestion()

; set clid for calls to pstn
[pbx_tci_topstn]
exten => _.,1,SetGroup(pbx_tci)
exten => _.,2,SetCallerID(Tularosa Communications <(505) 439-0200>)
exten => _.,3,SetVar(CALLFILENAME=${EXTEN}-${TIMESTAMP})
exten => _.,4,Monitor(wav,out-${CALLFILENAME},m)
exten => _.,5,Macro(tendigits,${EXTEN},dp_pbx_tci)

When a user dials an internal extension, the default clid info in the
sip.conf is used.  The _. pattern picks up all other extenstions
(external) and set's the clid appropriately.  I even use the internal
clid info to bypass the voicemail prompts.

Jerimiah
Tularosa Communications



More information about the asterisk-users mailing list