Re: [Sofia-sip-devel] Internal media error: for calls with 100rel, delayed offer and early_media

2010-09-23 Thread Paulo Pizarro
Attached a patch that fixes the problem.
Now, all check tests run ok.

2010/9/22 Paulo Pizarro paulo.piza...@gmail.com:
 Attached patch with unit test to verify this.

 The patch that corrects this problem is still not ok.

 On the test unit if not send the 180 patch works, but not :(


 2010/9/22 Paulo Pizarro paulo.piza...@gmail.com:
  Attached a patch which fixes the problem of sending the answer SDP on
 the PRACK request.

 Now, all nua tests passed.

 2010/9/22 Paulo Pizarro paulo.piza...@gmail.com:
 2010/9/21 Paulo Pizarro paulo.piza...@gmail.com:
 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 ran autogen.sh, configure, make and make check  again and now NTA check 
 is ok.

 I could not run the nua tests, I hope this patch does not break anything. 
 :)

 I ran nua tests and the patch doesn't work.

 The following tests after applying the patch failed:

 check_session.c:1622:E:2.5 - Call with preconditions:call_2_5_1:0:
 (after this point) Test timeout expired
 check_session.c:1704:F:2.5 - Call with preconditions:call_2_5_2:0:
 Assertion 's2_check_callstate(nua_callstate_completing)' failed
 check_session.c:1781:E:2.5 - Call with preconditions:call_2_5_3:0:
 (after this point) Test timeout expired
 check_etsi.c:334:F:6.1 - ETSI CC OE - Call
 Establishment:SIP_CC_OE_CE_TI_011_012:0: Failure
 's2_sip_check_request_timeout(SIP_METHOD_ACK, 3)' occured

 :(


 Thanks in advance,

 Paulo Pizarro




From 7cc0be3c8bb8c2e9a26b20aafdf75c2524ce9c69 Mon Sep 17 00:00:00 2001
From: Paulo Pizarro paulo.piza...@gmail.com
Date: Thu, 23 Sep 2010 12:03:05 -0300
Subject: [PATCH] Fixed sent answer SDP on the PRACK request


Signed-off-by: Paulo Pizarro paulo.piza...@gmail.com
---
 libsofia-sip-ua/nua/check_session.c |   52 +++
 libsofia-sip-ua/nua/nua_session.c   |6 
 2 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/libsofia-sip-ua/nua/check_session.c b/libsofia-sip-ua/nua/check_session.c
index ed1f575..a8d17b6 100644
--- a/libsofia-sip-ua/nua/check_session.c
+++ b/libsofia-sip-ua/nua/check_session.c
@@ -1570,6 +1570,57 @@ START_TEST(call_2_4_5)
 }
 END_TEST
 
+START_TEST(call_2_4_6)
+{
+  nua_handle_t *nh;
+  struct message *invite, *prack;
+  int with_sdp;
+
+  S2_CASE(2.4.6, Call with 100rel and delayed offer,
+	  NUA sends INVITE without SDP offer, 
+	  receives 183 with SDP offer, sends PRACK with SDP answer, receives 200 for it, 
+	  receives 180, sends PRACK, receives 200 for it, 
+  receives 200, send ACK.);
+
+  nh = nua_handle(nua, NULL, SIPTAG_TO(s2sip-aor), TAG_END());
+
+  invite = invite_sent_by_nua(nh, SOATAG_DELAYED_OFFER_ENABLE(1),
+  SOATAG_USER_SDP_STR(m=audio 5008 RTP/AVP 8 0 CRLF
+  m=video 5010 RTP/AVP 34 CRLF),
+  TAG_END());
+
+  soa_generate_offer(soa, 1, NULL);
+
+  prack = respond_with_100rel(invite, dialog, with_sdp = 1,
+			  SIP_183_SESSION_PROGRESS,
+			  TAG_END());
+  process_answer(prack);
+  s2_sip_respond_to(prack, dialog, SIP_200_OK, TAG_END());
+  s2_sip_free_message(prack), prack = NULL;
+  fail_unless(s2_check_callstate(nua_callstate_proceeding));
+  fail_unless_event(nua_r_prack, 200);
+
+  prack = respond_with_100rel(invite, dialog, with_sdp = 0,
+			  SIP_180_RINGING,
+			  TAG_END());
+  s2_sip_respond_to(prack, dialog, SIP_200_OK, TAG_END());
+  

Re: [Sofia-sip-devel] Internal media error: for calls with 100rel, delayed offer and early_media

2010-09-22 Thread Paulo Pizarro
2010/9/21 Paulo Pizarro paulo.piza...@gmail.com:
 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 ran autogen.sh, configure, make and make check  again and now NTA check is ok.

 I could not run the nua tests, I hope this patch does not break anything. :)

I ran nua tests and the patch doesn't work.

The following tests after applying the patch failed:

check_session.c:1622:E:2.5 - Call with preconditions:call_2_5_1:0:
(after this point) Test timeout expired
check_session.c:1704:F:2.5 - Call with preconditions:call_2_5_2:0:
Assertion 's2_check_callstate(nua_callstate_completing)' failed
check_session.c:1781:E:2.5 - Call with preconditions:call_2_5_3:0:
(after this point) Test timeout expired
check_etsi.c:334:F:6.1 - ETSI CC OE - Call
Establishment:SIP_CC_OE_CE_TI_011_012:0: Failure
's2_sip_check_request_timeout(SIP_METHOD_ACK, 3)' occured

:(


 Thanks in advance,

 Paulo Pizarro


--
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


Re: [Sofia-sip-devel] Internal media error: for calls with 100rel, delayed offer and early_media

2010-09-22 Thread Paulo Pizarro
 Attached a patch which fixes the problem of sending the answer SDP on
the PRACK request.

Now, all nua tests passed.

2010/9/22 Paulo Pizarro paulo.piza...@gmail.com:
 2010/9/21 Paulo Pizarro paulo.piza...@gmail.com:
 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 ran autogen.sh, configure, make and make check  again and now NTA check is 
 ok.

 I could not run the nua tests, I hope this patch does not break anything. :)

 I ran nua tests and the patch doesn't work.

 The following tests after applying the patch failed:

 check_session.c:1622:E:2.5 - Call with preconditions:call_2_5_1:0:
 (after this point) Test timeout expired
 check_session.c:1704:F:2.5 - Call with preconditions:call_2_5_2:0:
 Assertion 's2_check_callstate(nua_callstate_completing)' failed
 check_session.c:1781:E:2.5 - Call with preconditions:call_2_5_3:0:
 (after this point) Test timeout expired
 check_etsi.c:334:F:6.1 - ETSI CC OE - Call
 Establishment:SIP_CC_OE_CE_TI_011_012:0: Failure
 's2_sip_check_request_timeout(SIP_METHOD_ACK, 3)' occured

 :(


 Thanks in advance,

 Paulo Pizarro


From 625f66b579cb628f981d0ee87337e17d93d16efc Mon Sep 17 00:00:00 2001
From: Paulo Pizarro paulo.piza...@gmail.com
Date: Wed, 22 Sep 2010 10:30:06 -0300
Subject: [PATCH] Fixed sent answer SDP on the PRACK request


Signed-off-by: Paulo Pizarro paulo.piza...@gmail.com
---
 libsofia-sip-ua/nua/nua_session.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libsofia-sip-ua/nua/nua_session.c b/libsofia-sip-ua/nua/nua_session.c
index 5bf473c..bb99da6 100644
--- a/libsofia-sip-ua/nua/nua_session.c
+++ b/libsofia-sip-ua/nua/nua_session.c
@@ -1810,6 +1810,8 @@ static int nua_prack_client_request(nua_client_request_t *cr,
   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