ftarz at mindspring.com Guest
|
Posted: Sat Sep 19, 2015 12:40 pm Post subject: [asterisk-users] How to hang-up a FXO call without answering |
|
|
I'm using Asterisk 13.4.0 and DAHDI 2.10.2. I've got a FXO line that I
use for in and outgoing PSTN calls. Unfortunately I'm getting a lot of
spam calls on the number.
I had the extension configured to forward incoming calls to 2 SIP
extensions or go to voicemail. But now I'm getting loads of junk
voicemail messages, so I removed the voicemail command:
[from-pstn]
exten => s,1,Wait(1)
exten => s,2,Set(WHO=${CALLERID(num)})
exten => s,3,Verbose(CALLERID is ${CALLERID(num)})
exten => s,4,Verbose(Time is ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
exten => s,5,Dial(SIP/1000&SIP/1100,30)
;exten => s,6,Voicemail(1000,u)
exten => s,6,Hangup()
Now incoming calls will cause the SIP extensions to ring for 30 seconds,
but then the FXO line isn't disconnected. The [from-pstn] context seems
to keep looping on the Dial() command:
[Sep 19 11:16:59] -- Starting simple switch on 'DAHDI/4-1'
[Sep 19 11:17:00] -- Executing [s@from-pstn:1] Wait("DAHDI/4-1",
"1") in new stack
[Sep 19 11:17:01] -- Executing [s@from-pstn:2] Set("DAHDI/4-1",
"WHO=919961XXXX") in new stack
[Sep 19 11:17:01] -- Executing [s@from-pstn:3] Verbose("DAHDI/4-1",
"CALLERID is 919961XXXX") in new stack
[Sep 19 11:17:01] CALLERID is 919961XXXX
[Sep 19 11:17:01] -- Executing [s@from-pstn:4] Verbose("DAHDI/4-1",
"Time is 20150919-111701") in new stack
[Sep 19 11:17:01] Time is 20150919-111701
[Sep 19 11:17:01] -- Executing [s@from-pstn:5] Dial("DAHDI/4-1",
"SIP/1000&SIP/1100,30") in new stack
[Sep 19 11:17:01] == Using SIP RTP TOS bits 184
[Sep 19 11:17:01] == Using SIP RTP CoS mark 5
[Sep 19 11:17:01] == Using SIP RTP TOS bits 184
[Sep 19 11:17:01] == Using SIP RTP CoS mark 5
[Sep 19 11:17:01] -- Called SIP/1000
[Sep 19 11:17:01] -- Called SIP/1100
[Sep 19 11:17:01] -- SIP/1000-00000095 is ringing
[Sep 19 11:17:01] -- SIP/1100-00000096 is ringing
[Sep 19 11:17:31] -- Nobody picked up in 30000 ms
[Sep 19 11:17:31] -- Executing [s@from-pstn:6] Hangup("DAHDI/4-1",
"") in new stack
[Sep 19 11:17:31] == Spawn extension (from-pstn, s, 6) exited non-zero
on 'DAHDI/4-1'
[Sep 19 11:17:31] -- Hanging up on 'DAHDI/4-1'
[Sep 19 11:17:31] -- Hungup 'DAHDI/4-1'
[Sep 19 11:17:35] -- Starting simple switch on 'DAHDI/4-1'
[2015-09-19 11:17:39.1] ERROR[27434][C-00000079]: callerid.c:567
callerid_feed: No start bit found in fsk data.
[2015-09-19 11:17:39.1] WARNING[27434][C-00000079]: chan_dahdi.c:1374
my_get_callerid: Failed to decode CallerID
[2015-09-19 11:17:39.1] WARNING[27434][C-00000079]: sig_analog.c:2569
__analog_ss_thread: CallerID returned with error on channel 'DAHDI/4-1'
[Sep 19 11:17:39] -- Executing [s@from-pstn:1] Wait("DAHDI/4-1",
"1") in new stack
[Sep 19 11:17:40] -- Executing [s@from-pstn:2] Set("DAHDI/4-1",
"WHO=") in new stack
[Sep 19 11:17:40] -- Executing [s@from-pstn:3] Verbose("DAHDI/4-1",
"CALLERID is ") in new stack
[Sep 19 11:17:40] CALLERID is
[Sep 19 11:17:40] -- Executing [s@from-pstn:4] Verbose("DAHDI/4-1",
"Time is 20150919-111740") in new stack
[Sep 19 11:17:40] Time is 20150919-111740
[Sep 19 11:17:40] -- Executing [s@from-pstn:5] Dial("DAHDI/4-1",
"SIP/1000&SIP/1100,30") in new stack
[Sep 19 11:17:40] == Using SIP RTP TOS bits 184
[Sep 19 11:17:40] == Using SIP RTP CoS mark 5
[Sep 19 11:17:40] == Using SIP RTP TOS bits 184
[Sep 19 11:17:40] == Using SIP RTP CoS mark 5
[Sep 19 11:17:40] -- Called SIP/1000
[Sep 19 11:17:40] -- Called SIP/1100
[Sep 19 11:17:40] -- SIP/1000-00000097 is ringing
[Sep 19 11:17:40] -- SIP/1100-00000098 is ringing
[Sep 19 11:17:49] == Spawn extension (from-pstn, s, 5) exited non-zero
on 'DAHDI/4-1'
[Sep 19 11:17:49] -- Hanging up on 'DAHDI/4-1'
[Sep 19 11:17:49] -- Hungup 'DAHDI/4-1'
The caller just hears the line ring and ring and the SIP extensions are
dialed over and over until the caller hangs-up.
Is there anyway to force a hang-up or disconnection of the incoming call
if the SIP extensions don't answer?
I'd like to do this without actually answering the call if at all possible.
Frank
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|