@dineshvg wrote:
I have a trunk from a provider which does not provide the DDI number, in the inbound route if I give th DDI number, calls don't get through to the extension.
But, if I leave the inbound route blank, it goes through. I have two trunks which need to be routed to two different extensions.What changes must I make to obtain a DDI number when the call reaches the trunk ?
This is the registration on the system :
pjsip show contacts Contact: <Aor/ContactUri...................................> <Status....> <RTT(ms)..> ========================================================================================= Contact: 10/sip:10@192.168.99.113:5060;rinstance=62b68e6e25e Avail 121.661 Contact: easybell/sip:004930XXXXXXXX@sip.easybell.de:5060 Avail 29.262 Contact: 11/sip:11@192.168.99.134:52490;rinstance=3ab7c6907b Avail 1.332
When I make calls this is what happens :
OPTIONS sip:s@77.179.197.153:5060 SIP/2.0
I get s as the number instead of the DID number here ?<--- Transmitting SIP response (396 bytes) to UDP:192.168.99.134:52490 ---> SIP/2.0 489 Bad Event Via: SIP/2.0/UDP 192.168.99.134:52490;rport=52490;received=192.168.99.134;branch=z9hG4bK-d8754z-86b14e6b89e9dc81-1---d8754z- Call-ID: OWZmNzJkNjkzNDJiMmI2ZmMzZjhjMjk4ZGUxZTIyOTI. From: <sip:11@192.168.99.134>;tag=6581d370 To: <sip:11@192.168.99.134>;tag=z9hG4bK-d8754z-86b14e6b89e9dc81-1---d8754z- CSeq: 2 SUBSCRIBE Server: FPBX-12.0.76.2(13.1) Content-Length: 0 <--- Transmitting SIP request (546 bytes) to UDP:192.168.99.134:52490 ---> OPTIONS sip:11@192.168.99.134:52490;rinstance=3ab7c6907b216249 SIP/2.0 Via: SIP/2.0/UDP 77.179.197.153:5060;rport;branch=z9hG4bKPj4ae2828d-39cc-4826-ab8a-7c1e32c63e13 From: <sip:46b4d6be-8393-46f4-85be-aa2372b10651@192.168.99.178>;tag=5c9b18be-21cc-4f43-bba9-d7ded9802313 To: <sip:11@192.168.99.134;rinstance=3ab7c6907b216249> Contact: <sip:46b4d6be-8393-46f4-85be-aa2372b10651@77.179.197.153:5060> Call-ID: beaa5aa8-866b-4953-be39-6e642cb08070 CSeq: 55658 OPTIONS Max-Forwards: 70 User-Agent: FPBX-12.0.76.2(13.1) Content-Length: 0 <--- Received SIP response (727 bytes) from UDP:192.168.99.134:52490 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 77.179.197.153:5060;rport=5060;branch=z9hG4bKPj4ae2828d-39cc-4826-ab8a-7c1e32c63e13;received=192.168.99.134 Contact: <sip:192.168.99.134:52490> To: <sip:11@192.168.99.134;rinstance=3ab7c6907b216249>;tag=f1b92b43 From: <sip:46b4d6be-8393-46f4-85be-aa2372b10651@192.168.99.178>;tag=5c9b18be-21cc-4f43-bba9-d7ded9802313 Call-ID: beaa5aa8-866b-4953-be39-6e642cb08070 CSeq: 55658 OPTIONS Accept: application/sdp, application/sdp Accept-Language: en Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri User-Agent: Z 3.3.25608 r25552 Allow-Events: presence, kpml Content-Length: 0 <--- Received SIP request (564 bytes) from UDP:212.172.97.124:5060 ---> OPTIONS sip:s@77.179.197.153:5060 SIP/2.0 Max-Forwards: 25 Record-Route: <sip:212.172.97.124;r2=on;lr=on;ftag=22923327;ngcplb=yes;socket=sip:212.172.97.124:5060> Record-Route: <sip:127.0.0.1;r2=on;lr=on;ftag=22923327;ngcplb=yes;socket=sip:212.172.97.124:5060> Via: SIP/2.0/UDP 212.172.97.124;branch=z9hG4bKf81c.44c3ae1d8f5b39e7b8fcb39c703a5dd8.0 Via: SIP/2.0/UDP 127.0.0.1:5062;rport=5062;branch=0 From: sip:pinger@sipwise.local;tag=22923327 To: sip:s@77.179.197.153:5060 Call-ID: 4f103312-a3976221-c39a706@127.0.0.1 CSeq: 1 OPTIONS Content-Length: 0
I tried giving a custom extension, but I still keep getting the s-extension error and call does not connect to extension 11, which is in the inbound route.
The extension_custom.conf file :
context=custom-get-did-from-sip exten => 00493012219327,1,Noop(Fixing DID using information from SIP TO header) exten => 00493012219327,n,Set(pseudodid=${SIP_HEADER(To)}) exten => 00493012219327,n,Set(pseudodid=${CUT(pseudodid,@,1)}) exten => 00493012219327,n,Set(pseudodid=${CUT(pseudodid,:,2)}) exten => 00493012219327,n,Goto(from-trunk,${pseudodid},1)
[2016-02-18 10:21:27] NOTICE[12981]: res_pjsip_session.c:1587 new_invite: Call from 'easybell' (UDP:208.172.67.164:5060) to extension 's' rejected because extension not found in context 'custom-get-did-from-sip'.
Posts: 1
Participants: 1