; 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. ![]()
;
; I have split “from-sip” into two components due to the programmatic
; requirements of the “Goto” statement. Before any phone call is
; handled, I do some housekeeping and variable setting on the call.
; Future expansion in this area might be a call to a big LED board
; on my wall that announces the caller ID, or a synthesized voice
; that announces caller ID over a speaker, or whatever. The current
; option here is the “record the call” option, which I’ve commented
; out and put a “NoOp” in it’s place.
; Essentially, the Goto resets the priority and extension to which
; the call is sent.
;
[from-sip]
exten => _.,1,NoOp
;exten => _.,1,Macro(record-on,${EXTEN},${CALLERIDNUM})
exten => _.,2,Goto(from-sip-post,${EXTEN},1)
[from-sip-post]
; Handle hangup routines to clean up recording files when we close
; the call out if that was turned on…
;
exten => h,1,Macro(record-cleanup)
; Now, what do we do with the incoming SIP calls? We parse them
; based on the number that the SIP peer says they’re calling.
; From iptel.org
;
exten => 1234567,1,Dial(${PHONE1},10)
exten => 1234567,2,Playback(transfer)
exten => 1234567,3,Macro(dialiconnect,${MYCELLPHONE},20)
exten => 1234567,4,Voicemail(u${PHONE1VM})
exten => 1234567,5,Hangup
exten => 1234567,102,Voicemail(b${PHONE1VM})
exten => 1234567,103,Hangup
; 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 => 14155551212,1,Dial(${PHONE1},20,Ttm)
exten => 14155551212,2,Playback(transfer)
exten => 14155551212,3,Macro(dialiconnect,${MYCELLPHONE},20)
exten => 14155551212,4,Voicemail(u${PHONE1VM})
exten => 14155551212,5,Hangup
exten => 14155551212,102,Voicemail(b${PHONE1VM})
exten => 14155551212,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 32767 (not really), 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 => 32767,1,Dial(${PHONE1},10)
exten => 32767,2,Playback(transfer)
exten => 32767,3,Macro(dialiconnect,${MYCELLPHONE},20)
exten => 32767,4,Voicemail(u${PHONE1VM})
exten => 32767,5,Hangup
exten => 32767,102,Voicemail(b${PHONE1VM})
exten => 32767,103,Hangup
; Calls inbound for FWD end up here, since 11001 is my FWD #
;
; I don’t bother to forward to my cell phone for these calls.
;
exten => 11001,1,Dial(${PHONE1},15)
exten => 11001,2,Voicemail(u${PHONE1VM})
exten => 11001,3,Hangup
exten => 11001,102,Voicemail(b${PHONE1VM})
exten => 11001,103,Hangup
; My inbound line from Coloco is 2402221212 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 well either…. hmm… (bug!)
;
exten => 12402221212,1,Answer
exten => 12402221212,2,Ringing
exten => 12402221212,3,Dial(${PHONE1},25)
exten => 12402221212,4,Playback(new/thk-u-calling-10-20-com)
exten => 12402221212,5,Playback(new/nbdy-avail-to-take-call)
exten => 12402221212,6,Playback(new/someone-will-call-back)
exten => 12402221212,7,Voicemail(u${PHONE1VM})
exten => 12402221212,8,Hangup
exten => 12402221212,104,Voicemail(b${PHONE1VM})
exten => 12402221212,105,Hangup


