[SR-Users] 407 response from provider as failure route

Yuriy Gorlichenko ovoshlook at gmail.com
Sun Aug 17 13:33:35 CEST 2014


Hi, I want to realise scheme:

Asterisk->Kamailo->provider

I register providers accounts at Kamailio using UAC module.

When Generates call form Asterisk through Kamailio to provider, provider
sends back 407 response. This reponse mut be handled by KAmailio through
failure_route using uac_auth().

I try to catch this response at onreply_route by status and route this
response to failure route (t_in_failure("MY_FAILURE_ROUTE"))but Kamailio
ignores t_on_failure and forvard this pacjet to asterisk.

So My question is: How to handle this response at kamailio and not forward
to asterisk?

This is invite that forwards to provider:

INVITE sip:11234567890 at my.provider.com:5060 SIP/2.0
Record-Route: <sip:my.kamailio.com:5068;nat=yes;ftag=as57a2d34c;lr=on>
Via: SIP/2.0/UDP my.kamailio.com:5068
;branch=z9hG4bK8544.480e25d0e6a328f5f455233d808cda80.0
Via: SIP/2.0/UDP 10.0.1.6:50600;branch=z9hG4bK778521b0;rport=50600
Max-Forwards: 70
From: "John" <sip:my_provider_acc at my.provider.com:50600>;tag=as57a2d34c
To: <sip:11234567890 at my.provider.com:5068>
Contact:<my_provider_acc at my.kamailio.com:5068>
Call-ID: 3d8d6c357d69cdd51633b1c125729f44 at 10.0.1.6:50600
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.4.0
Date: Sat, 16 Aug 2014 13:18:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 540

v=0
o=root 1941643043 1941643043 IN my.kamailio.com
s=Asterisk PBX 12.4.0
c=IN IP4 my.kamailio.com
t=0 0
a=ice-lite
m=audio 30108 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=rtcp:30109
a=ice-ufrag:jOv9GFqq
a=ice-pwd:wuXGbJ3ZI7MfwM6kwto78s8reEyU
a=candidate:lzqT8la5i9wkzQzB 1 UDP 2130706431 my.kamailio.com 30108 typ host
a=candidate:lzqT8la5i9wkzQzB 2 UDP 2130706430 my.kamailio.com 30109 typ host
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140817/cd0067d4/attachment.html>


More information about the sr-users mailing list