Jody Gugelhupf
2007-Aug-28 13:24 UTC
[asterisk-users] calls being forwarded to neighbor?? please help, thx :)
hi ppl :D my configuration is as follows, i run (let's call it machine 2) debian etch 4.0 and asterisk 1.2, i use voiceone (www.voiceone.it) as an interface to manage asterisk, I have a grandstream/handytone 486 as a sip device, no PSTN line or anything like that all SIP only. I have a machine (machine 1), which functions as my router and machine 2 and sip device are behind it, grandstream box has ip 10.0.0.13, asterisk machine (machine 2) has ip 10.0.0.20 and machine one is on 10.0.0.1, which is the connected to internet, anyhow everything is more or less working fine, though sometimes i see strange things in the asterisk CLI, e.g. in the part below there is the line: -- Now forwarding SIP/9083XXX-0816b208 to 'Local/247110358 at DefaultOutgoingRule' (thanks to SIP/486-081d4738) i don't get the 'Local/247110358' part, why the hell is that number there? that is the phone number of my neighbor (though without international code), why is it showing there and trying to forwrd it there? below is the whole CLI output i had when i saw this and furhter down the buttom are my sip.conf and extension.conf, i was also trying to set up my voicemail, but somehow that also doesn't work... anyhow nay help is appreciated, thx a bunch katie-jody :D -- Executing NoOp("SIP/9083XXX-0816b208", "Incoming-s. CallerID:"0031648978254" <0031648978254> - Calling:s") in new stack -- Executing AGI("SIP/9083XXX-0816b208", "incoming.php|answered=s&channel=48&rule=4&uniqueid=1188247273.6") in new stack -- Launched AGI Script /usr/share/asterisk/agi-bin/incoming.php -- AGI Script Executing Application: (macro) Options: (incoming-call-to-extension|SIP/486|30||voiceone/custom/hello) -- Executing NoOp("SIP/9083XXX-0816b208", ""0031648978254" <0031648978254>") in new stack -- Executing Ringing("SIP/9083XXX-0816b208", "") in new stack -- Executing Dial("SIP/9083XXX-0816b208", "SIP/486|30|tw") in new stack -- SIP Seeding peer from astdb: '486' at 486 at 10.0.0.13:5060 for 3600 -- Called 486 -- SIP/486-081d4738 is ringing == Spawn extension (macro-incoming-call-to-extension, s, 3) exited non-zero on 'SIP/9083XXX-0816b208' in macro 'incoming-call-to-extension' == Spawn extension (macro-incoming-call-to-extension, s, 3) exited non-zero on 'SIP/9083XXX-0816b208' -- Executing NoOp("SIP/31247110460-081e3ed8", "Incoming-s. CallerID:"Judit" <31247110570> - Calling:s") in new stack -- Executing AGI("SIP/31247110460-081e3ed8", "incoming.php|answered=s&channel=46&rule=2&uniqueid=1188247365.8") in new stack -- Launched AGI Script /usr/share/asterisk/agi-bin/incoming.php -- AGI Script Executing Application: (macro) Options: (incoming-call-to-extension|SIP/486|||) -- Executing NoOp("SIP/31247110460-081e3ed8", ""Judit" <31247110570>") in new stack -- Executing Ringing("SIP/31247110460-081e3ed8", "") in new stack -- Executing Dial("SIP/31247110460-081e3ed8", "SIP/486||tw") in new stack -- Called 486 -- SIP/486-081e9418 is ringing == Spawn extension (macro-incoming-call-to-extension, s, 3) exited non-zero on 'SIP/31247110460-081e3ed8' in macro 'incoming-call-to-extension' == Spawn extension (macro-incoming-call-to-extension, s, 3) exited non-zero on 'SIP/31247110460-081e3ed8' -- Executing NoOp("SIP/9083XXX-0816b208", "Incoming-s. CallerID:"0031247110570" <0031247110570> - Calling:s") in new stack -- Executing AGI("SIP/9083XXX-0816b208", "incoming.php|answered=s&channel=48&rule=4&uniqueid=1188247411.10") in new stack -- Launched AGI Script /usr/share/asterisk/agi-bin/incoming.php -- AGI Script Executing Application: (macro) Options: (incoming-call-to-extension|SIP/486|30||voiceone/custom/hello) -- Executing NoOp("SIP/9083XXX-0816b208", ""0031247110570" <0031247110570>") in new stack -- Executing Ringing("SIP/9083XXX-0816b208", "") in new stack -- Executing Dial("SIP/9083XXX-0816b208", "SIP/486|30|tw") in new stack -- Called 486 -- SIP/486-081d4738 is ringing -- Got SIP response 302 "Moved Temporarily" back from 10.0.0.13 -- Now forwarding SIP/9083XXX-0816b208 to 'Local/247110358 at DefaultOutgoingRule' (thanks to SIP/486-081d4738) -- Executing AGI("Local/247110358 at DefaultOutgoingRule-aa84,2", "dial.php|entity=&group=5&extension=247110358") in new stack -- Launched AGI Script /usr/share/asterisk/agi-bin/dial.php -- AGI Script Executing Application: (ChanIsAvail) Options: (SIP/31247110460&SIP/9083XXX&SIP/0699291034&SIP/webcalldirectDE&SIP/webcalldirectNL&SIP/iXcall&SIP/messagenet) -- AGI Script Executing Application: (macro) Options: (dialout|247110358) -- Executing Set("Local/247110358 at DefaultOutgoingRule-aa84,2", "TOUCH_MONITOR=20070827-224353_0031247110570-247110358") in new stack -- Executing NoOp("Local/247110358 at DefaultOutgoingRule-aa84,2", "CID_NAME : Katie") in new stack -- Executing NoOp("Local/247110358 at DefaultOutgoingRule-aa84,2", "CID_NUMBER: 0031247110460") in new stack -- Executing NoOp("Local/247110358 at DefaultOutgoingRule-aa84,2", "CID_CLIR : 0") in new stack -- Executing NoOp("Local/247110358 at DefaultOutgoingRule-aa84,2", "TRUNK : SIP/31247110460") in new stack -- Executing Set("Local/247110358 at DefaultOutgoingRule-aa84,2", "CALLERID(name)=Katie") in new stack -- Executing Set("Local/247110358 at DefaultOutgoingRule-aa84,2", "CALLERID(num)=0031247110460") in new stack -- Executing Set("Local/247110358 at DefaultOutgoingRule-aa84,2", "PRESENTATION=allowed_not_screened") in new stack -- Executing SetCallerPres("Local/247110358 at DefaultOutgoingRule-aa84,2", "allowed_not_screened") in new stack -- Executing GotoIf("Local/247110358 at DefaultOutgoingRule-aa84,2", "0?s-CONGESTION|1") in new stack -- Executing Dial("Local/247110358 at DefaultOutgoingRule-aa84,2", "SIP/31247110460/247110358||gTW") in new stack -- Called 31247110460/247110358 -- SIP/31247110460-081d4738 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Executing NoOp("Local/247110358 at DefaultOutgoingRule-aa84,2", "DIALSTATUS = CONGESTION") in new stack -- Executing Goto("Local/247110358 at DefaultOutgoingRule-aa84,2", "s-CONGESTION|1") in new stack -- Goto (macro-dialout,s-CONGESTION,1) -- Executing PlayTones("Local/247110358 at DefaultOutgoingRule-aa84,2", "congestion") in new stack -- AGI Script dial.php completed, returning 0 == Auto fallthrough, channel 'Local/247110358 at DefaultOutgoingRule-aa84,2' status is 'CONGESTION' -- Local/247110358 at DefaultOutgoingRule-aa84,1 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Executing Goto("SIP/9083XXX-0816b208", "s-CONGESTION|1") in new stack -- Goto (macro-incoming-call-to-extension,s-CONGESTION,1) -- Executing Macro("SIP/9083XXX-0816b208", "voicemailbox||voiceone/custom/hello") in new stack -- Executing NoOp("SIP/9083XXX-0816b208", "Answering machine mode: Answer Only or Answer and Record?") in new stack -- Executing GotoIf("SIP/9083XXX-0816b208", "1?answeronly") in new stack -- Goto (macro-voicemailbox,s,16) -- Executing NoOp("SIP/9083XXX-0816b208", "Mode: Answer Only") in new stack -- Executing GotoIf("SIP/9083XXX-0816b208", "0?end") in new stack -- Executing Answer("SIP/9083XXX-0816b208", "") in new stack -- Executing Wait("SIP/9083XXX-0816b208", "1") in new stack -- Executing Playback("SIP/9083XXX-0816b208", "voiceone/custom/hello") in new stack -- Playing 'voiceone/custom/hello' (language 'en') -- Executing NoOp("SIP/9083XXX-0816b208", "end") in new stack -- AGI Script incoming.php completed, returning 0 == Auto fallthrough, channel 'SIP/9083XXX-0816b208' status is 'CONGESTION' wesleypipes*CLI> sip.conf [general] allowoverlap = yes realm = mydomain.tld bindport = 5060 bindaddr = 0.0.0.0 srvlookup = yes tos = lowdelay disallow = all allow = alaw,ulaw,gsm,ilbc,g729 trustrpid = no dtmfmode = auto externip = XXX.XXX.XXX.XXX localnet = 10.0.0.0/255.255.0.0 nat = yes canreinvite = yes rtcachefriends = yes fromdomain = sshn.net qualify = yes register = user:pass at XXXX register = user:pass at webcalldirectDE register = user:pass at webcalldirectNL register = user:pass at iXcall register = user:pass at messagenet register = user:pass at 069929XXXX register = user:pass at 9083XXX extension.conf: [general] static = yes writeprotect = no autofallthrough = yes clearglobalvars = no priorityjumping = no [globals] TRUNKOPTIONS = EMERGENCY = 0 EMERGENCY_TRUNK = TRANSFERS_CTX = DefaultOutgoingRule CALLBACK_CTX = DefaultOutgoingRule DISA_CTX = DefaultOutgoingRule DISA_PASSWD = 1111 DYNAMIC_FEATURES = automon TRUNK SIP/3124XXXXX&SIP/9083XXX&SIP/069929XXXX&SIP/webcalldirectDE&SIP/webcalldirectNL&SIP/iXcall&SIP/messagenet OUTGOING_PREFIX = [_all_] include = _all-extensions_ include = _all-resources_ include = _all-applications_ include = _catch-all_ [_catch-all_] exten = _X.,1,AGI(dial.php|entity=&group=5&extension=${EXTEN}) exten = _X,1,AGI(dial.php|entity=&group=5&extension=${EXTEN}) [app-AgentCallbackLogin_92] exten = *100,1,AGI(dial.php|entity=1&group=6&extension=*100) [_all-applications_] include = app-AgentCallbackLogin_92 include = app-AgentCallbackLogout_94 include = app-audiorecorder include = app-callermailbox include = app-cancel-CFB-calling-extension include = app-cancel-CFNR-calling-extension include = app-cancel-CFU-calling-extension include = app-CFB-calling-extension include = app-CFNR-calling-extension include = app-CFU-calling-extension include = app-dnd-off include = app-dnd-on include = app-mailbox [app-AgentCallbackLogout_94] exten = *101,1,AGI(dial.php|entity=2&group=6&extension=*101) [app-audiorecorder] exten = *99,1,AGI(dial.php|entity=3&group=6&extension=*99) [app-callermailbox] exten = *98,1,AGI(dial.php|entity=4&group=6&extension=*98) [app-cancel-CFB-calling-extension] exten = *91,1,AGI(dial.php|entity=5&group=6&extension=*91) [app-cancel-CFNR-calling-extension] exten = *93,1,AGI(dial.php|entity=6&group=6&extension=*93) [app-cancel-CFU-calling-extension] exten = *73,1,AGI(dial.php|entity=7&group=6&extension=*73) [app-CFB-calling-extension] exten = *90,1,AGI(dial.php|entity=8&group=6&extension=*90) [app-CFNR-calling-extension] exten = *92,1,AGI(dial.php|entity=9&group=6&extension=*92) [app-CFU-calling-extension] exten = *72,1,AGI(dial.php|entity=10&group=6&extension=*72) [app-dnd-off] exten = *79,1,AGI(dial.php|entity=11&group=6&extension=*79) [app-dnd-on] exten = *78,1,AGI(dial.php|entity=12&group=6&extension=*78) [app-mailbox] exten = _*98.,1,AGI(dial.php|entity=13&group=6&extension=_*98.) [macro-agentcallbacklogin] exten = s,1,AgentCallbackLogin(${CALLERID(num)}||${CALLERID(num)}@DefaultOutgoingRule) [macro-agentcallbacklogout] exten = s,1,Answer exten = s,n,System(asterisk -rx "agent logoff Agent/${CALLERID(num)}") exten = s,n,Playback(agent-loggedoff) exten = s,n,Playback(vm-goodbye) [macro-audiorecorder] exten = s,1,AGI(record.php) [macro-reroute] exten = s,1,Goto(${ARG2},${ARG1},1) [macro-callback] exten = s,1,Wait(2) exten = s,n,AGI(agi-callback.agi,${CALLERID(num)},${ARG1},${ARG2},${ARG3}) [macro-cancel-CFB-calling-extension] exten = s,1,DBdel(CFB/${CALLERID(num)}) exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,Playback(call-fwd-on-busy) exten = s,n,Playback(de-activated) [macro-cancel-CFNR-calling-extension] exten = s,1,DBdel(CFNR/${CALLERID(num)}) exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,Playback(call-fwd-no-ans) exten = s,n,Playback(de-activated) [macro-cancel-CFU-calling-extension] exten = s,1,DBdel(CFU/${CALLERID(num)}) exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,Playback(call-fwd-cancelled) [macro-CFB-calling-extension] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,BackGround(ent-target-attendant) exten = s,n,Read(toext,then-press-pound) exten = s,n,Wait(1) exten = s,n,Set(DB(CFB/${CALLERID(num)})=${toext}) exten = s,n,Playback(call-fwd-on-busy) exten = s,n,Playback(for) exten = s,n,Playback(extension) exten = s,n,SayDigits(${CALLERID(num)}) exten = s,n,Playback(is-set-to) exten = s,n,SayDigits(${toext}) [macro-CFNR-calling-extension] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,BackGround(ent-target-attendant) exten = s,n,Read(toext,then-press-pound) exten = s,n,Wait(1) exten = s,n,Set(DB(CFNR/${CALLERID(num)})=${toext}) exten = s,n,Playback(call-fwd-no-ans) exten = s,n,Playback(for) exten = s,n,Playback(extension) exten = s,n,SayDigits(${CALLERID(num)}) exten = s,n,Playback(is-set-to) exten = s,n,SayDigits(${toext}) [macro-CFU-calling-extension] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,BackGround(ent-target-attendant) exten = s,n,Read(toext,then-press-pound) exten = s,n,Wait(1) exten = s,n,Set(DB(CFU/${CALLERID(num)})=${toext}) exten = s,n,Playback(call-fwd-unconditional) exten = s,n,Playback(for) exten = s,n,Playback(extension) exten = s,n,SayDigits(${CALLERID(num)}) exten = s,n,Playback(is-set-to) exten = s,n,SayDigits(${toext}) [macro-conference] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,Set(CONFNO=${IF(${ISNULL(${ARG1})}?${MACRO_EXTEN}:${ARG1})}) exten = s,n,Set(OPTION=${IF(${ISNULL(${ARG2})}?cMps:${ARG2})}) exten s,n,Set(MEETME_RECORDINGFILE=/var/spool/asterisk/meetme/conference-${CONFNO}-${TIMESTAMP}-${UNIQUEID}) exten = s,n,Meetme(${CONFNO}|${OPTION}) exten = s,n,Hangup [macro-dialout] exten = s,1,Set(TOUCH_MONITOR=${TIMESTAMP}_${CALLERID(num)}-${ARG1}) exten = s,n,NoOp(CID_NAME : ${CID_NAME}) exten = s,n,NoOp(CID_NUMBER: ${CID_NUMBER}) exten = s,n,NoOp(CID_CLIR : ${CID_CLIR}) exten = s,n,NoOp(TRUNK : ${TRUNK}) exten = s,n,Set(CALLERID(name)=${CID_NAME}) exten = s,n,Set(CALLERID(num)=${CID_NUMBER}) exten = s,n,Set(PRESENTATION=${IF($["${CID_CLIR}"="1"]?prohib_not_screened:allowed_not_screened)}) exten = s,n,SetCallerPres(${PRESENTATION}) exten = s,n,GotoIf(${ISNULL(${TRUNK})}?s-CONGESTION,1) exten = s,n,Dial(${TRUNK}/${ARG1}${TRUNKOPTIONS}||gTW) ;Ring the interface exten = s,n,NoOp(DIALSTATUS = ${DIALSTATUS}) exten = s,n,Goto(s-${DIALSTATUS},1) ;Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten = s-BUSY,1,Playtones(busy) exten = s-CONGESTION,1,Playtones(congestion) exten = _s-.,1,Goto(s-CONGESTION,1) ;Treat anything else as no answer [macro-dialout-fail-over] exten = s,1,Set(TOUCH_MONITOR=${TIMESTAMP}_${CALLERID(num)}-${ARG1}) exten = s,n,Set(INDEX=1) exten = s,n,NoOp(${TRUNK}) exten = s,n,Set(OUTGOING_CHANNEL=${CUT(TRUNK,&,${INDEX})}) exten = s,n(dial),NoOp(${OUTGOING_CHANNEL}) exten = s,n,Dial(${OUTGOING_CHANNEL}/${ARG1}${TRUNKOPTIONS}||gTW) ;Ring the interface exten = s,n,Goto(s-${DIALSTATUS},1) ;Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten = s-CHANUNAVAIL,1,Set(INDEX=$[${INDEX}+1]) exten = s-CHANUNAVAIL,n,Set(OUTGOING_CHANNEL=${CUT(TRUNK,&,${INDEX})}) exten = s-CHANUNAVAIL,n,GotoIf($["${OUTGOING_CHANNEL}"!=""]?s,dial:s-NOANSWER,1) exten = s-BUSY,1,Playtones(busy) exten = s-CONGESTION,1,Playtones(congestion) exten = _s-.,1,Goto(s-CONGESTION,1) ;Treat anything else as no answer [macro-did] exten = s,1,Set(DESTINATION=${IF(${ISNULL(${ARG1})}?${MACRO_EXTEN}:${MACRO_EXTEN:${ARG1}})}) exten = s,n,Goto(${ARG2},${DESTINATION},1) [macro-DISA] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,GotoIf(${ISNULL(${ARG1})}?setpassword) exten = s,n,Background(${ARG1}) exten = s,n(setpassword),Set(PASSWORD=${IF(${ISNULL(${ARG2})}?no-password:${ARG2})}) exten = s,n,DISA(${PASSWORD},${ARG3}) [macro-dnd-off] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,DBdel(DND/${CALLERID(num)}) exten = s,n,Playback(do-not-disturb) exten = s,n,Playback(de-activated) [macro-dnd-on] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,Set(DB(DND/${CALLERID(num)})=YES) exten = s,n,Playback(do-not-disturb) exten = s,n,Playback(activated) [macro-dialout-emergency] exten = s,1,Background(emergency) exten = s,2,Wait(2) exten = s,3,Set(SET_EMERG_FLAG=0) exten = s,n(checkavail),ChanIsAvail(${EMERGENCY_TRUNK}) exten = s,n,SetGlobalVar(EMERGENCY=1) exten = s,n,Set(SET_EMERG_FLAG=1) exten = s,n,SetCallerPres(allowed) exten = s,n(dial),Dial(${EMERGENCY_TRUNK}/${ARG1}${TRUNKOPTIONS}||gTW) exten = s,s+2(trunkbusy),GotoIf($[${EMERGENCY} = 1]?inprogress) exten = s,n,SoftHangup(${EMERGENCY_TRUNK}|a) exten = s,n,Wait(12) exten = s,n,Goto(checkavail) exten = s,s+2(inprogress),Congestion exten = s,checkavail+101(notavail),Goto(trunkbusy) exten = h,1,GotoIf($[${SET_EMERG_FLAG} = 1]?3) exten = h,3,SetGlobalVar(EMERGENCY=0) [macro-enqueue] exten = s,1,Set(TIMEOUT(digit)=5) exten = s,n,Set(TIMEOUT(response)=10) exten = s,n,GotoIf(${ISNULL(${ARG2})}?defaulttimeout) exten = s,n,NoOp(Timeout: ${ARG2}) exten = s,n,Set(timeout=${ARG2}) exten = s,n,Goto(enqueue) exten = s,n(defaulttimeout),NoOp(Timeout: 180 (default)) exten = s,n,Set(timeout=180) exten = s,n(enqueue),Queue(${ARG1}|tw|||${timeout}) [macro-incoming-call-to-extension] exten = s,1,NoOp(${CALLERID(all)}) exten = s,n,Ringing exten = s,n,Dial(${ARG1},${ARG2},tw) exten = s,n,Goto(s-${DIALSTATUS},1) exten = s-ANSWER,1,Hangup exten = _s-.,1,Macro(voicemailbox,${ARG3},${ARG4}) [macro-incoming-call-to-group] exten = s,1,NoOp(${CALLERID(all)}) exten = s,n,Ringing exten = s,n,Dial(${ARG1},${ARG2},tw) exten = s,n,Goto(s-${DIALSTATUS},1) exten = s-ANSWER,1,Hangup exten = _s-.,1,Macro(voicemailbox,${ARG3},${ARG4}) [macro-incoming-call-to-IVR] exten = s,1,NoOp(${CALLERID(all)}) exten = s,n,Ringing exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,Goto(${ARG1},s,1) [macro-incoming-call-to-queue] exten = s,1,NoOp(${CALLERID(all)}) exten = s,n,Ringing exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,Macro(enqueue,${ARG1},${ARG2}) exten = s,n,GotoIf(${ISNULL(${ARG3})}?end) exten = s,n,Macro(voicemailbox,${ARG4},${ARG5}) exten = s,n(end),Hangup [macro-incoming-call-to-voicemailbox] exten = s,1,Set(TIMEOUT=${IF(${ISNULL(${ARG1})}?30:${ARG1})}) exten = s,n,Wait(${TIMEOUT}) exten = s,n,Macro(voicemailbox,${ARG2},${ARG3}) [macro-localexten] exten = s,1,Dial(${ARG1},,tw) exten = s,n,Goto(s-${DIALSTATUS},1) exten = s-CHANUNAVAIL,1,Set(CURRENT_EXT=${CUT(ARG1,/,2)}) exten = s-CHANUNAVAIL,n,System(asterisk -rx "agent logoff Agent/${CURRENT_EXT}") [macro-pbxstatus] exten = s,1,NoOp(${CALLERID(all)}) exten = s,n,Ringing exten = s,n,NoOp(Checking for PBX status) exten = s,n,GotoIf(${EXISTS(${DB(PBX/OFF)})}?pbx_off:pbx_on) exten = s,n(pbx_on),NoOp(PBX status is ON) exten = s,n,MacroExit exten = s,n(pbx_off),NoOp(PBX status is OFF) exten = s,n,Macro(voicemailbox,${ARG1},${ARG2},${ARG3}) [macro-playivr] exten = s,1,Goto(${ARG1},s,1) [macro-stdexten] ;CFB Call Forwarding Busy ;CFNR Call Forwarding No Reply ;CFU Call Forwarding Unconditional exten = s,1,Set(EXTENSION=${CUT(ARG1,/,2)}) exten = s,n,GotoIf(${EXISTS(${DB(CFU/${EXTENSION})})}?${MACRO_CONTEXT},${DB(CFU/${EXTENSION})},1) ;Get CFU key exten = s,n,GotoIf(${EXISTS(${DB(DND/${EXTENSION})})}?s-BUSY,1) ;Get DND key exten = s,n,Dial(${ARG1},20,gtTwW) ;Ring the interface exten = s,n,Goto(s-${DIALSTATUS},1) exten = s-ANSWER,1,Playtones(congestion) exten s-NOANSWER,1,GotoIf(${EXISTS(${DB(CFNR/${EXTENSION})})}?${MACRO_CONTEXT},${DB(CFNR/${EXTENSION})},1) ;Get CFNR key exten = s-NOANSWER,n,GotoIf(${EXISTS(${DB(VM/${EXTENSION})})}?skip-vm) exten = s-NOANSWER,n,MailboxExists(${EXTENSION}) exten = s-NOANSWER,n,NoOp(MailboxExists(${EXTENSION}): ${VMBOXEXISTSSTATUS}) exten = s-NOANSWER,n,GotoIf($["${VMBOXEXISTSSTATUS}"="SUCCESS"]?:skip-vm) exten = s-NOANSWER,n,Voicemail(u${EXTENSION}) ;If unavailable, send to voicemail w/ unavail announce exten = s-NOANSWER,n(skip-vm),Playtones(congestion) ;If voicemail exited or it doesn't exist, play congestion exten s-BUSY,1,GotoIf(${EXISTS(${DB(CFB/${EXTENSION})})}?${MACRO_CONTEXT},${DB(CFB/${EXTENSION})},1) ;Get CFB key exten = s-BUSY,n,GotoIf(${EXISTS(${DB(VM/${EXTENSION})})}?skip-vm) exten = s-BUSY,n,MailboxExists(${EXTENSION}) exten = s-BUSY,n,NoOp(MailboxExists(${EXTENSION}): ${VMBOXEXISTSSTATUS}) exten = s-BUSY,n,GotoIf($["${VMBOXEXISTSSTATUS}"="SUCCESS"]?:skip-vm) exten = s-BUSY,n,Voicemail(b${EXTENSION}) ;If busy, send to voicemail w/ busy announce exten = s-BUSY,n,Playtones(congestion) ;Voicemail exited, play congestion exten = s-BUSY,n,MacroExit exten = s-BUSY,n(skip-vm),Playtones(busy) ;If voicemail doesn't exist, play busy exten = _s-.,1,Goto(s-NOANSWER,1) ;Treat anything else as no answer exten = a,1,VoicemailMain(${EXTENSION}) ;If they press *, send the user into VoicemailMain [macro-voicemailbox] exten = s,1,NoOp(Answering machine mode: Answer Only or Answer and Record?) exten = s,n,GotoIf(${ISNULL(${ARG1})}?answeronly) exten = s,n,NoOp(Mode: Answer and Record) exten = s,n,NoOp(Checking for Voice Mailbox: ${ARG1}) exten = s,n,MailboxExists(${ARG1}) exten = s,n,NoOp(MailboxExists(${ARG1}): ${VMBOXEXISTSSTATUS}) exten = s,n,GotoIf($["${VMBOXEXISTSSTATUS}"="SUCCESS"]?:end) exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,GotoIf(${ISNULL(${ARG2})}?defaultmessage) exten = s,n,Playback(${ARG2}) exten = s,n,Voicemail(s${ARG1}) exten = s,n,Goto(end) exten = s,n(defaultmessage),Voicemail(${ARG1}) exten = s,n,Goto(end) exten = s,n(answeronly),NoOp(Mode: Answer Only) exten = s,n,GotoIf(${ISNULL(${ARG2})}?end) exten = s,n,Answer exten = s,n,Wait(1) exten = s,n,Playback(${ARG2}) exten = s,n(end),NoOp(end) [macro-voicemailsystem] exten = s,1,Answer exten = s,n,Wait(1) exten = s,n,VoiceMailMain(${ARG1}@default) [DefaultOutgoingRule] include = _all_ exten = i,1,PlayTones(Congestion) exten = t,1,Hangup [_all-resources_] include = trunk_out_46 include = trunk_out_57 include = trunk_out_59 include = trunk_out_61 include = trunk_out_63 include = trunk_out_50 include = trunk_out_48 [trunk_46] ;SIP/3124XXXXX Channel- Incoming context exten = 024XXXXX,1,NoOp(Incoming-024XXXXX:trunk_46 CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = 024XXXXX,n,AGI(incoming.php|answered=${EXTEN}&channel=46&rule=2&uniqueid=${UNIQUEID}) exten = _024XXXXX.,1,NoOp(Incoming-024XXXXX:trunk_46 CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = _024XXXXX.,n,AGI(incoming.php|answered=${EXTEN}&channel=46&rule=2&uniqueid=${UNIQUEID}) exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=46&rule=2&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_46] ;SIP/3124XXXXX Channel- Outgoing context exten = _1*.,1,AGI(dial.php|entity=46&group=4&extension=1*) [provider_1] include = trunk_46 [trunk_57] ;SIP/webcalldirectDE Channel- Incoming context exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=57&rule=2&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_57] ;SIP/webcalldirectDE Channel- Outgoing context exten = _4*.,1,AGI(dial.php|entity=57&group=4&extension=4*) [provider_5] include = trunk_57 include = trunk_59 [trunk_59] ;SIP/webcalldirectNL Channel- Incoming context exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=59&rule=2&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_59] ;SIP/webcalldirectNL Channel- Outgoing context exten = _5*.,1,AGI(dial.php|entity=59&group=4&extension=5*) [trunk_61] ;SIP/iXcall Channel- Incoming context exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=61&rule=2&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_61] ;SIP/iXcall Channel- Outgoing context exten = _6*.,1,AGI(dial.php|entity=61&group=4&extension=6*) [provider_6] include = trunk_61 [trunk_63] ;SIP/messagenet Channel- Incoming context exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=63&rule=2&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_63] ;SIP/messagenet Channel- Outgoing context exten = _7*.,1,AGI(dial.php|entity=63&group=4&extension=7*) [provider_8] include = trunk_63 [486] ;486 - gs486 - SIP/486 exten = 486,hint,SIP/486 exten = 486,1,AGI(dial.php|entity=51&group=2&extension=486) exten = gs486,1,Goto,486|1 [_all-extensions_] include = 486 [trunk_50] ;SIP/069929XXXX Channel- Incoming context exten = 069929XXXX,1,NoOp(Incoming-069929XXXX:trunk_50 CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = 069929XXXX,n,AGI(incoming.php|answered=${EXTEN}&channel=50&rule=4&uniqueid=${UNIQUEID}) exten = _069929XXXX.,1,NoOp(Incoming-069929XXXX:trunk_50 CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = _069929XXXX.,n,AGI(incoming.php|answered=${EXTEN}&channel=50&rule=4&uniqueid=${UNIQUEID}) exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=50&rule=4&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_50] ;SIP/069929XXXX Channel- Outgoing context exten = _3*.,1,AGI(dial.php|entity=50&group=4&extension=3*) [provider_3] include = trunk_50 [trunk_48] ;SIP/9083XXX Channel- Incoming context exten = 040150500,1,NoOp(Incoming-040150500:trunk_48 CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = 040150500,n,AGI(incoming.php|answered=${EXTEN}&channel=48&rule=4&uniqueid=${UNIQUEID}) exten = _040150500.,1,NoOp(Incoming-040150500:trunk_48 CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = _040150500.,n,AGI(incoming.php|answered=${EXTEN}&channel=48&rule=4&uniqueid=${UNIQUEID}) exten = s,1,NoOp(Incoming-s. CallerID:${CALLERID(all)} - Calling:${EXTEN}) exten = s,n,AGI(incoming.php|answered=${EXTEN}&channel=48&rule=4&uniqueid=${UNIQUEID}) exten = t,1,Hangup [trunk_out_48] ;SIP/9083XXX Channel- Outgoing context exten = _2*.,1,AGI(dial.php|entity=48&group=4&extension=2*) [provider_2] include = trunk_48 Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
Brian West
2007-Aug-28 13:47 UTC
[asterisk-users] calls being forwarded to neighbor?? please help, thx :)
On Aug 28, 2007, at 8:24 AM, Jody Gugelhupf wrote:> -- Now forwarding SIP/9083XXX-0816b208 to 'Local/ > 247110358 at DefaultOutgoingRule' (thanks to > SIP/486-081d4738)Because SIP/486 issued a 302 redirect to 247110358. Check the phone for the forwarding setting. /b -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070828/18fe6694/attachment.htm