I am using asterisk 10.0.1. When I call on Invalid number then I get response like below-
-- Attempting call on SIP/relnew/918023591761 for 918827786685@hello_test:1 (Retry 1)
== Using SIP RTP CoS mark 5
> Channel SIP/relnew-0007b18a was never answered.
-- Executing [failed@hello_test:1] NoOp("OutgoingSpoolFailed", "Called failed = ") in new stack
-- Auto fallthrough, channel 'OutgoingSpoolFailed' status is 'UNKNOWN'
-- Executing [h@hello_test:1] Set("OutgoingSpoolFailed", "sip_cause=") in new stack
[Apr 17 06:41:18] NOTICE[14062]: pbx_spool.c:360 attempt_thread: Call failed to go through, reason (8) Congestion (circuits busy)
[Apr 17 06:41:18] NOTICE[14062]: pbx_spool.c:363 attempt_thread: Queued call to SIP/relnew/918023591761 expired without completion after 0 attempts
Below is the dialplan which I am using for testing purpose -
[code][hello_test]
exten => _X.,1,Answer()
exten => _X.,n,Playback(/var/lib/asterisk/sounds/en/demo-thanks)
exten => failed,1,NoOp(Called failed = ${HANGUPCAUSE})
exten => h,1, NoOp(HangupCause is =${HANGUPCAUSE})[/code]
Below is the log for Invalid number-
[Apr 17 07:22:05] VERBOSE[26213] pbx_spool.c: -- Attempting call on SIP/relnew/918023591761 for 918827786685@hello_test:1 (Retry 1)
[Apr 17 07:22:05] VERBOSE[26213] netsock2.c: == Using SIP RTP CoS mark 5
[Apr 17 07:22:06] VERBOSE[26213] pbx.c: > Channel SIP/relnew-0007b19e was never answered.
[Apr 17 07:22:06] VERBOSE[26213] pbx.c: -- Executing [failed@hello_test:1] NoOp("OutgoingSpoolFailed", "Called failed = 0") in new stack
[Apr 17 07:22:06] VERBOSE[26213] pbx.c: -- Auto fallthrough, channel 'OutgoingSpoolFailed' status is 'UNKNOWN'
[Apr 17 07:22:06] VERBOSE[26213] pbx.c: -- Executing [h@hello_test:1] NoOp("OutgoingSpoolFailed", "HangupCause is =0") in new stack
[Apr 17 07:22:06] NOTICE[26213] pbx_spool.c: Call failed to go through, reason (8) Congestion (circuits busy)
[Apr 17 07:22:06] NOTICE[26213] pbx_spool.c: Queued call to SIP/relnew/918023591761 expired without completion after 0 attempts
Below is the log for valid number but it was switched Off-
[Apr 17 07:25:18] VERBOSE[27276] pbx_spool.c: -- Attempting call on SIP/relnew/919691004887 for 918827786685@hello_test:1 (Retry 1)
[Apr 17 07:25:18] VERBOSE[27276] netsock2.c: == Using SIP RTP CoS mark 5
[Apr 17 07:25:30] VERBOSE[17925] chan_sip.c: -- Got SIP response 480 "Temporarily Unavailable" back from 80.77.12.137:5060
[Apr 17 07:25:30] VERBOSE[27276] pbx.c: > Channel SIP/relnew-0007b1bf was never answered.
[Apr 17 07:25:30] VERBOSE[27276] pbx.c: -- Executing [failed@hello_test:1] NoOp("OutgoingSpoolFailed", "Called failed = 0") in new stack
[Apr 17 07:25:30] VERBOSE[27276] pbx.c: -- Auto fallthrough, channel 'OutgoingSpoolFailed' status is 'UNKNOWN'
[Apr 17 07:25:30] VERBOSE[27276] pbx.c: -- Executing [h@hello_test:1] NoOp("OutgoingSpoolFailed", "HangupCause is =0") in new stack
[Apr 17 07:25:30] NOTICE[27276] pbx_spool.c: Call failed to go through, reason (8) Congestion (circuits busy)
[Apr 17 07:25:30] NOTICE[27276] pbx_spool.c: Queued call to SIP/relnew/919691004887 expired without completion after 0 attempts
I don’t want to use DIAL function, Is there any way to handle invalid numbers when I am using call files.