Hello,

Sofia seems to be destroying the call leg after receiving a
404 response from a REFER sent with nua_refer().  Is this a bug?
(sofia 1.12.7 / 1.12.8)

Steps to reproduce:

- setup call
- send REFER to other side by calling nua_refer()
- other side replies with 404 Not Found
- later, other side sends a BYE to hangup the call
- sofia responds with 481 Call Does Not Exist  <-- I was not expecting this

On the sofia console, I see:

nta: received 404 Not Found for REFER (97686066)
nta: 404 Not Found is going to a transaction
nta_outgoing: RTT is 1.015 ms
tport_release(0x804d820): 0x8055028 by 0x80558b0 with 0x8056240
nua(0x8051d08): removing subscribe usage with event refer
nua(0x8051d08): removing session usage
soa_destroy(static::0x8052040) called
nta_leg_destroy(0x8052330)  <------- why is leg destroyed!?
nta: received BYE sip:192.168.1.101:6060 SIP/2.0 (CSeq 103)
nta: canonizing sip:192.168.1.101:6060 with contact
nta: BYE (103) --going to a default leg
nua: nua_stack_process_request: entering
tport_tsend(0x804d820) tpn = UDP/192.168.1.250:5085
tport_resolve addrinfo = 192.168.1.250:5085
tport_by_addrinfo(0x804d820): not found by name UDP/192.168.1.250:5085
tport_vsend returned 461
nta: sent 481 Call Does Not Exist for BYE (103)

Here is some code snippets in my test client that may be relevant:

    nua_set_params(nua,
                   NUTAG_APPL_METHOD("REFER"),
                   NUTAG_AUTOANSWER(0),
                   NUTAG_AUTOALERT(0),
                   TAG_END()
                   );

    if (event == nua_i_active) {
        // once the call is up send an outgoing refer to a non-existent
extension
        nua_refer(nh, SIPTAG_REFER_TO_STR("800"),TAG_END());
    }


and here is the entire SIP trace (sorry for the long post, let
me know preferred way to post SIP traces):

U 192.168.1.250:5085 -> 127.0.0.1:6060
INVITE sip:[EMAIL PROTECTED]:6060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK3afe0030;rport.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>.
Contact: <sip:[EMAIL PROTECTED]:5085>.
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Date: Mon, 07 Apr 2008 23:23:04 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Content-Type: application/sdp.
Content-Length: 265.
.
v=0.
o=root 29391 29391 IN IP4 192.168.1.250.
s=session.
c=IN IP4 192.168.1.250.
t=0 0.
m=audio 11816 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=silenceSupp:off - - - -.


U 127.0.0.1:6060 -> 192.168.1.250:5085
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK3afe0030;rport=5085.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>.
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE.
User-Agent: sofia-sip/1.12.7.
Content-Length: 0.
.


U 127.0.0.1:6060 -> 192.168.1.250:5085
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK3afe0030;rport=5085.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE.
Contact: <sip:192.168.1.101:6060>.
User-Agent: sofia-sip/1.12.7.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE.
Supported: timer, 100rel.
Content-Length: 0.
.


U 127.0.0.1:6060 -> 192.168.1.250:5085
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK3afe0030;rport=5085.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE.
Contact: <sip:192.168.1.101:6060>.
User-Agent: sofia-sip/1.12.7.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE.
Supported: timer, 100rel.
Min-SE: 120.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 153.
.
v=0.
o=- 316357719121362442 2289520079847105457 IN IP4 192.168.1.101.
s=-.
c=IN IP4 192.168.1.101.
t=0 0.
m=audio 49984 RTP/AVP 0.
a=rtpmap:0 PCMU/8000.


U 192.168.1.250:5085 -> 192.168.1.101:6060
ACK sip:192.168.1.101:6060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK4959aa7e;rport.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
Contact: <sip:[EMAIL PROTECTED]:5085>.
Call-ID: [EMAIL PROTECTED]
CSeq: 102 ACK.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Content-Length: 0.
.


U 192.168.1.101:6060 -> 192.168.1.250:5085
REFER sip:[EMAIL PROTECTED]:5085 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.101:6060;rport;branch=z9hG4bKgmQSQ79XKBa3K.
Max-Forwards: 70.
From: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
To: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
Call-ID: [EMAIL PROTECTED]
CSeq: 97686956 REFER.
Contact: <sip:192.168.1.101:6060>.
User-Agent: sofia-sip/1.12.7.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE.
Supported: timer, 100rel.
Refer-To: <800>.
Referred-By: <sip:192.168.1.101:6060>.
Content-Length: 0.
.


U 192.168.1.250:5085 -> 192.168.1.101:6060
SIP/2.0 404 Not Found.
Via: SIP/2.0/UDP 192.168.1.101:6060
;rport;branch=z9hG4bKgmQSQ79XKBa3K;received=192.168.1.101.
From: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
To: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
Call-ID: [EMAIL PROTECTED]
CSeq: 97686956 REFER.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Max-Forwards: 70.
Contact: <sip:[EMAIL PROTECTED]:5085>.
Accept: application/sdp.
Content-Length: 0.
.


U 192.168.1.250:5085 -> 192.168.1.101:6060
BYE sip:192.168.1.101:6060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK4064e274;rport.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
Contact: <sip:[EMAIL PROTECTED]:5085>.
Call-ID: [EMAIL PROTECTED]
CSeq: 103 BYE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Content-Length: 0.
.


U 192.168.1.101:6060 -> 192.168.1.250:5085
SIP/2.0 481 Call Does Not Exist.
Via: SIP/2.0/UDP 192.168.1.250:5085;branch=z9hG4bK4064e274;rport=5085.
From: <sip:[EMAIL PROTECTED]:5085>;tag=as523fe68c.
To: <sip:[EMAIL PROTECTED]:6060>;tag=g6Za6KppF4N0B.
Call-ID: [EMAIL PROTECTED]
CSeq: 103 BYE.
User-Agent: sofia-sip/1.12.7.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE.
Supported: timer, 100rel.
Content-Length: 0.
.


--

Regards,
Traun
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to