Local Call Handling

pbx-local.conf Contains dialplan extensions for extensions and services "local" to the PBX.

In our SIP configuration, the 'default' context= for all extensions is the dialplan [phones]

  • context = phones
1 [phones]
2 include => pbxlocal
3 include => conferences
4 include => branches
5 
6 [pbxlocal]
7 include => pbxlocal_services
8 include => pbxlocal_extensions
1 [pbxlocal_extensions]
2 exten => _10X,1,Gosub(stdexten,${EXTEN},1(,${GLOBAL(CONSOLE)}))
1 [pbxlocal_extensions]
2 exten => _100,1,Gosub(stdexten,${EXTEN},1(,${GLOBAL(CONSOLE)}))
3 exten => _101,1,Gosub(stdexten,${EXTEN},1(,${GLOBAL(CONSOLE)}))
4 exten => _1XX,1,Gosub(stdexten,${EXTEN},1(,${GLOBAL(CONSOLE)}))
1 [pbxlocal_services]
2 exten => *901,1,Goto(diagnostics,s,1)
3 exten => *99,1,VoiceMailMain(${FILTER(0-9,${CALLERID(NUM)})})
1 exten => 110,1,Playback(demo-echotest)
2  same => n,Echo
3  same => n,Playback(demo-echodone)
1 exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
2  same => n,Dial(IAX2/guest@pbx.digium.com/s@default)        ; Call the Asterisk demo
3  same => n,Playback(demo-nogo)          ; Couldn't connect to the demo site
4  same => n,Goto(s,instruct)             ; Return to the start over message.
1 [conferences]
2 include => addcaller
3 exten => _6XX,1,Answer()
4  same => n,Set(CONFBRIDGE(user,announce_join_leave)=yes)
5  same => n,Set(CONFBRIDGE(user,startmuted)=yes)
6  same => n,ConfBridge(${EXTEN})
7 
8 [addcaller]
9 exten => 1,1,Originate(SIP/otherpeer,exten,conferences,100,1)

-- complete

 1 [phones]
 2 include => pbxlocal
 3 include => conferences
 4 include => branches
 5 
 6 [pbxlocal]
 7 include => pbxlocal_services
 8 include => pbxlocal_extensions
 9 
10 [pbxlocal_extensions]
11 exten => _550X,1,Gosub(stdexten,${EXTEN},1(,${GLOBAL(CONSOLE)}))
12 
13 [pbxlocal_services]
14 exten => *901,1,Goto(diagnostics,s,1)
15 exten => *99,1,VoiceMailMain(${FILTER(0-9,${CALLERID(NUM)})})
16 
17 exten => 110,1,Playback(demo-echotest)
18  same => n,Echo
19  same => n,Playback(demo-echodone)
20 
21 exten => 600,1,Playback(demo-echotest)
22  same => n,Echo
23  same => n,Playback(demo-echodone)
24 
25 ;
26 ; Requires: Internet, IAX2 module
27 ;
28 exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
29  same => n,Dial(IAX2/guest@pbx.digium.com/s@default)        ; Call the Asterisk demo
30  same => n,Playback(demo-nogo)          ; Couldn't connect to the demo site
31  same => n,Goto(s,instruct)             ; Return to the start over message.
32 
33 [conferences]
34 include => addcaller
35 exten => _6XX,1,Answer()
36  same => n,Set(CONFBRIDGE(user,announce_join_leave)=yes)
37  same => n,Set(CONFBRIDGE(user,startmuted)=yes)
38  same => n,ConfBridge(${EXTEN})
39 
40 [addcaller]
41 exten => 1,1,Originate(SIP/otherpeer,exten,conferences,100,1)
42 <!--(end)-->