; 2003-02-21 05:30 GMT jtodd@loligo.com ; ; This is the extensions.conf file for John Todd's Asterisk ; server. Asterisk can be found on http://www.asterisk.org/ ; ; More recent versions of this file can be found on: ; http://www.loligo.com/asterisk/ ; ; To view this file with none of my comments, simply use ; grep -v \; extensions.conf ; to remove comments. I only create comments one per ; line, even though trailing comments are permitted. ; ; This file determines where calls are routed when they are ; handed to Asterisk by one of various VOIP or analog call ; presentation channels. Configuration for those channels ; are found elsewhere in the /etc/asterisk directory, and ; examples can be found in my directory, listed above. ; ; I claim no special expertise in Asterisk; I simply have been ; beating my head against it for month or two in my spare ; time and getting my home/office phones worked out to a ; reasonably understandable call path for the five ; inbound/outbound call channels I find myself using. ; ; Many of you will be interested in the SIP features of this ; configuration example. Note that the SIP functionality ; as of mid-February 2003 is functional, but not robust. ; There are problems with various SIP servers with the REGISTER ; process, and quite a few bugs are still floating in the ; code. It works, but watch carefully for the first few ; days to ensure no unpleasant surprises. Running a background ; daemon that ensures that asterisk is running is a good ; idea. ; ; This configuration (and all supporting files) assumes the ; use of an X100P analog FXO card, BUT IT IS NOT REQUIRED. ; I use the card to terminate my house line and weave it into ; the dialplans below. It can be removed without much ; difficulty. For details on the ~$100 card, see: ; http://www.digium.com/ ; ; Config notes: ; - in /usr/src/zaptel/Makefile, set KFLAGS+=-DECHO_CAN_MARK2 ; - in /usr/src/zaptel/Makefile, set KFLAGS+=-DAGGRESSIVE_SUPPRESSOR ; ; ; Known Bugs, Problems, Weirdnesses, etc.: ; ; 1) ATA-186 phones fail to stay registered. Something within ; Asterisk is causing ATA-186 phones to stop sending REGISTER ; requests after ~2 hours. Experiments with 30 through 240 ; second timeouts on the ciscos have similar results. Phone ; registry times out, calls fail. ; ; 2) Multiple ACK messages to certain SIP servers (FWD notably) ; - doesn't break anything, but why does it send ~8 ACKs to a ; successful registry? Lots of fluff traffic. ; ; 3) DTMF relay through ATA-186 phones on SIP calls. I'm ; uncertain if this is an ATA-186 issue or not; some in-depth ; prodding seems to show that it's an Asterisk problem, or lack ; of a feature. DTMF reaches Asterisk, codes are shown on the ; console (in-band RFC2833) but are not played out the remote ; SIP channel; only slight garbled noise is heard. Analog ; replay works fine (ATA -> Asterisk -> X100P) Perhaps an ; origination problem with RFC2833 in-band signalling within ; Asterisk. I've tried changing to in-band signalling on the ; ATA-186 (AudioMode: 0x00050005) without success as well. ; 2003-02-17: calls originating with PSTN -> iconnect -> * -> ATA ; seem to transmit DTMF correctly in the ATA -> * -> ... ; direction. Just when calls are originated with the ATA ; does DTMF not get sent from the ATA, so this is looking ; more like an * problem. ; 2003-02-19: not so fast. I can hear the DTMF from inbound ; calls via SIP, but * is not recognizing the tones. Thus, ; DTMF transmission and reception does not seem to work for me. ; ; 4) Calls via certain SIP servers fail if the calling party is ; an ATA-186 on both sides, seems to be an Asterisk issue. I ; can reproduce. ; ; 5) Calls made back to oneself from a remote SIP server ; crashes Asterisk. ; 2003-02-17: fixed, thanks Mark. ; ; 6) SIP register= commands are only in the general context, ; preventing directive actions on inbound SIP calls. This is a ; major issue, since a large number of PBX functions rely upon ; what number the caller was dialing. ; 2003-02-17: woo woo! Fixed, with extension-specific routing. ; ; 7) Timers for register= commands should be selectable on a ; per-service basis. ; ; 8) Asterisk crashes during remote REGISTER processes which ; have odd timing. ; ; . ; . ; . ; NOTICE[5126]: File chan_sip.c, Line 1763 (sip_reg_timeout): Registration timed out, trying again ; NOTICE[5126]: File chan_sip.c, Line 1763 (sip_reg_timeout): Registration timed out, trying again ; NOTICE[5126]: File chan_sip.c, Line 1763 (sip_reg_timeout): Registration timed out, trying again ; NOTICE[5126]: File chan_sip.c, Line 2728 (handle_response): Registration successful ; NOTICE[5126]: File chan_sip.c, Line 2729 (handle_response): Cancelling timeout 2232 ; NOTICE[5126]: File sched.c, Line 247 (ast_sched_del): Attempted to delete non-existant schedule entry 2217! ; !! Forcing immediate crash a-la abort !! ; Segmentation fault ; ; ; 9) REGISTER attempts to Vocal server (v1.4) fail with "404 ; Not Found" errors, despite correct entries (which work with ; ATA-186). Perhaps notable is that even though a "404" error ; has been returned, and confirmation of failure has been ; printed on console, this is shown in a continuous loop on the ; console afterwards: ; ; NOTICE[5126]: File chan_sip.c, Line 1763 (sip_reg_timeout): Registration timed out, trying again ; WARNING[5126]: File chan_sip.c, Line 283 (__sip_xmit): sip_xmit of 0x42c56480 (len 306) to 0.0.0.0 returned -1: Invalid argument ; ; ; 9) Calls to Free World Dialup (FWD) seem to fail almost all the time. ; This may not be an Asterisk problem. ; ; 10) I have a bunch of feature requests, but it's not worth listing ; them here. ; ; ; To-Do: ; - handle international ("011") calls ; - get the telezapper function running to kill off spam calls ; - call transfer/hold need to happen ; - get one-key conference going between extensions so we ; can talk to friends/relatives on different phones but ; without complexity of meeting rooms ; - get callers without caller ID to enter a jail first ; where they enter caller ID or are disconnected (sdjernes' AGI) ; - create external gateway for access to voicemail system ; - create external gateway to DISA (so I can call Asterisk ; from my cell phone, and dial to SIP peers) ; - create quantum teleporter; achieve financial independence ; - get new recordings from Allison Smith for extended IVR menus ; (http://www.theivrvoice.com/) ; ; Thanks to: Mark Spencer, Nathan Lutchansky, Martin Pycko, ; Tim Stewart, and the Open Source Asterisk development team for putting ; up with my questions, adding featuers, and dealing with ; my bug discoveries. ; ; ; The "General" category is for certain variables. All other categories ; are interpreted as extension contexts ; [general] ; ; If static is set to no, or omitted, then the pbx_config will rewrite ; this file when extensions are modified. Remember that all comments ; made in the file will be lost when that happens. ; ; XXX Not yet implemented XXX ; static=yes ; ; if stati=yes and writeprotect=no, you can save dialplan by ; CLI command 'save dialplan' too ; writeprotect=no ; The [globals] context is where you can set variables that ; can be referenced elsewhere in the dialplan with ${VARIABLE} ; ; I decided that for ease of reference, I should create a variable ; called "PHONE1" that I could set to the phone where I normally ; am found. I then set "ME" to be my extention, raw, for use ; with voicemail forwarding. ; ; Variable "PHONE2" is the other ATA-186 in the house. ; ; Variable "DIALOUTANALOG" is the analog interface (FXO) card ; in the PC on my desk. See zapta.conf for config details. ; ; Variable "FWDUSERID" is my User ID from Free World Dialup. ; ; I create variables here so that if I decide to update my ; extensions list, or my dial-out interface list, it's just ; a simple variable change here at the top of the file. ; [globals] ME=2203 PHONE1=SIP/2203 PHONE2=SIP/2204 DIALOUTANALOG=Zap/1 MYCELLPHONE=13015551212 FWDUSERID=18438 ICONNECT1=141555566666 MYNAME=John Todd MYASN=65000 ; Any context starting with "macro-" is treated as ; a macro. Since I dial out through iconnect fairly ; frequently, I'll create a macro here for that routine. ; Note that I have to strip off any unwanted prefix ; characters before I call this macro, since iconnect ; only wants numbers in the form 1xxxyyyzzzz ; ; The system plays back an invalid extension recording if ; for some reason the call fails or errors out. ; ; I haven't yet encountered calling someone who has had ; a busy signal. I am uncertain what will happen with ; the "busy" logic I put in, but I figured I'd throw ; it in there anyway to give the correct response to ; the user. ; ; This macro takes two arguments: ARG1 is the phone number ; to be dialed (including leading "1") and ARG2 is the ; number of seconds that we should wait for an answer. ; [macro-dialiconnect] exten => s,1,SetCallerID(${ICONNECT1}) exten => s,2,SetCIDName(${MYNAME}) exten => s,3,Dial(SIP/${ARG1}@iconnect,${ARG2}) exten => s,4,Playback(invalid) exten => s,5,Hangup exten => s,104,Playtones(busy) exten => s,105,Wait,30 exten => s,106,Hangup ; When I dial something that throws an error, I expect ; to get a re-order (fast busy) tone. There are exceptions ; to this: when I dial a SIP number that is unknown, I get a ; "404" error (usually) so this macro is suited to all cases. ; [macro-fastbusy] exten => s,1,Answer exten => s,2,Wait 1 exten => s,3,Playtones(congestion) exten => s,4,Wait(20) exten => s,5,Hangup ; The [intern] context is where I pass all calls ; that are dialed by the SIP phones in my house/office. ; I name these phones in the sip.conf file when I define the ; SIP peers. ; ; [intern] ; Handle calls to the Operator ("0") ; ; All Operator calls go to the analog line, since ; that is the only place that there is an operator ; on duty. At some point, this extension will lead ; a particular person in the office. ; ; Note that one can reach the operator by dialing "90" ; according to the pattern sets below, but I include ; just a single "0" as this system will be used by ; persons who are not used to dialing prefixes for ; their phone calls. ; ; I have to build an international dialing plan ; shortly to use a different iconnect account, which ; has international rate plans. Currently, the system ; simply does not allow interational dialing (011...) ; unless it's sent out to the local analog via the "9" ; prefix below. ; exten => 0,1,Dial(${DIALOUTANALOG}/${EXTEN},70) exten => 0,2,Macro(fastbusy) exten => 0,102,Playback(ss-noservice) exten => 0,103,Macro(fastbusy) ; EMERGENCY OUTBOUND ; ; United States dialing supports "911" emergency calls ; which are routed to the "closest" emergency contact center. ; ; Of course, you need to make sure that the center to which ; you are connecting is actually able to do something useful ; for the dialer; it doesn't make sense to have your NY branch ; offices dialing a 911 center in San Francisco. ; ; Note: The ATA-186 is auto-configured to send "911" ; directly to the SIP server with no delay. Be very, very ; careful when experimenting with this - the system does not ; follow standard rules with 911 calls. ; ; If you're !(USA), feel free to comment this line out entirely. ; exten => 911,1,Dial(${DIALOUTANALOG}/${EXTEN}) exten => 911,2,Macro(fastbusy) ; This is for failure-case outbound dialing. If for some reason ; the outbound SIP connections aren't working, but aren't giving errors ; (i.e.: my path to larger Internet is dead) then I can short-circuit ; my way to the local analog dial port by dialing "91npaxxxyyyy" and ; the call will be shunted out the analog port. This is for when ; the inevitable cry of "IT DOESN'T WORK!!" bellows from the living room. ; ; If something is horribly wrong on the outbound line, play an ; "invalid call" message and then hangup ; exten => _9.,1,Dial(${DIALOUTANALOG}/${EXTEN-1},70) exten => _9.,2,Macro(fastbusy) exten => _9.,102,Macro(fastbusy) ; Next, look to see if it's an INOC-DBA number. All INOC-DBA ; dial strings are dialed like this: 812345*223 where 12345 is ; the AS of the recipient and 223 is the extension of the person ; with whom I wish to speak. ; ; If any numbers begin with an "8" character, they are pointed ; at the INOC-DBA SIP server. The ${EXTEN-1} serves to strip ; the first digit from the dialed string out (the "8" in this ; case.) I could have done the same thing with the StripMSD,1 ; application, but that just adds another step in the dial ; process. ; ; NOTE: It is important to use SetCallerID first, THEN use ; the SetCIDName application, or data is lost. Bug. ; ; NOTE: If the INOC-DBA server responds with a "404 Not Found" ; error during the dial, the call will be returned and sent ; to step #4, which plays an "invalid extension" message. ; A 404 error can be due to someone's phone not being currently ; registered with INOC-DBA, or just a completely bogus and ; unknown number - there is no way to tell which caused the ; error reply. ; exten => _8.,1,SetCallerID(${MYASN}) exten => _8.,2,SetCIDName(${MYNAME}) exten => _8.,3,Dial(SIP/${EXTEN-1}@inoc-dba) exten => _8.,4,Playback(invalid) exten => _8.,5,Hangup ; Check to see if the called number starts with a "7" and ; if so, set the call parameters and bounce the call to the ; Free World Dialup SIP server. ; ; Someone said that the CallerID and CIDName needed to be changed ; for FWD, so I did. Doesn't seem to cause harm, so... ; ; NOTE: Calls to unknown users will result in "invalid extension" ; message being played. ; exten => _7.,1,SetCallerID(${FWDUSERID}) exten => _7.,2,SetCIDName(${FWDUSERID}) exten => _7.,3,Dial(SIP/${EXTEN-1}@fwd) exten => _7.,4,Playback(invalid) exten => _7.,5,Hangup ; Experimental "forced" dialing through iconnect to make calls ; prefixed with "6" go out the iconnect channel. This is to ; test some functionality for inbound connections; feel free ; to comment it out. ; ; Dial out on iconnect and wait for 70 seconds for a connect ; ; If no connection in 70 seconds, jump to fastbusy tone macro ; exten => _61XXXXXXXXXX,1,Macro(dialiconnect,${EXTEN-1},70) exten => _61XXXXXXXXXX,2,Macro(fastbusy) ; Force things out the Coloco connection. I have found that ; I'm doing a lot of weird stuff with testing, so forcing ; calls out various paths for testing is necessary. ; exten => _51XXXXXXXXXX,1,Dial(SIP/${EXTEN-1}@coloco,70) exten => _51XXXXXXXXXX,2,Macro(fastbusy) ; If the user is dialing information (411) then send call ; directly out to the analog line, unless busy, then ; dump at an unavailable recording ; ; If analog line errors out and goes to step 2, play ; fastbusy macro. ; exten => 411,1,Dial(${DIALOUTANALOG}/${EXTEN} exten => 411,2,Macro(fastbusy) exten => 411,102,Playback(ss-noservice) exten => 411,103,Macro(fastbusy) ; Next, check for numbers that are available "locally" out of ; my analog line connected to the house. In area code 503, ; you must dial an area code in front of all numbers, and ; a "1" is not possible in front of local numbers. Annoying. ; ; Thus, this rule matches "15035551212" but will dial "5035551212" ; ; If the first line (DIALOUTANALOG) is busy, then fail over ; and dial out the iconnecthere SIP peer. This ensures harmony ; in the household when She is one one line and I require the phone. :) ; ; Note that the iconnect Dial doesn't strip the first digit, since ; we need the single "1" prefix in those outbound calls. ; ; The list is duplicated for area code "971", which is an overlay ; for 503 ; exten => _1503.,1,Dial(${DIALOUTANALOG}/${EXTEN-1}) exten => _1503.,2,Macro(fastbusy) exten => _1503.,102,Macro(dialiconnect,${EXTEN},70) exten => _1971.,1,Dial(${DIALOUTANALOG}/${EXTEN-1}) exten => _1971.,2,Macro(fastbusy) exten => _1971.,102,Macro(dialiconnect,${EXTEN},70) ; Well, what about calls that are long distance in my local (503) area? ; I handle this by dialing them as "115035551212" and the system will ; then match and remove the first "1" digit. Ugly, but it works. ; ; The question is, of course, "should these go via iconnect"? I don't ; have the costs in front of me, but I may well remove this whole logic ; path once I figure it out. ; ; This rule will match '115036661313" and will dial "15036661313" ; ; Again, fail over to iconnect peer if analog busy, but this time ; we're going to strip the first digit, since "11" is not a valid ; prefix for iconnecthere calls. ; ; If there is some "other" type of error, dump to a fast busy. ; ; The list is duplicated for area code "971", which is an overlay ; for 503. ; ; exten => _11503.,1,Dial(${DIALOUTANALOG}/${EXTEN-1}) exten => _11503.,2,Macro(fastbusy) exten => _11503.,102,Macro(dialiconnect,${EXTEN-1},70) exten => _11971.,1,Dial(${DIALOUTANALOG}/${EXTEN-1}) exten => _11971.,2,Macro(fastbusy) exten => _11971.,102,Macro(dialiconnect,${EXTEN-1},70) ; Dial toll-free numbers (800, 877, 888, 866) from the analog line ; and roll over to iconnect peer if analog is busy. ; ; In case of "other" type of error, dump to a fast busy. ; exten => _1888.,1,Dial(${DIALOUTANALOG}/${EXTEN}) exten => _1888.,2,Macro(fastbusy) exten => _1888.,102,Macro(dialiconnect,${EXTEN},70) exten => _1877.,1,Dial(${DIALOUTANALOG}/${EXTEN}) exten => _1877.,2,Macro(fastbusy) exten => _1877.,102,Macro(dialiconnect,${EXTEN},70) exten => _1866.,1,Dial(${DIALOUTANALOG}/${EXTEN}) exten => _1866.,2,Macro(fastbusy) exten => _1866.,102,Macro(dialiconnect,${EXTEN},70) exten => _1800.,1,Dial(${DIALOUTANALOG}/${EXTEN}) exten => _1800.,2,Macro(fastbusy) exten => _1800.,102,Macro(dialiconnect,${EXTEN},70) ; Now, this is the list of area codes that should be shunted out the SIP ; gateway in Laurel. The area codes of 301, 410, 703, and 240 are "local" ; to the gateway in Laurel, so I select them manually. ; ; See "sip.conf" for details on how I set up the "coloco" SIP peer ; ; If the dial to Coloco fails, then jump to iconnect. ; ; If iconnect fails, dump to fast busy. ; ; I should put a voice announcement in each of these in cases of ; rollover to alternate outbound channels, but I have no decent ; voice clips that have the right message in the right voice. ; I'm taking donations to have Allison Smith do an additional set. ;) ; ; If you have no other SIP peers that have visibility into local ; area codes, feel free to comment these lines out entirely. ; ; I have these commented out but ready to go when someone fixes the ; Vocal REGISTER problems (with Asterisk or Vocal) ; ; 301 is Suburban MD, DC Metro exten => _1301.,1,Dial(SIP/${EXTEN}@coloco) exten => _1301.,2,Macro(dialiconnect,${EXTEN},70) exten => _1301.,3,Macro(fastbusy) ; 410 is Baltimore Metro and Eastern Shore, MD exten => _1410.,1,Dial(SIP/${EXTEN}@coloco) exten => _1410.,2,Macro(dialiconnect,${EXTEN},70) exten => _1410.,3,Macro(fastbusy) ; 703 is Northern Virgina, DC Metro exten => _1703.,1,Dial(SIP/${EXTEN}@coloco) exten => _1703.,2,Macro(dialiconnect,${EXTEN},70) exten => _1703.,3,Macro(fastbusy) ; 240 is Suburban MD, DC Metro overlay exten => _1240.,1,Dial(SIP/${EXTEN}@coloco) exten => _1240.,2,Macro(dialiconnect,${EXTEN},70) exten => _1230.,3,Macro(fastbusy) ; 202 is Washington DC exten => _1202.,1,Dial(SIP/${EXTEN}@coloco) exten => _1202.,2,Macro(dialiconnect,${EXTEN},70) exten => _1202.,3,Macro(fastbusy) ; All other calls that have a "1" at the front are North American ; dialing prefixes, and should be sent to my iconnecthere account. ; ; These guys have a decent deal on LD minutes; something like $4.95 ; for 400 minutes of LD anywhere in the US lower 48 states, and ; they have international plans as well. ; ; They also offer optional inbound dialing; see other parts of ; this config file for notes on that. ; ; see sip.conf for details on configuration of outbound iconnecthere ; SIP peer ; exten => _1XXXXXXXXXX,1,Macro(dialiconnect,${EXTEN},70) exten => _1XXXXXXXXXX,2,Macro(fastbusy) exten => _1XXXXXXXXXX,103,Macro(fastbusy) ; Include the "local" set of extensions, so that phones ; on the desktop can dial each other, and voicemail, and ; whatever other "general" services are offered by Asterisk. ; include => local ; end of [intern] context ; The [inbound-analog] context is where calls coming in from the ; zaptel X100P analog circuit are passed. Right now, this ; is a very simple dial plan that rings my two SIP phones. ; ; If the line rings for >20 seconds, dial the "u"navaialable voicemail box. ; If the line is busy, dial the "b"usy voicemail box. ; ; ; See the file zapata.conf for how to configure the Zaptel X100P ; to forward calls to this context when called ; [inbound-analog] exten => s,1,Dial(${PHONE1}&${PHONE2},15) exten => s,2,Wait,2 exten => s,3,Voicemail(u${ME}) exten => s,4,Hangup exten => s,102,Wait,2 exten => s,103,Voicemail(b${ME}) exten => s,104,Hangup ; All inbound SIP gateways (FWD, inoc-dba, iconnect, etc.) will ; be pointed at this context from sip.conf ; ; All these calls go right to extension 2203. In the near future, ; I will change this to a recorded greeting before transfer, or ; perhaps put the caller in phone-jail for a little while or ; maybe forward to my cell phone. ; [from-sip] ; Calls inbound from iconnect come here, as they will hit the Asterisk ; server with "my" number as the inbound called-ID. ; ; NOTE: The transfer to my cell phone only rings for 20 seconds, which ; is not enough time for the voicemail on my phone to pick up. I want ; callers to get the voicemail from asterisk instead of my 'real' voicemail ; on the cellphone. ; ; If my desk phone is busy in step #1, jump right to voicemail since that ; means that I'm doing something at my desk, and sending them to my cell phone ; would just be an interruption. ; exten => 14155556666,1,Dial(${PHONE1},10) exten => 14155556666,2,Playback(transfer) exten => 14155556666,3,Macro(dialiconnect,${MYCELLPHONE},20) exten => 14155556666,4,Voicemail(u${ME}) exten => 14155556666,5,Hangup exten => 14155556666,102,Voicemail(b${ME}) exten => 14155556666,103,Hangup ; Inbound calls from INOC-DBA SIP peer ; are routed to this extension. See sip.conf ; for more details on INOC-DBA peer. ; My AS number is 65000, so any inbound ; calls for that extension should end up ; on $PHONE1 (2203) which is my desk ATA-186 ; ; NOTE: The transfer to my cell phone only rings for 20 seconds, which ; is not enough time for the voicemail on my phone to pick up. I want ; callers to get the voicemail from asterisk instead of my 'real' voicemail ; on the cellphone. ; ; If my desk phone is busy in step #1, jump right to voicemail since that ; means that I'm doing something at my desk, and sending them to my cell phone ; would just be an interruption. ; exten => 65000,1,Dial(${PHONE1},10) exten => 65000,2,Playback(transfer) exten => 65000,3,Macro(dialiconnect,${MYCELLPHONE},20) exten => 65000,4,Voicemail(u${ME}) exten => 65000,5,Hangup exten => 65000,102,Voicemail(b${ME}) exten => 65000,103,Hangup ; Calls inbound for FWD end up here, since 18438 is my FWD # ; ; I don't bother to forward to my cell phone for these calls. ; ; Currently, audio with the ATA-186 doesn't work,so this ; is pretty much useless unless you're a mime. ; exten => 18438,1,Dial(${PHONE1},15) exten => 18438,2,Voicemail(u${ME}) exten => 18438,3,Hangup exten => 18438,102,Voicemail(b${ME}) exten => 18438,103,Hangup ; My inbound line from Coloco is 2405557777 and that is what ; shows up as the "called" ID when the Cisco passes calls to me. ; Thus, I have to match against that "originally dialed" number ; in this context, since that peer will be sending it only. ; ; See the file sip.conf for details on how I configured the ; coloco SIP peer ; ; I play a "Ringing" tone due to some problems with call process ; sounds, but for some reason the Ringing application doesn't ; work either.... hmm... ; exten => 12405557777,1,Ringing exten => 12405557777,2,Dial(${PHONE1},25) exten => 12405557777,3,Voicemail(u${ME}) exten => 12405557777,4,Hangup exten => 12405557777,103,Voicemail(b${ME}) exten => 12405557777,104,Hangup ; The [local] context is where I put all of the locally dialable ; numbers. These entries could be made in each context where I ; reference them, but that would be redundant. ; ; Mostly, they are used from context [intern] right now, but I'm sure ; I'll include them in other contexts later. ; ; Note: due to my wacky/kludgey prefix dialing crap, all the "internal" ; extensions that are local to this system must begin with a "2" ; This means that voicemail, echo, all users, etc. must have an extension ; that starts with the digit "2" or one of the other dialplans will ; snag the call and do whatever with it. This is sub-optimal for a ; system with hundreds of extensions, but for my purposes it works ; just fine. ; ; [local] ; First extension (office) in the house ; ; Note that I try to keep extension names and numbers ; identical. You don't need to be bound to this ; method. ; ; Note that internal extensions do not time out to voicemail. ; exten => 2203,1,Dial(${PHONE1}) exten => 2203,2,Playback(invalid) exten => 2203,3,Hangup exten => 2203,102,Voicemail(2203) exten => 2203,103,Hangup ; This is the second extension in the house ; exten => 2204,1,Dial(${PHONE2}) exten => 2204,2,Playback(invalid) exten => 2204,3,Hangup exten => 2204,102,Voicemail(2204) exten => 2204,103,Hangup ; Dial 2500 from any phone to go to the voicemail system ; exten => 2500,1,VoicemailMain exten => 2500,2,Hangup ; These are my testing extensions. Nothing ; bad will happen if you comment them out. ; exten => 2001,1,Answer exten => 2001,2,Wait,1 exten => 2001,3,Playtones,congestion exten => 2001,4,Wait,20 exten => 2001,5,Hangup