[Kamailio-Users] Route-problem, no 487 sent

Magnus Burman magnus.burman at adamoeurope.com
Mon Dec 8 13:36:16 CET 2008


Something fishy is going on with my routing. If my SIP UA 
(91.XXX.XXX.80) hangs up before the receiving end (pstn on 
212.YYY.YYY.84) answers, it keeps ringing forever. Below is my routing 
in regards to CANCEL and the ngrep output. If I understand things 
correctly, I should send a 487 Request Terminated back to the initiating 
UA (sip), and I would get a 487 Request Terminated from the pstn provider.

I'm not sending the 487 to the UA, and I'm guessing I close the session 
before my pstn provider sends one to me, so I don't see it with ngrep?

The big question is ofcourse what I need to do to get on track, sending 
the appropriate 487?

route:
--
#CANCEL processing
if (is_method("CANCEL") || is_method("ACK")) {
    if (t_check_trans()) {
        setflag(1);
        if(!t_relay()) {
            sl_reply_error();
        }
    }
    exit;
};

ngrep output, comments starting with #:
--
U 91.XXX.XXX.80:5060 -> 91.ZZZ.ZZZ.9:5060  CANCEL 
sip:6-------- at 91.ZZZ.ZZZ.9 SIP/2.0
Via: SIP/2.0/UDP 
91.XXX.XXX.80:5060;branch=z9hG4bK1e22091bbd2d0a9b9e0f8de6553d2c27
From: "349--------"<sip:user1 at 91.ZZZ.ZZZ.9>;tag=XG6525p2-b915854d-1373157639
To: <sip:6-------- at 91.ZZZ.ZZZ.9>
Call  -ID: 6C8F-F261-374702698-E353C7B05C17-0006 at 91.XXX.XXX.80
CSeq: 10 CANCEL
Max-Forwards: 70
User-Agent: XAVi/XG6525p2-1.6.7
Content-Length: 0

U 91.ZZZ.ZZZ.9:5060 -> 91.XXX.XXX.80:5060  SIP/2.0 200 canceling
Via: SIP/2.0/UDP 
91.XXX.XXX.80:5060;branch=z9hG4bK1e22091bbd2d0a9b9e0f8de6553d2c27
From: "349--------"<sip:user1 at 91.ZZZ.ZZZ.9>;tag=XG6525p2-b915854d-1373157639
To: <sip:6-------- at 91.ZZZ.ZZZ.9>;tag=bbd8f31c58bc6a3266ec5509a254d55b-cb96
Call-ID: 6C8F-F261-374702698-E353C7B05C17-0006 at 91.XXX.XXX.80
CSeq: 10 CANCEL
Server: Kamailio (1.4.1-notls (i386/linux))
Content-Length: 0


# 487 Request Terminated from 91.ZZZ.ZZZ.9 to 91.XXX.XXX.80 ??


U 91.ZZZ.ZZZ.9:5060 -> 212.YYY.YYY.84:5060  CANCEL 
sip:346-------- at 212.YYY.YYY.84 SIP/2.0
Via: SIP/2.0/UDP 91.ZZZ.ZZZ.9;branch=z9hG4bKe214.208c19e6.0
From: "349--------"<sip:user1 at 91.ZZZ.ZZZ.9>;tag=XG6525p2-b915854d-1373157639
Call-ID: 6C8F-F261-374702698-E353C7B05C17-0006 at 91.XXX.XXX.80
To: <sip:6-------- at 91.ZZZ.ZZZ.9>
CSeq: 10 CANCEL
Max-Forwards: 70
User-Agent: Kamailio (1.4.1-notls (i386/linux))
Content-Length: 0

U 212.YYY.YYY.84:5060 -> 91.ZZZ.ZZZ.9:5060  SIP/2.0 200 OK
Via: SIP/2.0/UDP 91.ZZZ.ZZZ.9:5060;branch=z9hG4bKe214.208c19e6.0
To: <sip:6-------- at 91.ZZZ.ZZZ.9>;tag=a439d513
From: "349--------" 
<sip:user1 at 91.ZZZ.ZZZ.9>;tag=XG6525p2-b915854d-1373157639
Call-ID: 6C8F-F261-374702698-E353C7B05C17-0006 at 91.XXX.XXX.80
CSeq: 10 CANCEL
User-Agent: ENS2.2.122-IS2
Content-Length: 0


# 487 Request Terminated from 212.YYY.YYY.84 to 91.ZZZ.ZZZ.9 ??



Best Regards,
Magnus




More information about the sr-users mailing list