Making asterisk not handle incoming calls

I’ve got an X100 card I’m using for testing, and I would like to connect it to one of our business lines to test outgoing calls and whatnot. Problem is, we still receive calls on this line and I would like Asterisk to not pick up the call. How do I do that? In extensions.conf my incoming context has the “exten => s,1,Answer()” commented out, but it still picks up the calls with the invalid extension message or whatever.

exten => s,1,Hangup()

somehing in your dialplan is causing it to answer. Post your extensions.conf and I can have a look…

Otherwise what you can do is

exten => s,1,Wait(999)

which will make it wait 999 seconds before answering…

how about just removing the context in zapata.conf for the channel ?

We have two lines that are outgoing only for our Asterisk server (they are shared with the MICS and a fax machine). To make Asterisk not answer, we removed everything from the default context and set those Zap interfaces to use the default context in zapata.conf. They don’t have to be in different groups, we just need them to be that way.

Asterisk thinks about answering, but sees there’s no ‘s’ extension in the default context and decides not to answer.


group = 2
callgroup = 2
pickupgroup = 2

callprogress = no
usecallerid = no
threewaycalling = no

; Default context does nothing, keeping these two lines from answering
; They are xxx8505 and xxx7232

context = default

channel => 7

signalling = fxs_ks
group = 3
context = default
channel => 8



; crap for the macro goes here

Ok. Here is my extensions.conf





; During business hours, send calls to the open context
exten => s,1,GotoIfTime(08:00-19:59|mon-fri||?open,s,1)
; Otherwise, we’re closed
exten => s,2,Goto(closed,s,1)



ignorepat => 9
exten => _9NXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1})
exten => _9NXXXXXX,2,Congestion()
exten => _9NXXXXXX,102,Congestion()
exten => 911,1,Dial(${OUTBOUNDTRUNK}/911)
exten => 9911,1,Dial(${OUTBOUNDTRUNK}/911)

exten => _91NXXNXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1})
exten => _91NXXNXXXXXX,2,Congestion()
exten => _91NXXNXXXXXX,102,Congestion()

include => outbound-local
exten => 500,1,VoiceMailMain()
exten => 101,1,Macro(voicemail,SIP/101)
exten => 102,1,Macro(voicemail,SIP/102)

include => internal
include => outbound-long-distance

exten => s,1,Dial(${ARG1},20,rtT)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(u${MACRO_EXTEN})
exten => s-NOANSWER,2,Goto(incoming,s,1)
exten => s-BUSY,1,Voicemail(b${MACRO_EXTEN})
exten => s-BUSY,2,Goto(incoming,s,1)
exten => _s-.,1,Goto(s-NOANSWER,1)[/code]

There is nothing that should be picking up unless the GotoIfTime() will actually pick up the line. Thanks for the help.

i thing what’s happening is gotoiftime starts execution but then goto’s somewhere that doesn’t exist. This is invalid, so it plays the invalid message, which answers the channel.

Try in both the open and closed contexts adding the line

exten => s,1,Wait(999)

and see if that helps

Ok. At least the invalid extension doesn’t play anymore, but now what I see in the CLI is -- Executing GotoIfTime("Zap/1-1", "08:00-19:59|mon-fri|*|*?open|s|1") in new stack -- Goto (open,s,1) -- Executing Wait("Zap/1-1", "999") in new stack -- Hungup 'Zap/1-1'

I suppose this just means Asterisk hung up the line and not the other end hung up? Kind of like when someone in your house picks up the phone while you’re already on it and then hangs up?

theoretically at least it should not answer the line…

try removing the context= statement from zapata.conf. also post your zapata.conf for a quick look…

; Zapata telephony interface
; Configuration file


language = en
context = incoming
signaling = fxs_ks
usecallerid = yes
hidecallerid = no
transfer = yes
busydetect = yes
callprogress = yes
channel => 1 [/code]

try removing the context= line and set call progress to be no?

Not sure what setting call progress to no did but when I removed the context line, it just dumped the call into the default context, which it then bitched about: == Starting Zap/1-1 at default,s,1 failed so falling back to exten 's' == Starting Zap/1-1 at default,s,1 still failed so falling back to context 'default' Nov 14 14:20:58 WARNING[15564]: pbx.c:2357 __ast_pbx_run: Channel 'Zap/1-1' sent into invalid extension 's' in context 'default', but no invalid handler -- Hungup 'Zap/1-1'

It seems if I put in exten => s,1,Wait(999) in both the open and closed contexts in extensions and let the zapata.conf push everything into incoming like before, it works like it should. At least it works without any ill side effects. I’ll eventually be using this to pick up incoming calls, so I think this will work for now.

ok so callprogress=no but with context set, and the Wait(999) extens are causing it to work correctly (not be answered)?

just double checking :smiley:

I went ahead and set callprogress back to yes and the context back to incoming. In my incoming context in extensions.conf I still do the GotoIfTime() but in the open/closed contexts, I just Wait(999). Seems to handle it Ok. The CLI still says -- Executing GotoIfTime("Zap/1-1", "08:00-19:59|mon-fri|*|*?open|s|1") in new stack -- Goto (open,s,1) -- Executing Wait("Zap/1-1", "999") in new stack -- Hungup 'Zap/1-1'
though. I dont see a problem with this though, or at least not one so far. The line this is on is hooked up to a fax server so after two rings, the fax server picks up which is when Asterisk seems to get the hint and hang up.

The warning is harmless, for what it’s worth.