How to Hangup an unanswered Zap channel?

Dear All,

I need to implement the following scenario:

  • I receive a call on my Zap channel (TDM400 card) .
  • Grab the Caller ID
  • Disconnect the call without answering the call (avoiding the connection fees from TELCO).

The first two steps are easy to acheive, though the same is not true for the third one.

I have the following context:

exten => s,1,NoOp(Received a call to ZAP Interface from: ${CALLERIDNUM}) exten => s,n,Congestion(); exten => s,n,Hangup();

It gives me the following output on Asterisk and the call is not being congested actually; the ringtones continue to be heard:

-- Starting simple switch on 'Zap/4-1' -- Executing NoOp("Zap/4-1", "Received a call to ZAP Interface from: +436648981606") in new stack -- Executing Congestion("Zap/4-1", "") in new stack Mar 3 01:02:00 WARNING[24303]: chan_zap.c:3926 zt_handle_event: Ring/Off-hook in strange state 7 on channel 4 Mar 3 01:02:05 WARNING[24303]: chan_zap.c:3926 zt_handle_event: Ring/Off-hook in strange state 7 on channel 4 == Spawn extension (zap-incoming, s, 2) exited non-zero on 'Zap/4-1' -- Hungup 'Zap/4-1' -- Starting simple switch on 'Zap/4-1' Mar 3 01:02:19 WARNING[24310]: chan_zap.c:6149 ss_thread: CallerID returned with error on channel 'Zap/4-1' -- Executing NoOp("Zap/4-1", "Received a call to ZAP Interface from: +43") in new stack -- Executing Congestion("Zap/4-1", "") in new stack == Spawn extension (zap-incoming, s, 2) exited non-zero on 'Zap/4-1' -- Hungup 'Zap/4-1'

Would appreciate any advice.

You cannot “hang up” a call you haven’t answered. The only thing you can do is to not hear the ring. (Asterisk will continue to “hear” it until the remote party hangs up.) All the smarty call-back services use this. They all rely on the calling party to hang up.

You have a clue in that I cannot hangup the call that I have not answered.

Just on my Digital GSM interface (vGSM card), whenever I receive a call, I am able to “hangup” the call, and the calling party hears congestion tone, and the call in fact is disconnected.

I just wondered whether the same scenario could be built on Zap channel…

A digital interface has a lot more features than your plain analogue line. Since you mentioned TDM400P, there is no support for any kind of signaling before answering. (You can pick the line up and hold it before the call arrives, of course. But telco won’t send you that call because it senses the line is off-hook.)