Don't pick the answer from PSTN incoming call

Dear experts,

I read more about the dialplan and zap channel but I don’t known what is my mistake here.

Here is when I try to call from the mobile to PSTN number:

[Mar 30 21:06:31] NOTICE[10956]: chan_zap.c:6376 ss_thread: Got event 18 (Ring Begin)…
[Mar 30 21:06:32] NOTICE[10956]: chan_zap.c:6376 ss_thread: Got event 2 (Ring/Answered)…
[Mar 30 21:06:32] WARNING[10956]: pbx.c:2470 __ast_pbx_run: Channel ‘Zap/1-1’ sent into invalid extension ‘s’ in context ‘default’, but no invalid handler

Here is when I try to call from the SIP client:

[Mar 30 22:44:49] NOTICE[5109]: chan_sip.c:13885 handle_request_invite: Call from ‘test’ to extension ‘9042207557’ rejected because extension not found.

Here is my extensions.conf

root@fiteltec-server:/etc/asterisk# cat /etc/asterisk/extensions.conf
[globals]
OUTBOUNDTRUNK=Zap/g1

[general]
static=yes
writeprotect=no
clearglobalvars=no

[PSTN_incoming]
exten=>s,1,Answer()
exten=>s,n,Background(menu)
exten=>i,1,Playback((pbx-invalid)
exten=>i,n,Goto(PSTN,s,1)
exten=>t,1,Playback(Goodbye)
exten=>t,n,Hangup()

[PSTN_outgoing]
exten=>_9NXXXXXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1},30)
exten=>_9NXXXXXXXXXX,n,Congestion()
exten=>_9NXXXXXXXXXX,n,Hangup()

[test]
include => PSTN_outgoing

exten=>111,1,Dial(SIP/${EXTEN},20)
exten=>111,2,answer()
exten=>111,3,playback(goodbye)
exten=>111,4,hangup()

[SIPProvider_outgoing]
exten=>_8.,1,Dial(SIP/FWDnet_Provider,30)

;[SIPProvider_incoming]
;exten=>_8.,1,Dial(SIP/0,30)

I am very thank for your kindly help.

Hi

OK

Problem 1 this line says it all

and I can see con [default] context either so the call will fail as described. you need to define the context in the zapata.conf correctly.

Problem 2 this line says it all

and gain I cannot find one either

But if we look at the pattern rules we can see that it doesnt match

  • X - any digit from 0-9
  • Z - any digit from 1-9
  • N - any digit from 2-9

9042207557 <<<<<<<<<This is what you dialed
9NXXXXXXXXXX <<<<<<<<<This the closest mat but it doesnt
YNYYYYYYYYNNN <<<<<<<<<does it match

9XXXXXXXX or 9X. would match as would 90X.

Ian

Here is my zapata.conf

root@fiteltec-server:~# cat /etc/asterisk/zapata.conf
[channels]
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0

group=1
context=PSTN_incoming
signalling=fxs_ks
channel => 1-2

One more I see here that, when I try to using the dialplan show there are a lot of extensions not in my extension.conf there are some in the extensions.ael. I try to read the Asterisk extenstion language but could not disable this function. Maybe the [default] context here.

Thank you.

really appreciate your experts efforts,and i know next time when meeting problems,who i can ask for help.