[local-lines] ;exten => _[1-9]XXXXXX,1,macro(dialuser,SIP/${EXTEN:4},@{EXTEN:4}) exten => _XXXXXXX,1,macro(dialuser,SIP/osaka/${EXTEN},${EXTEN}) ; Let it go directly into the trunk line-outgoing context exten => h,1,noop(PM: Hangup received in local-lines) exten => h,n,hangup [local-hangup] exten => _!,1,answer exten => _!,n,wait(4) exten => _!,n,playback(pbx-invalid) exten => _!,n,hangup ;----------------------------------------------------------------- [macro-dialuser] ;exten => s,1,SetVar(_ALERT_INFO=) ;exten => s,1,Set(TIMEOUT(digit)=6) exten => s,1,dial(${ARG1},38,r) exten => s,n,noop(PM: Dial ended !!) exten => s,n,noop(${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,answer exten => s-NOANSWER,n,wait(2) ;exten => s-NOANSWER,n,SayDigits(${ARG2}) ;exten => s-NOANSWER,n,playback(FR00001) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default,u) exten => s-NOANSWER,n,hangup exten => s-BUSY,1,answer exten => s-BUSY,n,wait(4) exten => s-BUSY,n,SayDigits(${ARG2}) exten => s-BUSY,n,playback(vm-isonphone) exten => s-BUSY,n,noop(PM-Busy) exten => s-BUSY,n,VoiceMail(b${MACRO_EXTEN}) exten => s-BUSY,n,congestion exten => s-BUSY,n,hangup exten => s-CHANUNAVAIL,1,answer exten => s-CHANUNAVAIL,n,wait(4) ;exten => s-CHANUNAVAIL,n,playback(pbx-invalid) exten => s-CHANUNAVAIL,n,hangup exten => _s-.,1,answer exten => _s-.,n,wait(4) exten => _s-.,n,SayDigits(${ARG2}) exten => _s-.,n,playback(FR00001) exten => _s-.,n,hangup root@HP001CC42A6011:/etc/asterisk# vi extensions.conf root@HP001CC42A6011:/etc/asterisk# asterisk -r Asterisk 1.4.13, Copyright (C) 1999 - 2007 Digium, Inc. and others. Created by Mark Spencer Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.4.13 currently running on HP001CC42A6011 (pid = 2749) Verbosity is at least 3 HP001CC42A6011*CLI> dialplan reload == Parsing '/etc/asterisk/extensions.conf': Found -- Registered extension context 'local-incoming' -- Including context 'services' in context 'local-incoming' -- Including context 'local-lines' in context 'local-incoming' -- Including context 'line-outgoing' in context 'local-incoming' -- Including context 'local-hangup' in context 'local-incoming' -- Including context 'parkedcalls' in context 'local-incoming' -- Registered extension context 'default' -- Including context 'services' in context 'default' -- Including context 'local-lines' in context 'default' -- Including context 'parkedcalls' in context 'default' -- Registered extension context 'sip_incoming' -- Including context 'local-lines' in context 'sip_incoming' -- Registered extension context 'line-incoming' -- Registered extension context 'line-outgoing' -- Registered extension context 'services' -- Added extension '600' priority 1 to services -- Added extension '600' priority 2 to services -- Added extension '600' priority 3 to services -- Added extension '600' priority 4 to services -- Added extension '2345' priority 1 to services -- Added extension '800' priority 1 to services -- Added extension '9000' priority 1 to services -- Added extension '9000' priority 2 to services -- Added extension '9001' priority 1 to services -- Added extension '9001' priority 2 to services -- Added extension '9001' priority 3 to services H -- Added extension '9001' priority 4 to services -- Added extension '9001' priority 5 to services -- Added extension '9002' priority 1 to services -- Added extension '9002' priority 2 to services -- Added extension '9002' priority 3 to services -- Added extension '9002' priority 4 to services -- Added extension '9002' priority 5 to services [Dec 19 14:09:42] WARNING[4580]: pbx.c:4667 add_pri: Unable to register extension '800', priority 1 in 'services', already in use -- Added extension '800' priority 2 to services -- Registered extension context 'local-lines' -- Added extension '_XXXXXXX' priority 1 to local-lines -- Added extension 'h' priority 1 to local-lines -- Added extension 'h' priority 2 to local-lines -- Registered extension context 'local-hangup' -- Added extension '_!' priority 1 to local-hangup -- Added extension '_!' priority 2 to local-hangup -- Added extension '_!' priority 3 to local-hangup -- Added extension '_!' priority 4 to local-hangup -- Registered extension context 'macro-dialuser' -- Added extension 's' priority 1 to macro-dialuser -- Added extension 's' priority 2 to macro-dialuser -- Added extension 's' priority 3 to macro-dialuser -- Added extension 's' priority 4 to macro-dialuser -- Added extension 's-NOANSWER' priority 1 to macro-dialuser -- Added extension 's-NOANSWER' priority 2 to macro-dialuser -- Added extension 's-NOANSWER' priority 3 to macro-dialuser -- Added extension 's-NOANSWER' priority 4 to macro-dialuser -- Added extension 's-BUSY' priority 1 to macro-dialuser -- Added extension 's-BUSY' priority 2 to macro-dialuser -- Added extension 's-BUSY' priority 3 to macro-dialuser -- Added extension 's-BUSY' priority 4 to macro-dialuser -- Added extension 's-BUSY' priority 5 to macro-dialuser -- Added extension 's-BUSY' priority 6 to macro-dialuser -- Added extension 's-BUSY' priority 7 to macro-dialuser -- Added extension 's-BUSY' priority 8 to macro-dialuser -- Added extension 's-CHANUNAVAIL' priority 1 to macro-dialuser -- Added extension 's-CHANUNAVAIL' priority 2 to macro-dialuser -- Added extension 's-CHANUNAVAIL' priority 3 to macro-dialuser -- Added extension '_s-.' priority 1 to macro-dialuser -- Added extension '_s-.' priority 2 to macro-dialuser -- Added extension '_s-.' priority 3 to macro-dialuser -- Added extension '_s-.' priority 4 to macro-dialuser -- Added extension '_s-.' priority 5 to macro-dialuser -- Added extension 'h' priority 1 to macro-dialuser == Parsing '/etc/asterisk/users.conf': Found [Dec 19 14:09:42] WARNING[4580]: pbx.c:6246 ast_context_verify_includes: Context 'ael-local' tries includes nonexistent context 'ael-parkedcalls' [Dec 19 14:09:42] WARNING[4580]: pbx.c:6246 ast_context_verify_includes: Context 'ael-dundi-e164-local' tries includes nonexistent context 'ael-dundi-e164-canonical' [Dec 19 14:09:42] WARNING[4580]: pbx.c:6246 ast_context_verify_includes: Context 'ael-dundi-e164-local' tries includes nonexistent context 'ael-dundi-e164-customers' [Dec 19 14:09:42] WARNING[4580]: pbx.c:6246 ast_context_verify_includes: Context 'ael-dundi-e164-local' tries includes nonexistent context 'ael-dundi-e164-via-pstn' [Dec 19 14:09:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #5) [Dec 19 14:09:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' -- Executing [6672020@local-lines:1] Macro("SIP/6672019-082f5730", "dialuser|SIP/sip/6672020|6672020") in new stack -- Executing [s@macro-dialuser:1] Dial("SIP/6672019-082f5730", "SIP/sip/6672020|38|r") in new stack [Dec 19 14:09:55] WARNING[4581]: app_dial.c:1111 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) [Dec 19 14:09:55] DEBUG[4581]: app_macro.c:337 _macro_exec: Executed application: dial -- Executing [s@macro-dialuser:2] NoOp("SIP/6672019-082f5730", "PM: Dial ended !!") in new stack [Dec 19 14:09:55] DEBUG[4581]: app_macro.c:337 _macro_exec: Executed application: noop -- Executing [s@macro-dialuser:3] NoOp("SIP/6672019-082f5730", "CHANUNAVAIL") in new stack [Dec 19 14:09:55] DEBUG[4581]: app_macro.c:337 _macro_exec: Executed application: noop -- Executing [s@macro-dialuser:4] Goto("SIP/6672019-082f5730", "s-CHANUNAVAIL|1") in new stack -- Goto (macro-dialuser,s-CHANUNAVAIL,1) [Dec 19 14:09:55] DEBUG[4581]: app_macro.c:337 _macro_exec: Executed application: Goto -- Executing [s-CHANUNAVAIL@macro-dialuser:1] Answer("SIP/6672019-082f5730", "") in new stack [Dec 19 14:09:55] DEBUG[4581]: app_macro.c:337 _macro_exec: Executed application: answer -- Executing [s-CHANUNAVAIL@macro-dialuser:2] Wait("SIP/6672019-082f5730", "4") in new stack [Dec 19 14:10:00] DEBUG[4581]: app_macro.c:337 _macro_exec: Executed application: wait -- Executing [s-CHANUNAVAIL@macro-dialuser:3] Hangup("SIP/6672019-082f5730", "") in new stack == Spawn extension (macro-dialuser, s-CHANUNAVAIL, 3) exited non-zero on 'SIP/6672019-082f5730' in macro 'dialuser' == Spawn extension (macro-dialuser, s-CHANUNAVAIL, 3) exited non-zero on 'SIP/6672019-082f5730' -- Executing [h@macro-dialuser:1] NoOp("SIP/6672019-082f5730", "PM: Hangup in macro !!") in new stack [Dec 19 14:10:12] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #6) [Dec 19 14:10:12] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:10:32] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #7) [Dec 19 14:10:32] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' -- Executing [6672020@local-lines:1] Macro("SIP/6672019-082f5730", "dialuser|SIP/sip/6672020|6672020") in new stack -- Executing [s@macro-dialuser:1] Dial("SIP/6672019-082f5730", "SIP/sip/6672020|38|r") in new stack [Dec 19 14:10:36] WARNING[4614]: app_dial.c:1111 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) [Dec 19 14:10:36] DEBUG[4614]: app_macro.c:337 _macro_exec: Executed application: dial -- Executing [s@macro-dialuser:2] NoOp("SIP/6672019-082f5730", "PM: Dial ended !!") in new stack [Dec 19 14:10:36] DEBUG[4614]: app_macro.c:337 _macro_exec: Executed application: noop -- Executing [s@macro-dialuser:3] NoOp("SIP/6672019-082f5730", "CHANUNAVAIL") in new stack [Dec 19 14:10:36] DEBUG[4614]: app_macro.c:337 _macro_exec: Executed application: noop -- Executing [s@macro-dialuser:4] Goto("SIP/6672019-082f5730", "s-CHANUNAVAIL|1") in new stack -- Goto (macro-dialuser,s-CHANUNAVAIL,1) [Dec 19 14:10:36] DEBUG[4614]: app_macro.c:337 _macro_exec: Executed application: Goto -- Executing [s-CHANUNAVAIL@macro-dialuser:1] Answer("SIP/6672019-082f5730", "") in new stack [Dec 19 14:10:36] DEBUG[4614]: app_macro.c:337 _macro_exec: Executed application: answer -- Executing [s-CHANUNAVAIL@macro-dialuser:2] Wait("SIP/6672019-082f5730", "4") in new stack [Dec 19 14:10:40] DEBUG[4614]: app_macro.c:337 _macro_exec: Executed application: wait -- Executing [s-CHANUNAVAIL@macro-dialuser:3] Hangup("SIP/6672019-082f5730", "") in new stack == Spawn extension (macro-dialuser, s-CHANUNAVAIL, 3) exited non-zero on 'SIP/6672019-082f5730' in macro 'dialuser' == Spawn extension (macro-dialuser, s-CHANUNAVAIL, 3) exited non-zero on 'SIP/6672019-082f5730' -- Executing [h@macro-dialuser:1] NoOp("SIP/6672019-082f5730", "PM: Hangup in macro !!") in new stack [Dec 19 14:10:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #8) [Dec 19 14:10:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:11:12] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #9) [Dec 19 14:11:12] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:11:32] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #10) [Dec 19 14:11:32] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:11:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #11) [Dec 19 14:11:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:12:12] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #12) [Dec 19 14:12:12] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:12:32] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #13) [Dec 19 14:12:32] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:12:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #14) [Dec 19 14:12:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:13:12] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #15) [Dec 19 14:13:12] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:13:32] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #16) [Dec 19 14:13:32] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:13:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #17) [Dec 19 14:13:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:14:12] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #18) [Dec 19 14:14:12] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:14:32] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #19) [Dec 19 14:14:32] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:14:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #20) [Dec 19 14:14:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:15:12] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #21) [Dec 19 14:15:12] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:15:32] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #22) [Dec 19 14:15:32] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' [Dec 19 14:15:52] NOTICE[2815]: chan_sip.c:7326 sip_reg_timeout: -- Registration for 'sip@192.168.0.139' timed out, trying again (Attempt #23) [Dec 19 14:15:52] WARNING[2815]: chan_sip.c:12570 handle_response: Host '192.168.0.139' does not implement 'REGISTER' HP001CC42A6011*CLI> Read from remote host 192.168.0.2: Connection reset by peer Connection to 192.168.0.2 closed. C:\Documents and Settings\user>