Page 1 of 1

Extension 's' rejected because extension not found

PostPosted: Thu Feb 09, 2012 6:37 pm
by spacejanitor
Xpost from an old post in GoAutoDial...

VERSION: 2.4-357a
Cluster installation. Dual-quad-core Xeon 3ghz DB server, same telephony server, same asterisk server.



I am facing this issue with Inbound calls. My outbound is working fine but somehow i am unable to figure out why my inbound calls are not getting through. My carrier is for Inboud as well as for outbound calls

Registering String:

Quote:
register => xxxx:xxx@toronto.voip.ms:5060


Account Entry:

Quote:
[voipms]
canreinvite=no
context=trunkinbound
host=toronto.voip.ms
secret=xxx
type=peer
username=xxx
disallow=all
allow=ulaw
allow=g729
fromuser=131171
trustrpid=yes


Global String:

Quote:
TRUNK1=SIP/voipms


Dial Plan:

Quote:
exten => _91XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXXXXXXXX,2,Dial(${VOIPTRUNK1}/${EXTEN:1},,Ttor)
exten => _91XXXXXXXXXX,3,Hangup




[quote]localhost*CLI> dial 917059992999@default
[Sep 24 09:01:10] WARNING[27199]: chan_oss.c:686 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory
[Sep 24 09:01:10] -- Executing [917059992999@default:1] AGI("Console/dsp", "agi://127.0.0.1:4577/call_log") in new stack
[Sep 24 09:01:10] -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Sep 24 09:01:10] -- Executing [917059992999@default:2] Dial("Console/dsp", "SIP/voipms/17059992999||Ttor") in new stack
[Sep 24 09:01:10] -- Called voipms/17059992999
[Sep 24 09:01:12] -- SIP/voipms-0000002b is making progress passing it to Console/dsp
localhost*CLI> hangup
[Sep 24 09:01:16] == Spawn extension (default, 917059992999, 2) exited non-zero on 'Console/dsp'
[Sep 24 09:01:16] -- Executing [h@default:1] DeadAGI("Console/dsp", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0-----CANCEL----------") in new stack
[Sep 24 09:01:16] -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0
[Sep 24 09:01:16] << Hangup on console >>
[Sep 24 09:01:33] NOTICE[3055]: chan_sip.c:15147 handle_request_invite: Call from '131171' to extension 's' rejected because extension not found.
[Sep 24 09:01:36] NOTICE[3055]: chan_sip.c:15147 handle_request_invite: Call from '131171' to extension 's' rejected because extension not found.
[Sep 24 09:01:37] NOTICE[3055]: chan_sip.c:15147 handle_request_invite: Call from '131171' to extension 's' rejected because extension not found.
quote]




I've even tried changing the dialplan for my inbound carrier to:

Code:
exten => s,1,AGI(agi://127.0.0.1:4577/call_log)
exten => s,2,Dial(${TRUNK1}/${EXTEN:1},,Ttor)
exten => s,3,Hangup


so that any "s" extensions are handled, but still I get the message:

Code:
Call from 'carrierID' to extension 's' rejected because extension not found.




If anybody has any ideas on what to do here it would be greatly appreciated!

inbound

PostPosted: Fri Feb 10, 2012 3:45 am
by striker
put
type = friend instead of peer


and in extension.conf under trunkinbound context enter the below

exten => s,1,AGI(agi-DID_route.agi)

PostPosted: Fri Feb 10, 2012 10:24 am
by spacejanitor
Thank you, Striker... partial success

Now I'm getting "ss no service" message "The number you have dialed is not in service", so I guess it is not triggering the DID route to my inbound group.

Here is my CLI output... strangely enough I do not see anywhere the actual DID number that I am dialing to reach this account. I DO see the number I am calling FROM to call the DID though (below changed to 4161234567).... any thoughts?

Code: Select all
<------------->
[Feb 10 09:40:22] --- (15 headers 14 lines) ---
[Feb 10 09:40:22] Sending to xxx.xxx.xxx.xxx : 5060 (NAT)
[Feb 10 09:40:22] Using INVITE request as basis request - 5d6f1f31093df6ab076eaef5714b8cfa@174.137.63.206
[Feb 10 09:40:22] Found peer 'voipms'
[Feb 10 09:40:22] Found RTP audio format 0
[Feb 10 09:40:22] Found RTP audio format 18
[Feb 10 09:40:22] Found RTP audio format 101
[Feb 10 09:40:22] Found audio description format PCMU for ID 0
[Feb 10 09:40:22] Found audio description format G729 for ID 18
[Feb 10 09:40:22] Found audio description format telephone-event for ID 101
[Feb 10 09:40:22] Capabilities: us - 0x4 (ulaw), peer - audio=0x104 (ulaw|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
[Feb 10 09:40:22] Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
[Feb 10 09:40:22] Peer audio RTP is at port xxx.xxx.xxx.xxx:16402
[Feb 10 09:40:22] Looking for s in trunkinbound (domain 192.168.1.132)
[Feb 10 09:40:22] list_route: hop: <sip:4161234567@xxx.xxx.xxx.xxx>
[Feb 10 09:40:22]
<--- Transmitting (NAT) to xxx.xxx.xxx.xxx:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 4161234567:5060;branch=z9hG4bK47b4ec93;received=174.137.63.206;rport=5060
From: "ARROW PROFSSNL" <sip:4161234567@xxx.xxx.xxx.xxx>;tag=as2af3f2d4
To: <sip:s@192.168.1.132>
Call-ID: 5d6f1f31093df6ab076eaef5714b8cfa@xxx.xxx.xxx.xxx
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: <sip:s@192.168.1.132>
Content-Length: 0


<------------>
[Feb 10 09:40:22]     -- Executing [s@trunkinbound:1] AGI("SIP/voipms-000000a0", "agi-DID_route.agi") in new stack
[Feb 10 09:40:22]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-DID_route.agi
[Feb 10 09:40:22] ERROR[22198]: utils.c:967 ast_carefulwrite: write() returned error: Broken pipe
[Feb 10 09:40:22]     -- AGI Script agi-DID_route.agi completed, returning 0
[Feb 10 09:40:22]     -- Executing [9998811112@default:1] Wait("SIP/voipms-000000a0", "2") in new stack

did route

PostPosted: Fri Feb 10, 2012 10:49 am
by striker
change the did route in the did u created

DID Route - This the type of route that you set the DID to use. EXTEN will send calls to the extension entered below, VOICEMAIL will send calls directly to the voicemail box entered below, AGENT will send calls to a VICIDIAL agent if they are logged in, PHONE will send the call to a phones entry selected below, IN_GROUP will send calls directly to the specified inbound group. Default is EXTEN. CALLMENU will send the call to the defined Call Menu.

PostPosted: Fri Feb 10, 2012 11:12 am
by spacejanitor
Hey Striker

Tried that...

HOWEVER, now that I just the catchall "default" DID extension, it is working fine. So for some reason, it seems that the specific DID extension is not being triggered when a call comes through to it...

Any idea how I could debug that?

Re: Extension 's' rejected because extension not found

PostPosted: Tue Jun 19, 2018 5:42 am
by Jitin
Add this in your extensions.conf in trunkinbound

exten => s,1,NoOp(${SIP_HEADER(TO)})
exten => s,n,Set(DN=${SIP_HEADER(TO)})
exten => s,n,Set(DN=${CUT(DN,:,2)})
exten => s,n,Set(DN=${CUT(DN,@,1)})
exten => s,n,Set(DN=${STRREPLACE(DN,+,00)})
exten => s,n,Goto(trunkinbound,${DN},1)


this should fix the issue