Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-28 Thread Anca Vamanu
Hi Olivier,

Olivier Détour wrote:
 2010/1/22 Olivier Détour chino540off+kamai...@gmail.com:
   
 Hi,

 I understand the problem, but I would like to explain you my topology:

  Broker1 Broker2
  |   |
 Tel(10) -- B2BUA1 -- B2BUA2 -- Tel(20)

 My problem is when 10 calls 20, 20 is ringing (so B2BUAs create their
 UAS and UAC).
 I want to be able to brake the current SIP session at this moment.
 So I send the CANCEL to UAC side on B2BUA1. But B2BUA2 doesn't want to
 receive it,
 because It is not send to sip:s...@1.1.12.3. So message could not be
 transmit to B2BUA2 ...

 Maybe, I don't understand something here, but b2b_entities API could
 be able to manage
 this situation ?

 Regards,

 

 Hi,

 I went through the source code of B2B_entities, and I don't understand
 when you search the dlg in int b2b_prescript_f(struct sip_msg *msg,
 void *uparam) in dlg.c:

   357 while(dlg)
   358 {
   359 if(ruri.len == dlg-ruri.len  strncmp(ruri.s, 
 dlg-ruri.s,
 ruri.len)== 0
   360  dlg-callid.len == 
 callid.len 
   361 strncmp(dlg-callid.s, 
 callid.s, callid.len)== 0 
   362 dlg-tag[CALLER_LEG].len == 
 from_tag.len 
   363 strncmp(dlg-tag[CALLER_LEG].s, 
 from_tag.s, from_tag.len)== 0)

 You check CALLID, FROM_TAG and the REQUEST_URI. If you create the UAS
 with B2BUA_entities,
 Requests send by caller will change Request URI to speaks directly with UAS.

 Why is the RURI in your search?

 When I remove the RURI check, it works as my understanding of the RFC.

 Regards,

   
The RURI check was added exactly because the RFC says that the RURI in 
CANCEL must be exactly the same as the RURI in INVITE:

The following procedures are used to construct a CANCEL request.  The
   Request-URI, Call-ID, To, the numeric part of CSeq, and From header
   fields in the CANCEL request MUST be identical to those in the
   request being cancelled, including tags.


Regards,

-- 
Anca Vamanu
www.voice-system.ro


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-28 Thread Anca Vamanu
Hi Olivier,

First, please do not send email to me privately ( use reply all).
You are saying that the CANCEL send by b2b_entities does not have the 
exact ruri as INVITE?

Can you catch an INVITE and the corresponding CANCEL (send by 
b2b_entities) and send them in an e-mail?

Regards,

-- 
Anca Vamanu
www.voice-system.ro



Olivier Détour wrote:
 On Thu, Jan 28, 2010 at 1:05 PM, Anca Vamanu a...@opensips.org wrote:
   
 Hi Olivier,

 Olivier Détour wrote:
 
 2010/1/22 Olivier Détour chino540off+kamai...@gmail.com:

   
 Hi,

 I understand the problem, but I would like to explain you my topology:

 Broker1 Broker2
 |   |
 Tel(10) -- B2BUA1 -- B2BUA2 -- Tel(20)

 My problem is when 10 calls 20, 20 is ringing (so B2BUAs create their
 UAS and UAC).
 I want to be able to brake the current SIP session at this moment.
 So I send the CANCEL to UAC side on B2BUA1. But B2BUA2 doesn't want to
 receive it,
 because It is not send to sip:s...@1.1.12.3. So message could not be
 transmit to B2BUA2 ...

 Maybe, I don't understand something here, but b2b_entities API could
 be able to manage
 this situation ?

 Regards,


 
 Hi,

 I went through the source code of B2B_entities, and I don't understand
 when you search the dlg in int b2b_prescript_f(struct sip_msg *msg,
 void *uparam) in dlg.c:

  357   while(dlg)
  358   {
  359   if(ruri.len == dlg-ruri.len  strncmp(ruri.s,
 dlg-ruri.s,
 ruri.len)== 0
  360dlg-callid.len == callid.len 
  361   strncmp(dlg-callid.s, callid.s,
 callid.len)== 0 
  362   dlg-tag[CALLER_LEG].len ==
 from_tag.len 
  363   strncmp(dlg-tag[CALLER_LEG].s,
 from_tag.s, from_tag.len)== 0)

 You check CALLID, FROM_TAG and the REQUEST_URI. If you create the UAS
 with B2BUA_entities,
 Requests send by caller will change Request URI to speaks directly with
 UAS.

 Why is the RURI in your search?

 When I remove the RURI check, it works as my understanding of the RFC.

 Regards,


   
 The RURI check was added exactly because the RFC says that the RURI in
 CANCEL must be exactly the same as the RURI in INVITE:

 The following procedures are used to construct a CANCEL request.  The
  Request-URI, Call-ID, To, the numeric part of CSeq, and From header
  fields in the CANCEL request MUST be identical to those in the
  request being cancelled, including tags.


 Regards,

 

 I understand the RFC, but I think B2B_Entities is not able to send a
 CANCEL to another
 B2B_Entities and receive it.

 So There is a problem, I try to make the architecture with 2 B2B, and
 CANCEL is my last problem.
 I would like to understand how to send and receive CANCEL from and to B2B.

 Regards,

   

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-28 Thread Olivier Détour
2010/1/28 Anca Vamanu a...@opensips.org:
 Hi Olivier,

 First, please do not send email to me privately ( use reply all).

Sorry about that, I did not see CC list,

 You are saying that the CANCEL send by b2b_entities does not have the exact
 ruri as INVITE?


No I'm saying exactly the opposite, I know sip's RFC about CANCEL
construction with INVITE header. But there a case, if B2B_entities
communicates with another one, CANCEL is correctly
sent to the second B2B_entities. Did you make some tests with 2 B2B
face to face and try to:
 - CANCEL from a phone and propagate it correctly;

 - CANCEL from a B2B and propagate it to the callee phone;
in this case, what is the best way: Send CANCEL on a side and send a
487 on the other side; or send CANCEL and wait 487 from the callee
phone and propagate it to the caller phone ?

 Can you catch an INVITE and the corresponding CANCEL (send by b2b_entities)
 and send them in an e-mail?


I don't have time to send it before after next week. I will come back
to you after that and I will give you more information about SIP
transmission, and what I am expected for my project.

Regards,

-- 
Olivier Détour

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-23 Thread Olivier Détour
2010/1/22 Olivier Détour chino540off+kamai...@gmail.com:
 Hi,

 I understand the problem, but I would like to explain you my topology:

                      Broker1             Broker2
                          |                       |
 Tel(10) -- B2BUA1 -- B2BUA2 -- Tel(20)

 My problem is when 10 calls 20, 20 is ringing (so B2BUAs create their
 UAS and UAC).
 I want to be able to brake the current SIP session at this moment.
 So I send the CANCEL to UAC side on B2BUA1. But B2BUA2 doesn't want to
 receive it,
 because It is not send to sip:s...@1.1.12.3. So message could not be
 transmit to B2BUA2 ...

 Maybe, I don't understand something here, but b2b_entities API could
 be able to manage
 this situation ?

 Regards,


Hi,

I went through the source code of B2B_entities, and I don't understand
when you search the dlg in int b2b_prescript_f(struct sip_msg *msg,
void *uparam) in dlg.c:

  357   while(dlg)
  358   {
  359   if(ruri.len == dlg-ruri.len  strncmp(ruri.s, 
dlg-ruri.s,
ruri.len)== 0
  360dlg-callid.len == callid.len 
  361   strncmp(dlg-callid.s, callid.s, 
callid.len)== 0 
  362   dlg-tag[CALLER_LEG].len == 
from_tag.len 
  363   strncmp(dlg-tag[CALLER_LEG].s, 
from_tag.s, from_tag.len)== 0)

You check CALLID, FROM_TAG and the REQUEST_URI. If you create the UAS
with B2BUA_entities,
Requests send by caller will change Request URI to speaks directly with UAS.

Why is the RURI in your search?

When I remove the RURI check, it works as my understanding of the RFC.

Regards,

-- 
Olivier Détour

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-22 Thread Olivier Détour
Hi,

I would like to break a SIP communication during a call or a
proceeding SIP session...

If the call is in progress (Caller can speak to Callee), I can send a
BYE to caller and callee each with send_request function;
Here is my Wireshark trace:

BYE sip:s...@1.1.12.3 SIP/2.0
Via: SIP/2.0/UDP 2.2.22.2;branch=z9hG4bKda73.5742b3a7.0
From: sip:1...@2.2.22.2;tag=934c0604001f8a49c065a1707fbb682d-59cf
To: sip:2...@1.1.12.3;tag=B2B.333.0.1264181639
CSeq: 4 BYE
Call-ID: B2B.269.0.1264181639
Content-Length: 0
User-Agent: OpenSIPS (1.6.1-notls (i386/linux))
Contact: sip:s...@2.2.22.2

If the sip session is proceeding (Caller send INVITE but he hasn't
receive 200 OK yet), I send a CANCEL
like I sent the BYE (send_request);
But here is my Wireshark trace:

CANCEL sip:2...@1.1.12.3 SIP/2.0
Via: SIP/2.0/UDP 2.2.22.2;branch=z9hG4bK5161.0ab21263.0
From: sip:1...@2.2.22.2;tag=934c0604001f8a49c065a1707fbb682d-ac1f
To: sip:2...@1.1.12.3
CSeq: 2 CANCEL
Call-ID: B2B.134.0.1264181129
User-Agent: OpenSIPS (1.6.1-notls (i386/linux))
Contact: sip:s...@2.2.22.2

Why is the Request Line not for sip:s...@1.1.12.3 as for the BYE?

Regards,

-- 
Olivier Détour
Sent from Paris, Île-de-France, France

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-22 Thread Bogdan-Andrei Iancu
Hi Oliver,

BYE is a sequential request and id built based on the 200 OK from 
INVITE, while CANCEL is special request that is send before getting the 
200 OK - there are different contexts and the 2 requests are build in 
different ways.

I strongly suggest to read the RFC3261 about building CANCEL and 
sequential request - it the best source.

Regards,
Bogdan

Olivier Détour wrote:
 Hi,

 I would like to break a SIP communication during a call or a
 proceeding SIP session...

 If the call is in progress (Caller can speak to Callee), I can send a
 BYE to caller and callee each with send_request function;
 Here is my Wireshark trace:

 BYE sip:s...@1.1.12.3 SIP/2.0
 Via: SIP/2.0/UDP 2.2.22.2;branch=z9hG4bKda73.5742b3a7.0
 From: sip:1...@2.2.22.2;tag=934c0604001f8a49c065a1707fbb682d-59cf
 To: sip:2...@1.1.12.3;tag=B2B.333.0.1264181639
 CSeq: 4 BYE
 Call-ID: B2B.269.0.1264181639
 Content-Length: 0
 User-Agent: OpenSIPS (1.6.1-notls (i386/linux))
 Contact: sip:s...@2.2.22.2

 If the sip session is proceeding (Caller send INVITE but he hasn't
 receive 200 OK yet), I send a CANCEL
 like I sent the BYE (send_request);
 But here is my Wireshark trace:

 CANCEL sip:2...@1.1.12.3 SIP/2.0
 Via: SIP/2.0/UDP 2.2.22.2;branch=z9hG4bK5161.0ab21263.0
 From: sip:1...@2.2.22.2;tag=934c0604001f8a49c065a1707fbb682d-ac1f
 To: sip:2...@1.1.12.3
 CSeq: 2 CANCEL
 Call-ID: B2B.134.0.1264181129
 User-Agent: OpenSIPS (1.6.1-notls (i386/linux))
 Contact: sip:s...@2.2.22.2

 Why is the Request Line not for sip:s...@1.1.12.3 as for the BYE?

 Regards,

   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-22 Thread Alex Balashov
BYEs are sequential (in-dialog) requests that go to the RURI that is  
the Contact returned in the final 2xx reply.

CANCELs are sent to the proximate endpoint - same RURI as initial  
INVITE request.  They are not sequential requests, are not loose- 
routed, etc.

So, the behaviour you are seeing is normal.

--
Sent from mobile device

On Jan 22, 2010, at 12:55 PM, Olivier Détour chino540off+kamai...@gmail.co 
m wrote:

 Hi,

 I would like to break a SIP communication during a call or a
 proceeding SIP session...

 If the call is in progress (Caller can speak to Callee), I can send a
 BYE to caller and callee each with send_request function;
 Here is my Wireshark trace:

 BYE sip:s...@1.1.12.3 SIP/2.0
 Via: SIP/2.0/UDP 2.2.22.2;branch=z9hG4bKda73.5742b3a7.0
 From: sip:1...@2.2.22.2;tag=934c0604001f8a49c065a1707fbb682d-59cf
 To: sip:2...@1.1.12.3;tag=B2B.333.0.1264181639
 CSeq: 4 BYE
 Call-ID: B2B.269.0.1264181639
 Content-Length: 0
 User-Agent: OpenSIPS (1.6.1-notls (i386/linux))
 Contact: sip:s...@2.2.22.2

 If the sip session is proceeding (Caller send INVITE but he hasn't
 receive 200 OK yet), I send a CANCEL
 like I sent the BYE (send_request);
 But here is my Wireshark trace:

 CANCEL sip:2...@1.1.12.3 SIP/2.0
 Via: SIP/2.0/UDP 2.2.22.2;branch=z9hG4bK5161.0ab21263.0
 From: sip:1...@2.2.22.2;tag=934c0604001f8a49c065a1707fbb682d-ac1f
 To: sip:2...@1.1.12.3
 CSeq: 2 CANCEL
 Call-ID: B2B.134.0.1264181129
 User-Agent: OpenSIPS (1.6.1-notls (i386/linux))
 Contact: sip:s...@2.2.22.2

 Why is the Request Line not for sip:s...@1.1.12.3 as for the BYE?

 Regards,

 -- 
 Olivier Détour
 Sent from Paris, Île-de-France, France

 ___
 Devel mailing list
 Devel@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [B2B_ENTITIES] Difference between sending CANCEL and BYE

2010-01-22 Thread Olivier Détour
Hi,

I understand the problem, but I would like to explain you my topology:

  Broker1 Broker2
  |   |
Tel(10) -- B2BUA1 -- B2BUA2 -- Tel(20)

My problem is when 10 calls 20, 20 is ringing (so B2BUAs create their
UAS and UAC).
I want to be able to brake the current SIP session at this moment.
So I send the CANCEL to UAC side on B2BUA1. But B2BUA2 doesn't want to
receive it,
because It is not send to sip:s...@1.1.12.3. So message could not be
transmit to B2BUA2 ...

Maybe, I don't understand something here, but b2b_entities API could
be able to manage
this situation ?

Regards,

-- 
Olivier Détour
Sent from Paris, Ile-de-France, France

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel