Dear all,
The useragent "A" sent a INVITE without the SDP offer, the useragent
"B" sent a 183 with the SDP offer and the useragent "A" sent a PRACK
with a SDP answer. The O/A round is complete. After that, the
useragent "B" answer the call (sent 200 to INVITE) and then "nua" sent
a BYE (900 internal media error).
A B
--------------INVITE------------>
<---------183 (offer)-------------
--------PRACK (answer)----->
<---------200/PRACK----------
<---------------180----------------
--------------PRACK----------->
<------------200/PRACK-------
<-----------------200-------------
------------------ACK----------->
When "nua" receives the SDP offer on the 183, it calls
"soa_generate_answer" and sent the SDP answer on the PRACK of the 183.
The O/A round is complete.
When "nua" receives the 200 from the INVITE, it calls
"soa_generate_answer" again, but now it generates an error (900
Internal media error) because there is no negotiation in progress.
Attached log of call.
Attached a patch to fixes this problem.
With the latest git code, make check fails during check_nta:
make[4]: Entrando no diretório
`/home/pizarro/workspace/src/sofia-sip/sofia-sip-git/libsofia-sip-ua/nta'
COMPILE check_nta.o
COMPILE check_nta_api.o
COMPILE check_nta_client.o
LINK check_nta
check_nta.o: In function `main':
/home/pizarro/workspace/src/sofia-sip/sofia-sip-git/libsofia-sip-ua/nta/check_nta.c:116:
undefined reference to `check_nta_server_3_0'
collect2: ld returned 1 exit status
make[4]: ** [check_nta] Erro 1
I could not run the nua tests, I hope this patch does not break anything. :)
Thanks in advance,
Paulo Pizarro
nua: nua_create: entering
nua: nua_stack_init: entering
nua: nua_stack_set_params: entering
soa_create("default", 0x935fea0, 0x935ff28) called
soa_set_params(static::0x936a708, ...) called
soa_set_params(static::0x936a708, ...) called
nta_agent_create: initialized hash tables
nta_agent_create: initialized transports
nta_agent_create: initialized random identifiers
nta_agent_create: initialized timer
nta_agent_create: initialized resolver
tport_create(): 0x9356828
nta: master transport created
tport_bind_server(0x9356828) to udp/*:5062/sip
tport_bind_server(0x9356828): calling tport_listen for udp
tport_alloc_primary(0x9356828): new primary tport 0x9353ec0
tport_listen(0x9353ec0): listening at udp/192.168.171.95:5062/sip
tport_bind_server(0x9356828): calling tport_listen for udp
tport_alloc_primary(0x9356828): new primary tport 0x9354188
tport_listen(0x9354188): listening at udp/127.0.0.1:5062/sip
tport_bind_server(0x9356828): calling tport_listen for udp
tport_alloc_primary(0x9356828): new primary tport 0x9354430
tport_listen(0x9354430): listening at udp/[::1]:5062/sip
nta: bound to (*:5062;transport=udp)
nta: agent_init_via: SIP/2.0/udp 192.168.171.95:5062 (sip)
nta: agent_init_via: SIP/2.0/udp 127.0.0.1:5062 (sip)
nta: agent_init_via: SIP/2.0/udp [::1]:5062 (sip)
nta: Via fields initialized
nta: Contact header created
soa_media_features(static::0x936a708, 0, 0x935ff28) called
nua_register: Adding contact URL '192.168.171.95' to list.
nua_register: ignoring contact candidate 127.0.0.1:5062.
nua_register: ignoring contact candidate [::1]:5062.
nua: nua_set_params: entering
nua((nil)): sent signal r_set_params
nua: nh_create_handle: entering
nua((nil)): recv signal r_set_params
nua: nua_stack_set_params: entering
soa_set_params(static::0x936a708, ...) called
soa_set_capability_sdp(static::0x936a708, (nil), 0x9361924, -1) called
soa_init_sdp_connection_with_session: selected IN IP4 192.168.171.95 (a local address)
nua((nil)): event r_set_params 200 OK
nua: nua_application_event: entering
nua: nua_set_hparams: entering
nua(0x93699e8): sent signal r_set_params
nua: nua_invite: entering
nua(0x93699e8): sent signal r_invite
nua(0x93699e8): recv signal r_set_params
nua: nua_stack_set_params: entering
soa_clone(static::0x936a708, 0x935fea0, 0x93699e8) called
soa_set_params(static::0x936ec28, ...) called
soa_set_params(static::0x936ec28, ...) called
soa_set_user_sdp(static::0x936ec28, (nil), 0x936e6c4, -1) called
nua(0x93699e8): event r_set_params 200 OK
nua(0x93699e8): recv signal r_invite
nua: nua_stack_set_params: entering
soa_set_params(static::0x936ec28, ...) called
nua(0x93699e8): adding session usage
nta_leg_tcreate(0x936fbb8)
soa_init_offer_answer(static::0x936ec28) called
nta: selecting scheme sip
tport_tsend(0x9353ec0) tpn = udp/127.0.0.1:5060
tport_resolve addrinfo = 127.0.0.1:5060
tport_by_addrinfo(0x9353ec0): not found by name udp/127.0.0.1:5060
tport_vsend(0x9353ec0): 497 bytes of 497 to udp/127.0.0.1:5060
tport_vsend returned 497
send 497 bytes to udp/[127.0.0.1]:5060 at 20:59:15.104366:
------------------------------------------------------------------------
INVITE sip:1...@127.0.0.1;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.171.95:5062;rport;branch=z9hG4bKZ1NZU0H2Q5KmH
Max-Forwards: 70
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215313 INVITE
Contact: <sip:1...@192.168.171.95:5062;transport=udp>
User-Agent: sip
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel
Content-Length: 0
------------------------------------------------------------------------
nta: sent INVITE (2215313) to udp/127.0.0.1:5060
tport_pend(0x9353ec0): pending 0x936fe40 for udp/192.168.171.95:5062 (already 0)
nta: timer set to 32000 ms
nta: timer shortened to 500 ms
nua(0x93699e8): call state changed: init -> calling
nua(0x93699e8): event i_state INVITE sent
tport_wakeup_pri(0x9353ec0): events IN
tport_recv_event(0x9353ec0)
tport_recv_iovec(0x9353ec0) msg 0x9370bb8 from (udp/192.168.171.95:5062) has 276 bytes, veclen = 1
recv 276 bytes from udp/[127.0.0.1]:5060 at 20:59:15.106598:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.171.95:5062;rport=5062;branch=z9hG4bKZ1NZU0H2Q5KmH
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215313 INVITE
User-Agent: sip
Content-Length: 0
------------------------------------------------------------------------
tport_deliver(0x9353ec0): msg 0x9370bb8 (276 bytes) from udp/127.0.0.1:5062/sip next=(nil)
nta: received 100 Trying for INVITE (2215313)
nta: 100 Trying is going to a transaction
nta_outgoing: RTT is 5.199 ms
tport_release(0x9353ec0): 0x936fe40 by 0x93704e0 with 0x9370bb8 (preliminary)
nua: nua_application_event: entering
nua: nua_application_event: entering
tport_wakeup_pri(0x9353ec0): events IN
tport_recv_event(0x9353ec0)
tport_recv_iovec(0x9353ec0) msg 0x9370b38 from (udp/192.168.171.95:5062) has 774 bytes, veclen = 1
recv 774 bytes from udp/[127.0.0.1]:5060 at 20:59:15.109677:
------------------------------------------------------------------------
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.171.95:5062;rport=5062;branch=z9hG4bKZ1NZU0H2Q5KmH
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215313 INVITE
Contact: <sip:192.168.171.95;transport=udp>
RSeq: 334521911
User-Agent: sip
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Require: 100rel
Supported: timer, 100rel
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 179
v=0
o=- 8246590323058165217 7910219771899558014 IN IP4 192.168.171.95
s=-
c=IN IP4 192.168.171.95
t=0 0
m=audio 4000 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
------------------------------------------------------------------------
tport_deliver(0x9353ec0): msg 0x9370b38 (774 bytes) from udp/127.0.0.1:5062/sip next=(nil)
nta: received 183 Session Progress for INVITE (2215313)
nta: 183 Session Progress is going to a transaction
tport_release(0x9353ec0): 0x936fe40 by 0x93704e0 with 0x9370b38 (preliminary)
nta: 183 Session Progress is reliably received with RSeq: 334521911
nta: 183 Session Progress with initial RSeq: 334521911 outside dialog
soa_set_remote_sdp(static::0x936ec28, (nil), 0x937153b, 179) called
nua(0x93699e8): INVITE: got SDP offer in 183 Session Progress
nua(0x93699e8): event r_invite 183 Session Progress
nua: nua_stack_set_params: entering
soa_set_params(static::0x936ec28, ...) called
soa_generate_answer(static::0x936ec28) called
soa_static_offer_answer_action(0x936ec28, soa_generate_answer): called
soa_static(0x936ec28, soa_generate_answer): generating local description
soa_static(0x936ec28, soa_generate_answer): upgrade with remote description
soa_sdp_mode_set(0xbffd8aa4, 0x9372338, ""): called
soa_init_sdp_connection_with_session: selected IN IP4 192.168.171.95 (a local address)
soa_static(0x936ec28, soa_generate_answer): storing local description
soa_get_local_sdp(static::0x936ec28, [(nil)], [0xbffd8bbc], [0xbffd8bb8]) called
soa_activate(static::0x936ec28, (nil)) called
nta: selecting scheme sip
tport_tsend(0x9353ec0) tpn = udp/192.168.171.95:5060
tport_resolve addrinfo = 192.168.171.95:5060
tport_by_addrinfo(0x9353ec0): not found by name udp/192.168.171.95:5060
tport_vsend(0x9353ec0): 707 bytes of 707 to udp/192.168.171.95:5060
tport_vsend returned 707
send 707 bytes to udp/[192.168.171.95]:5060 at 20:59:15.111153:
------------------------------------------------------------------------
PRACK sip:192.168.171.95;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.171.95:5062;rport;branch=z9hG4bK0aFrXU25mea7c
Max-Forwards: 70
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215314 PRACK
RAck: 334521911 2215313 INVITE
User-Agent: sip
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 154
v=0
o=- 908103786301127868 4271323398744848526 IN IP4 192.168.171.95
s=-
c=IN IP4 192.168.171.95
t=0 0
m=audio 4002 RTP/AVP 8
a=rtpmap:8 PCMA/8000
------------------------------------------------------------------------
nta: sent PRACK (2215314) to udp/192.168.171.95:5060
tport_pend(0x9353ec0): pending 0x93729e0 for udp/192.168.171.95:5062 (already 1)
nua(0x93699e8): call state changed: calling -> proceeding, received offer, and sent answer
soa_get_remote_sdp(static::0x936ec28, [0xbffd8e0c], [0xbffd8e08], [(nil)]) called
soa_get_local_sdp(static::0x936ec28, [0xbffd8e04], [0xbffd8e00], [(nil)]) called
soa_get_params(static::0x936ec28, ...) called
nua(0x93699e8): event i_state 183 Session Progress
nua: nua_application_event: entering
nua: nua_application_event: entering
tport_wakeup_pri(0x9353ec0): events IN
tport_recv_event(0x9353ec0)
tport_recv_iovec(0x9353ec0) msg 0x9375a68 from (udp/192.168.171.95:5062) has 483 bytes, veclen = 1
recv 483 bytes from udp/[192.168.171.95]:5060 at 20:59:15.113108:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.171.95:5062;rport=5062;branch=z9hG4bK0aFrXU25mea7c
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215314 PRACK
Contact: <sip:192.168.171.95;transport=udp>
User-Agent: sip
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel
Content-Length: 0
------------------------------------------------------------------------
tport_deliver(0x9353ec0): msg 0x9375a68 (483 bytes) from udp/192.168.171.95:5062/sip next=(nil)
nta: received 200 OK for PRACK (2215314)
nta: 200 OK is going to a transaction
nta_outgoing: RTT is 2.728 ms
tport_release(0x9353ec0): 0x93729e0 by 0x93737d0 with 0x9375a68
nua(0x93699e8): event r_prack 200 OK
nua(0x93699e8): call state changed: proceeding -> proceeding
nua(0x93699e8): event i_state 200 OK
nua: nua_application_event: entering
nua: nua_application_event: entering
tport_wakeup_pri(0x9353ec0): events IN
tport_recv_event(0x9353ec0)
tport_recv_iovec(0x9353ec0) msg 0x93780f8 from (udp/192.168.171.95:5062) has 459 bytes, veclen = 1
recv 459 bytes from udp/[127.0.0.1]:5060 at 20:59:15.610386:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.171.95:5062;rport=5062;branch=z9hG4bKZ1NZU0H2Q5KmH
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215313 INVITE
Contact: <sip:192.168.171.95;transport=udp>
User-Agent: sip
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel
Content-Length: 0
------------------------------------------------------------------------
tport_deliver(0x9353ec0): msg 0x93780f8 (459 bytes) from udp/127.0.0.1:5062/sip next=(nil)
nta: received 200 OK for INVITE (2215313)
nta: 200 OK is going to a transaction
tport_release(0x9353ec0): 0x936fe40 by 0x93704e0 with 0x93780f8
nua(0x93699e8): event r_invite 200 OK
soa_generate_answer(static::0x936ec28) called
nta: selecting scheme sip
tport_tsend(0x9353ec0) tpn = udp/192.168.171.95:5060
tport_resolve addrinfo = 192.168.171.95:5060
tport_by_addrinfo(0x9353ec0): not found by name udp/192.168.171.95:5060
tport_vsend(0x9353ec0): 313 bytes of 313 to udp/192.168.171.95:5060
tport_vsend returned 313
send 313 bytes to udp/[192.168.171.95]:5060 at 20:59:15.611213:
------------------------------------------------------------------------
ACK sip:192.168.171.95;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.171.95:5062;rport;branch=z9hG4bK1K8gZpK9HQ0Sr
Max-Forwards: 70
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215313 ACK
Content-Length: 0
------------------------------------------------------------------------
nta: sent ACK (2215313) to udp/192.168.171.95:5060
nua(0x93699e8): event i_media_error 900 Internal media error
nua: nua_stack_set_params: entering
soa_terminate(static::0x936ec28) called
soa_init_offer_answer(static::0x936ec28) called
nta: selecting scheme sip
tport_tsend(0x9353ec0) tpn = udp/192.168.171.95:5060
tport_resolve addrinfo = 192.168.171.95:5060
tport_by_addrinfo(0x9353ec0): not found by name udp/192.168.171.95:5060
tport_vsend(0x9353ec0): 505 bytes of 505 to udp/192.168.171.95:5060
tport_vsend returned 505
send 505 bytes to udp/[192.168.171.95]:5060 at 20:59:15.611902:
------------------------------------------------------------------------
BYE sip:192.168.171.95;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.171.95:5062;rport;branch=z9hG4bK2v190H4cF0pcm
Max-Forwards: 70
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215315 BYE
User-Agent: sip
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel
Reason: SIP;cause=500;text="Internal media error"
Content-Length: 0
------------------------------------------------------------------------
nta: sent BYE (2215315) to udp/192.168.171.95:5060
tport_pend(0x9353ec0): pending 0x93724d0 for udp/192.168.171.95:5062 (already 0)
nua(0x93699e8): call state changed: proceeding -> terminating
nua(0x93699e8): event i_state 200 OK
nua: nua_application_event: entering
nua: nua_application_event: entering
nua: nua_respond: entering
nua(0x93699e8): sent signal r_respond
nua: nua_handle_destroy: entering
nua(0x93699e8): sent signal r_destroy
nua: nua_application_event: entering
nua(0x93699e8): event i_state dropped
nta: timer set next to 497 ms
tport_wakeup_pri(0x9353ec0): events IN
tport_recv_event(0x9353ec0)
tport_recv_iovec(0x9353ec0) msg 0x937a180 from (udp/192.168.171.95:5062) has 411 bytes, veclen = 1
recv 411 bytes from udp/[192.168.171.95]:5060 at 20:59:15.612785:
------------------------------------------------------------------------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.171.95:5062;rport=5062;branch=z9hG4bK2v190H4cF0pcm
From: <sip:1...@127.0.0.1>;tag=ZNDKXZ1HcQ12p
To: <sip:1...@127.0.0.1>;tag=ya0X0gSXjD23D
Call-ID: ef0d3238-4065-122e-3199-0019b953f6df
CSeq: 2215315 BYE
User-Agent: sip
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, INFO
Supported: timer, 100rel
Content-Length: 0
------------------------------------------------------------------------
tport_deliver(0x9353ec0): msg 0x937a180 (411 bytes) from udp/192.168.171.95:5062/sip next=(nil)
nta: received 200 OK for BYE (2215315)
nta: 200 OK is going to a transaction
nta_outgoing: RTT is 1.452 ms
tport_release(0x9353ec0): 0x93724d0 by 0x93734c0 with 0x937a180
nua(0x93699e8): event r_bye 200 OK
nua(0x93699e8): call state changed: terminating -> terminated
nua(0x93699e8): event i_state 200 to BYE
nua(0x93699e8): event i_terminated 200 to BYE
nua(0x93699e8): removing session usage
soa_destroy(static::0x936ec28) called
nta_leg_destroy(0x936fbb8)
nua: terminated session 0x93699e8
nua(0x93699e8): recv signal r_respond 900
nua(0x93699e8): event i_error 500 Responding to a Non-Existing Request
nua(0x93699e8): recv signal r_destroy
nta_leg_destroy((nil))
nta: timer set next to 4003 ms
nua: nua_shutdown: entering
nua((nil)): sent signal r_shutdown
nua((nil)): recv signal r_shutdown
nua: nua_stack_shutdown: entering
soa_destroy(static::0x936a708) called
nta: outgoing_free(0x93704e0)
nta: outgoing_free(0x9371e60)
nta: outgoing_free(0x93790d0)
nta: outgoing_free(0x93737d0)
nta: outgoing_free(0x93734c0)
tport_destroy(0x9356828)
nua((nil)): event r_shutdown 200 Shutdown successful
nua: nua_application_event: entering
nua: nua_destroy: entering
nua: nua_stack_deinit: entering
From e5b424cd806d6f7f334a27b71f9cc4af9759cc37 Mon Sep 17 00:00:00 2001
From: Paulo Pizarro <paulo.piza...@gmail.com>
Date: Tue, 21 Sep 2010 19:57:24 -0300
Subject: [PATCH] Fixed Internal media error: for calls with 100rel, delayed offer and early_media
Signed-off-by: Paulo Pizarro <paulo.piza...@gmail.com>
---
libsofia-sip-ua/nua/nua_session.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libsofia-sip-ua/nua/nua_session.c b/libsofia-sip-ua/nua/nua_session.c
index 7a2edc3..d942112 100644
--- a/libsofia-sip-ua/nua/nua_session.c
+++ b/libsofia-sip-ua/nua/nua_session.c
@@ -1814,8 +1814,8 @@ static int nua_prack_client_request(nua_client_request_t *cr,
retval = nua_base_client_request(cr, msg, sip, NULL);
if (retval == 0) {
- cr->cr_offer_sent = offer_sent;
- cr->cr_answer_sent = answer_sent;
+ cri->cr_offer_sent = offer_sent;
+ cri->cr_answer_sent = answer_sent;
if (offer_sent)
ss->ss_oa_sent = Offer;
--
1.7.0.4
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel