; External PSTN (landline) callers ; ================================ [from-pstn-external] exten => s,1,NoOp(Received incoming PSTN connection from unknown peer to ${EXTEN}. Waiting before asnwering..) exten => s,2,Wait(30) exten => s,1,NoOp(PSTN still ringing after wait. Answering..) exten => s,2,Answer() exten => s,3,Goto(from-external,InboundCalls,1) ; For hangups, we hang up. exten => h,1,Hangup() ... [from-external] ; Start monitoring of call, in mux'ed high-quality WAV format exten => InboundCalls,1,Set(CALLFILENAME=${EXTEN:1}-${TIMESTAMP}) exten => InboundCalls,2,Monitor(wav,${CALLFILENAME},m) ; Usually for an inbound call, we want it to go to all the SIP phones in the house exten => InboundCalls,3,Dial(${SIPPHONES},18,r) ; Voicemail if timeout exten => InboundCalls,4,VoiceMail(u100@default) ; Voicemail if unavailable exten => InboundCalls,104,VoiceMail(u100@default) ; I don't think this is needed, but I'll keep it for now exten => InboundCalls,n,Hangup() -- Executing NoOp("SIP/slovinggibbard-2606", "SIP call to 5037152055 (Telasip DID) from Exten: 5037152055") in new stack -- Executing Set("SIP/slovinggibbard-2606", "ORIGEXTEN=5037152055") in new stack -- Executing Goto("SIP/slovinggibbard-2606", "from-external|InboundCalls|1") in new stack -- Goto (from-external,InboundCalls,1) -- Executing Set("SIP/slovinggibbard-2606", "CALLFILENAME=nboundCalls-20060812-080531") in new stack -- Executing Monitor("SIP/slovinggibbard-2606", "wav|nboundCalls-20060812-080531|m") in new stack -- Executing Dial("SIP/slovinggibbard-2606", "SIP/101&SIP/102&SIP/103&SIP/104|18|r") in new stack -- Called 101 Aug 12 08:05:31 NOTICE[6393]: app_dial.c:1029 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) -- Called 103 -- Called 104 -- SIP/101-5f83 is ringing -- SIP/104-1976 is ringing -- SIP/103-d6dd is ringing -- SIP/101-5f83 answered SIP/slovinggibbard-2606 -- Starting simple switch on 'Zap/1-1' == Spawn extension (from-external, InboundCalls, 3) exited non-zero on 'SIP/slovinggibbard-2606' Aug 12 08:05:43 WARNING[6402]: chan_zap.c:6258 ss_thread: CallerID returned with error on channel 'Zap/1-1' -- Executing NoOp("Zap/1-1", "Received incoming PSTN connection from unknown peer to s. Waiting before asnwering..") in new stack -- Executing Wait("Zap/1-1", "5") in new stack -- Executing Goto("Zap/1-1", "from-external|InboundCalls|1") in new stack -- Goto (from-external,InboundCalls,1) -- Executing Set("Zap/1-1", "CALLFILENAME=nboundCalls-20060812-080548") in new stack -- Executing Monitor("Zap/1-1", "wav|nboundCalls-20060812-080548|m") in new stack -- Executing Dial("Zap/1-1", "SIP/101&SIP/102&SIP/103&SIP/104|18|r") in new stack -- Called 101 Aug 12 08:05:48 NOTICE[6402]: app_dial.c:1029 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) -- Called 103 -- Called 104 -- SIP/101-b697 is ringing -- SIP/104-8104 is ringing -- SIP/103-6b0e is ringing == Spawn extension (from-external, InboundCalls, 3) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' -- parse_srv: SRV mapped to host sip.stanaphone.com, port 5060