[Presence] How to receive presence NOTIFY over TCP ?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
Hi

Using opensips 1.6 we need to have the presence module to send NOTIFY over TCP rather than UDP when the size of the message is greater than a given MTU.

We tried to force it sending a SUBSCRIBE with transport=tcp in Contact header:

SUBSCRIBE [hidden email] SIP/2.0
[...]
Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
Event: presence

but the NOTIFY messages are sent over UDP (observe the "transport=tcp" in the request line):

NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
[...]
Subscription-State: active;expires=120
Content-Type: application/pidf+xml
Content-Length: 1254

Could you please let me know what we should do to enable the sending over TCP ? I don't understand what we're doing wrong.

Cheers
Pascal

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Iñaki Baz Castillo
2010/3/9 Pascal Maugeri <[hidden email]>:

> Hi
> Using opensips 1.6 we need to have the presence module to send NOTIFY over
> TCP rather than UDP when the size of the message is greater than a given
> MTU.
> We tried to force it sending a SUBSCRIBE with transport=tcp in Contact
> header:
>
> SUBSCRIBE sip:[hidden email] SIP/2.0
> [...]
> Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
> Event: presence
>
> but the NOTIFY messages are sent over UDP (observe the "transport=tcp" in
> the request line):
>
> NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
> [...]
> Contact: <sip:sa@213.151.105.170:6667>
> Subscription-State: active;expires=120
> Content-Type: application/pidf+xml
> Content-Length: 1254
>
> Could you please let me know what we should do to enable the sending over
> TCP ? I don't understand what we're doing wrong.


How exactly does your topology look? Is there a SIP proxy between the
watcher and OpenSIPS (acting as presence server)?
In that case if the SIP proxy relays the SUSBCRIBE to OpenSIPS via UDP
then the NOTIFY will use UDP from OpenSIPS to the proxy and TCP from
the proxy to the watcher.

In order to force TCP also for communication between th eproxy and the
presence server you must add ";transport=tcp" to $du (better than
rewriting $ru).

Regards.


--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Anca Vamanu-2
In reply to this post by Pascal Maugeri
Hi Pascal,

We found the problem - the socket on which the Subscribe was received
was always used when sending the Notify.
Find attached a patch for tm module that should fix this problem. Please
test and report the results.

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:

> Hi
>
> Using opensips 1.6 we need to have the presence module to send NOTIFY
> over TCP rather than UDP when the size of the message is greater than
> a given MTU.
>
> We tried to force it sending a SUBSCRIBE with transport=tcp in Contact
> header:
>
>     SUBSCRIBE sip:[hidden email]
>     <mailto:sip%[hidden email]> SIP/2.0
>     [...]
>     Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
>     Event: presence
>
>
> but the NOTIFY messages are sent over UDP (observe the "transport=tcp"
> in the request line):
>
>     NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
>     [...]
>     Contact: <sip:sa@213.151.105.170:6667
>     <http://sip:sa@213.151.105.170:6667>>
>     Subscription-State: active;expires=120
>     Content-Type: application/pidf+xml
>     Content-Length: 1254
>
>
> Could you please let me know what we should do to enable the sending
> over TCP ? I don't understand what we're doing wrong.
>
> Cheers
> Pascal
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  

Index: modules/tm/uac.c
===================================================================
--- modules/tm/uac.c (revision 6669)
+++ modules/tm/uac.c (working copy)
@@ -207,6 +207,7 @@
  int ret, flags, sflag_bk;
  int backup_route_type;
  unsigned int hi;
+ struct socket_info* send_sock;
 
  ret=-1;
 
@@ -218,22 +219,27 @@
 
  LM_DBG("next_hop=<%.*s>\n",dialog->hooks.next_hop->len,
  dialog->hooks.next_hop->s);
- /* it's a new message, so we will take the default socket */
- if (dialog->send_sock) {
- if (uri2su( dialog->hooks.next_hop, &to_su,
- dialog->send_sock->proto)==-1) {
- goto error2;
- }
- } else {
- dialog->send_sock = uri2sock(0, dialog->hooks.next_hop, &to_su,
+
+ /* calculate the socket corresponding to next hop */
+ send_sock = uri2sock(0, dialog->hooks.next_hop, &to_su,
  PROTO_NONE);
- if (dialog->send_sock==0) {
- ret=ser_error;
- LM_ERR("no socket found\n");
- goto error2;
- }
+ if (dialog->send_sock==0) {
+ ret=ser_error;
+ LM_ERR("no socket found\n");
+ goto error2;
  }
+ /* if a send socket defined verify if the same protocol */
+ if(dialog->send_sock) {
+ if(send_sock->proto == dialog->send_sock->proto)
+ send_sock = dialog->send_sock;
+ }
+ else
+ {
+ /* to keep the previous behavior when this filed was filled */
+ dialog->send_sock = send_sock;
+ }
 
+ LM_DBG("t_uac\n");
  new_cell = build_cell(0);
  if (!new_cell) {
  ret=E_OUT_OF_MEM;
@@ -261,8 +267,8 @@
 
  request = &new_cell->uac[0].request;
  request->dst.to = to_su;
- request->dst.send_sock = dialog->send_sock;
- request->dst.proto = dialog->send_sock->proto;
+ request->dst.send_sock = send_sock;
+ request->dst.proto = send_sock->proto;
  request->dst.proto_reserved1 = 0;
 
  hi=dlg2hash(dialog);
@@ -312,7 +318,7 @@
  "%p %p\n",req->add_rm, req->body_lumps);
  /* build the shm buffer now */
  buf1 = build_req_buf_from_sip_req(req,(unsigned int*)&buf_len1,
- dialog->send_sock, dialog->send_sock->proto,
+ send_sock, send_sock->proto,
  MSG_TRANS_SHM_FLAG|MSG_TRANS_NOVIA_FLAG );
  if (!buf1) {
  LM_ERR("no more shm mem\n");

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Anca Vamanu-2
Iñaki Baz Castillo wrote:

> 2010/3/9 Anca Vamanu <[hidden email]>:
>  
>> Hi Pascal,
>>
>> We found the problem - the socket on which the Subscribe was received was
>> always used when sending the Notify.
>> Find attached a patch for tm module that should fix this problem. Please
>> test and report the results.
>>    
>
> Hi Anca, could you please explain the problem?
>
>
>  
Hi Inaki,

The core of the problem was in tm module. When sending out a request it
is possible to specify a preferred socket to use. What the tm module did
was to use this socket if defined without any other checks. The problem
was when the next hop required a different protocol than the one of the
specified socket. What the fix does, it to use the preferred socked only
if the protocol matches the one of the next hop.
What happened in the case that Pascal observed was that the Subscribe
was received on udp, but the contact required tcp. Since the logic in
presence is to specify the socket on which the Subscribe was received as
preferred socket as preferred socket for Notify, the tm module sent the
Notify on udp even though the next hop had protocol tcp. With the fix,
the protocol mismatch will be observed and the Notify should be sent on
tcp as specified in the next hop.

Regards,

--
Anca Vamanu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Iñaki Baz Castillo
2010/3/9 Anca Vamanu <[hidden email]>:

>> Hi Anca, could you please explain the problem?
>>
>>
>>
> Hi Inaki,
>
> The core of the problem was in tm module. When sending out a request it
> is possible to specify a preferred socket to use. What the tm module did
> was to use this socket if defined without any other checks. The problem
> was when the next hop required a different protocol than the one of the
> specified socket. What the fix does, it to use the preferred socked only
> if the protocol matches the one of the next hop.
> What happened in the case that Pascal observed was that the Subscribe
> was received on udp, but the contact required tcp. Since the logic in
> presence is to specify the socket on which the Subscribe was received as
> preferred socket as preferred socket for Notify, the tm module sent the
> Notify on udp even though the next hop had protocol tcp. With the fix,
> the protocol mismatch will be observed and the Notify should be sent on
> tcp as specified in the next hop.

Ok, thanks a lot.

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
In reply to this post by Anca Vamanu-2
Hi Anca

We just tested the patch you sent us but we don't see any difference.

Just in case, we recompiled the whole server (first we updated to rev 6700) and applied the patch you kindly sent us:

svn update
...
patch -p0 < tm_proto_fix.patch
make all
make install
service opensips restart   

The NOTIFY message is still sent over UDP :-(

What information could we send you in order to help you ?

A big thank you for your help and fast answer!

Cheers
Pascal

On Tue, Mar 9, 2010 at 4:55 PM, Anca Vamanu <[hidden email]> wrote:
Hi Pascal,

We found the problem - the socket on which the Subscribe was received was always used when sending the Notify.
Find attached a patch for tm module that should fix this problem. Please test and report the results.

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:
Hi

Using opensips 1.6 we need to have the presence module to send NOTIFY over TCP rather than UDP when the size of the message is greater than a given MTU.

We tried to force it sending a SUBSCRIBE with transport=tcp in Contact header:

   SUBSCRIBE [hidden email]
   <mailto:[hidden email]> SIP/2.0

   [...]
   Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
   Event: presence


but the NOTIFY messages are sent over UDP (observe the "transport=tcp" in the request line):

   NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
   [...]
   Contact: <sip:sa@213.151.105.170:6667
   <http://sip:sa@213.151.105.170:6667>>

   Subscription-State: active;expires=120
   Content-Type: application/pidf+xml
   Content-Length: 1254


Could you please let me know what we should do to enable the sending over TCP ? I don't understand what we're doing wrong.

Cheers
Pascal
------------------------------------------------------------------------


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Anca Vamanu-2
Hi Pascal,

Please try this revised patch. It is also against svn, take a new copy
of the tm module and apply it.

Thanks and regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:

> Hi Anca
>
> We just tested the patch you sent us but we don't see any difference.
>
> Just in case, we recompiled the whole server (first we updated to rev
> 6700) and applied the patch you kindly sent us:
>
>     svn update
>     ...
>     patch -p0 < tm_proto_fix.patch
>     make all
>     make install
>     service opensips restart  
>
>
> The NOTIFY message is still sent over UDP :-(
>
> What information could we send you in order to help you ?
>
> A big thank you for your help and fast answer!
>
> Cheers
> Pascal
>
> On Tue, Mar 9, 2010 at 4:55 PM, Anca Vamanu <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Pascal,
>
>     We found the problem - the socket on which the Subscribe was
>     received was always used when sending the Notify.
>     Find attached a patch for tm module that should fix this problem.
>     Please test and report the results.
>
>     Regards,
>
>     --
>     Anca Vamanu
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>
>     Pascal Maugeri wrote:
>
>         Hi
>
>         Using opensips 1.6 we need to have the presence module to send
>         NOTIFY over TCP rather than UDP when the size of the message
>         is greater than a given MTU.
>
>         We tried to force it sending a SUBSCRIBE with transport=tcp in
>         Contact header:
>
>            SUBSCRIBE sip:[hidden email]
>         <mailto:sip%[hidden email]>
>            <mailto:sip%[hidden email]
>         <mailto:sip%[hidden email]>> SIP/2.0
>
>            [...]
>            Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
>            Event: presence
>
>
>         but the NOTIFY messages are sent over UDP (observe the
>         "transport=tcp" in the request line):
>
>            NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
>            [...]
>            Contact: <sip:sa@213.151.105.170:6667
>         <http://sip:sa@213.151.105.170:6667>
>            <http://sip:sa@213.151.105.170:6667>>
>
>            Subscription-State: active;expires=120
>            Content-Type: application/pidf+xml
>            Content-Length: 1254
>
>
>         Could you please let me know what we should do to enable the
>         sending over TCP ? I don't understand what we're doing wrong.
>
>         Cheers
>         Pascal
>         ------------------------------------------------------------------------
>
>
>
>         _______________________________________________
>         Users mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>          
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  

Index: modules/tm/uac.c
===================================================================
--- modules/tm/uac.c (revision 6694)
+++ modules/tm/uac.c (working copy)
@@ -207,6 +207,7 @@
  int ret, flags, sflag_bk;
  int backup_route_type;
  unsigned int hi;
+ struct socket_info* send_sock;
 
  ret=-1;
 
@@ -218,21 +219,26 @@
 
  LM_DBG("next_hop=<%.*s>\n",dialog->hooks.next_hop->len,
  dialog->hooks.next_hop->s);
- /* it's a new message, so we will take the default socket */
- if (dialog->send_sock) {
- if (uri2su( dialog->hooks.next_hop, &to_su,
- dialog->send_sock->proto)==-1) {
- goto error2;
- }
- } else {
- dialog->send_sock = uri2sock(0, dialog->hooks.next_hop, &to_su,
+
+ /* calculate the socket corresponding to next hop */
+ send_sock = uri2sock(0, dialog->hooks.next_hop, &to_su,
  PROTO_NONE);
- if (dialog->send_sock==0) {
- ret=ser_error;
- LM_ERR("no socket found\n");
- goto error2;
+ if (send_sock==0) {
+ ret=ser_error;
+ LM_ERR("no socket found\n");
+ goto error2;
+ }
+ /* if a send socket defined verify if the same protocol */
+ if(dialog->send_sock) {
+ if(send_sock->proto != dialog->send_sock->proto)
+ {
+ dialog->send_sock = send_sock;
  }
  }
+ else
+ {
+ dialog->send_sock = send_sock;
+ }
 
  new_cell = build_cell(0);
  if (!new_cell) {

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Iñaki Baz Castillo
In reply to this post by Pascal Maugeri
2010/3/10 Pascal Maugeri <[hidden email]>:
> Hi Anca
> We just tested the patch you sent us but we don't see any difference.

Could you paste a SIP flow for the SUBSCRIBE and NOTIFY?

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
In reply to this post by Anca Vamanu-2
to: OpenSIPS users mailling list <[hidden email]>
cc: Albert Petit <[hidden email]>

Hello Anca

Sorry but this patch does not help neither :-(

FYI we applied it against rev 6706.

I will test this afternoon with a subscriber that is not behind NAT, maybe we can isolate a bit more the problem.

I'm going to answer to Iñaki's email providing tracers.

Cheers
Pascal



On Wed, Mar 10, 2010 at 3:02 PM, Anca Vamanu <[hidden email]> wrote:
Hi Pascal,

Please try this revised patch. It is also against svn, take a new copy of the tm module and apply it.

Thanks and regards,


--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:
Hi Anca

We just tested the patch you sent us but we don't see any difference.

Just in case, we recompiled the whole server (first we updated to rev 6700) and applied the patch you kindly sent us:

   svn update
   ...
   patch -p0 < tm_proto_fix.patch
   make all
   make install
   service opensips restart  

The NOTIFY message is still sent over UDP :-(

What information could we send you in order to help you ?

A big thank you for your help and fast answer!

Cheers
Pascal

On Tue, Mar 9, 2010 at 4:55 PM, Anca Vamanu <[hidden email] <mailto:[hidden email]>> wrote:

   Hi Pascal,

   We found the problem - the socket on which the Subscribe was
   received was always used when sending the Notify.
   Find attached a patch for tm module that should fix this problem.
   Please test and report the results.

   Regards,

   --     Anca Vamanu
   www.voice-system.ro <http://www.voice-system.ro>




   Pascal Maugeri wrote:

       Hi

       Using opensips 1.6 we need to have the presence module to send
       NOTIFY over TCP rather than UDP when the size of the message
       is greater than a given MTU.

       We tried to force it sending a SUBSCRIBE with transport=tcp in
       Contact header:

          SUBSCRIBE [hidden email]
       <mailto:[hidden email]>
          <mailto:[hidden email]
       <mailto:[hidden email]>> SIP/2.0


          [...]
          Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
          Event: presence


       but the NOTIFY messages are sent over UDP (observe the
       "transport=tcp" in the request line):

          NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
          [...]
          Contact: <sip:sa@213.151.105.170:6667
       <http://sip:sa@213.151.105.170:6667>
          <http://sip:sa@213.151.105.170:6667>>

          Subscription-State: active;expires=120
          Content-Type: application/pidf+xml
          Content-Length: 1254


       Could you please let me know what we should do to enable the
       sending over TCP ? I don't understand what we're doing wrong.

       Cheers
       Pascal
       ------------------------------------------------------------------------



       _______________________________________________
       Users mailing list
       [hidden email] <mailto:[hidden email]>

       http://lists.opensips.org/cgi-bin/mailman/listinfo/users
       

   _______________________________________________
   Users mailing list
   [hidden email] <mailto:[hidden email]>

   http://lists.opensips.org/cgi-bin/mailman/listinfo/users


------------------------------------------------------------------------

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
In reply to this post by Iñaki Baz Castillo
Hola Iñaki

Here is the SIP flow you asked me. 
Hope it helps to spot the problem. Observe the watcher is behind NAT.

SUBSCRIBE [hidden email] SIP/2.0
Record-Route: <sip:xxx.xxx.xxx.xxx:6666;lr=on>
CSeq: 1 SUBSCRIBE
From: "watcher" <[hidden email]>;tag=94671740
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:6666;branch=z9hG4bK581b.d3f0fa41.0
Via: SIP/2.0/UDP 10.1.1.235:5060;rport=5060;received=yyy.yyy.yyy.yyy;branch=z9hG4bKc5Obqwa8W
Max-Forwards: 69
Contact: <sip:watcher@10.1.1.235:5060;transport=tcp>
Event: presence
Expires: 3600
User-Agent: XXX
Accept: application/pidf+xml
Content-Length: 0

SIP/2.0 200 OK
Record-Route: <sip:xxx.xxx.xxx.xxx:6666;lr=on>
CSeq: 1 SUBSCRIBE
From: "watcher" <[hidden email]>;tag=94671740
To: <[hidden email]>;tag=9886f112d485ff608a79084eaa27a247-6965
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:6666;branch=z9hG4bK581b.d3f0fa41.0
Via: SIP/2.0/UDP 10.1.1.235:5060;rport=5060;received=yyy.yyy.yyy.yyy;branch=z9hG4bKc5Obqwa8W
Expires: 120
Contact: <sip:[hidden email]:6667>
Server: OpenSIPS (1.6.1-notls (x86_64/linux))
Content-Length: 0

NOTIFY sip:watcher@10.1.1.235:5060;transport=tcp SIP/2.0
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:6667;branch=z9hG4bK581b.fd70f1f5.0
To: <[hidden email]>;tag=94671740
From: <[hidden email]>;tag=9886f112d485ff608a79084eaa27a247-6965
CSeq: 1 NOTIFY
Route: <sip:xxx.xxx.xxx.xxx:6666;lr=on>
Content-Length: 1030
User-Agent: OpenSIPS (1.6.1-notls (x86_64/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:[hidden email]:6667>
Subscription-State: active;expires=120
Content-Type: application/pidf+xml

[...]

Cheers
Pascal

On Wed, Mar 10, 2010 at 4:23 PM, Iñaki Baz Castillo <[hidden email]> wrote:
2010/3/10 Pascal Maugeri <[hidden email]>:
> Hi Anca
> We just tested the patch you sent us but we don't see any difference.

Could you paste a SIP flow for the SUBSCRIBE and NOTIFY?

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Anca Vamanu-2
In reply to this post by Pascal Maugeri
Hi Pascal,

I have just tested myself - with a Subscribe sent on udp and contact
with trasport=tcp and the Notify is sent over tcp.
I would suggest to run opensips in debug mode and paste the log messages
when starting the processing for sending the Notify ( starting with
"DBG:presence:build_dlg_t: CONTACT ").

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:

> to: OpenSIPS users mailling list <[hidden email]
> <mailto:[hidden email]>>
> cc: Albert Petit <[hidden email] <mailto:[hidden email]>>
>
> Hello Anca
>
> Sorry but this patch does not help neither :-(
>
> FYI we applied it against rev 6706.
>
> I will test this afternoon with a subscriber that is not behind NAT,
> maybe we can isolate a bit more the problem.
>
> I'm going to answer to Iñaki's email providing tracers.
>
> Cheers
> Pascal
>
>
>
> On Wed, Mar 10, 2010 at 3:02 PM, Anca Vamanu <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Pascal,
>
>     Please try this revised patch. It is also against svn, take a new
>     copy of the tm module and apply it.
>
>     Thanks and regards,
>
>
>     --
>     Anca Vamanu
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>
>     Pascal Maugeri wrote:
>
>         Hi Anca
>
>         We just tested the patch you sent us but we don't see any
>         difference.
>
>         Just in case, we recompiled the whole server (first we updated
>         to rev 6700) and applied the patch you kindly sent us:
>
>            svn update
>            ...
>            patch -p0 < tm_proto_fix.patch
>            make all
>            make install
>            service opensips restart  
>
>         The NOTIFY message is still sent over UDP :-(
>
>         What information could we send you in order to help you ?
>
>         A big thank you for your help and fast answer!
>
>         Cheers
>         Pascal
>
>         On Tue, Mar 9, 2010 at 4:55 PM, Anca Vamanu <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>            Hi Pascal,
>
>            We found the problem - the socket on which the Subscribe was
>            received was always used when sending the Notify.
>            Find attached a patch for tm module that should fix this
>         problem.
>            Please test and report the results.
>
>            Regards,
>
>            --     Anca Vamanu
>            www.voice-system.ro <http://www.voice-system.ro>
>         <http://www.voice-system.ro>
>
>
>
>
>            Pascal Maugeri wrote:
>
>                Hi
>
>                Using opensips 1.6 we need to have the presence module
>         to send
>                NOTIFY over TCP rather than UDP when the size of the
>         message
>                is greater than a given MTU.
>
>                We tried to force it sending a SUBSCRIBE with
>         transport=tcp in
>                Contact header:
>
>                   SUBSCRIBE sip:[hidden email]
>         <mailto:sip%[hidden email]>
>                <mailto:sip%[hidden email]
>         <mailto:sip%[hidden email]>>
>                   <mailto:sip%[hidden email]
>         <mailto:sip%[hidden email]>
>                <mailto:sip%[hidden email]
>         <mailto:sip%[hidden email]>>> SIP/2.0
>
>
>                   [...]
>                   Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
>                   Event: presence
>
>
>                but the NOTIFY messages are sent over UDP (observe the
>                "transport=tcp" in the request line):
>
>                   NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
>                   [...]
>                   Contact: <sip:sa@213.151.105.170:6667
>         <http://sip:sa@213.151.105.170:6667>
>                <http://sip:sa@213.151.105.170:6667>
>                   <http://sip:sa@213.151.105.170:6667>>
>
>                   Subscription-State: active;expires=120
>                   Content-Type: application/pidf+xml
>                   Content-Length: 1254
>
>
>                Could you please let me know what we should do to
>         enable the
>                sending over TCP ? I don't understand what we're doing
>         wrong.
>
>                Cheers
>                Pascal
>              
>          ------------------------------------------------------------------------
>
>
>
>                _______________________________________________
>                Users mailing list
>                [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>                
>
>            _______________________________________________
>            Users mailing list
>            [hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>            http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         Users mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>          
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
OK I'm going to do that, thank you Anca.

On Thu, Mar 11, 2010 at 2:07 PM, Anca Vamanu <[hidden email]> wrote:
Hi Pascal,

I have just tested myself - with a Subscribe sent on udp and contact
with trasport=tcp and the Notify is sent over tcp.
I would suggest to run opensips in debug mode and paste the log messages
when starting the processing for sending the Notify ( starting with
"DBG:presence:build_dlg_t: CONTACT ").

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:
> to: OpenSIPS users mailling list <[hidden email]
> <mailto:[hidden email]>>
> cc: Albert Petit <[hidden email] <mailto:[hidden email]>>
>
> Hello Anca
>
> Sorry but this patch does not help neither :-(
>
> FYI we applied it against rev 6706.
>
> I will test this afternoon with a subscriber that is not behind NAT,
> maybe we can isolate a bit more the problem.
>
> I'm going to answer to Iñaki's email providing tracers.
>
> Cheers
> Pascal
>
>
>
> On Wed, Mar 10, 2010 at 3:02 PM, Anca Vamanu <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Pascal,
>
>     Please try this revised patch. It is also against svn, take a new
>     copy of the tm module and apply it.
>
>     Thanks and regards,
>
>
>     --
>     Anca Vamanu
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>
>     Pascal Maugeri wrote:
>
>         Hi Anca
>
>         We just tested the patch you sent us but we don't see any
>         difference.
>
>         Just in case, we recompiled the whole server (first we updated
>         to rev 6700) and applied the patch you kindly sent us:
>
>            svn update
>            ...
>            patch -p0 < tm_proto_fix.patch
>            make all
>            make install
>            service opensips restart
>
>         The NOTIFY message is still sent over UDP :-(
>
>         What information could we send you in order to help you ?
>
>         A big thank you for your help and fast answer!
>
>         Cheers
>         Pascal
>
>         On Tue, Mar 9, 2010 at 4:55 PM, Anca Vamanu <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>            Hi Pascal,
>
>            We found the problem - the socket on which the Subscribe was
>            received was always used when sending the Notify.
>            Find attached a patch for tm module that should fix this
>         problem.
>            Please test and report the results.
>
>            Regards,
>
>            --     Anca Vamanu
>            www.voice-system.ro <http://www.voice-system.ro>
>         <http://www.voice-system.ro>
>
>
>
>
>            Pascal Maugeri wrote:
>
>                Hi
>
>                Using opensips 1.6 we need to have the presence module
>         to send
>                NOTIFY over TCP rather than UDP when the size of the
>         message
>                is greater than a given MTU.
>
>                We tried to force it sending a SUBSCRIBE with
>         transport=tcp in
>                Contact header:
>
>                   SUBSCRIBE [hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                   <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> SIP/2.0
>
>
>                   [...]
>                   Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
>                   Event: presence
>
>
>                but the NOTIFY messages are sent over UDP (observe the
>                "transport=tcp" in the request line):
>
>                   NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
>                   [...]
>                   Contact: <sip:sa@213.151.105.170:6667
>         <http://sip:sa@213.151.105.170:6667>
>                <http://sip:sa@213.151.105.170:6667>
>                   <http://sip:sa@213.151.105.170:6667>>
>
>                   Subscription-State: active;expires=120
>                   Content-Type: application/pidf+xml
>                   Content-Length: 1254
>
>
>                Could you please let me know what we should do to
>         enable the
>                sending over TCP ? I don't understand what we're doing
>         wrong.
>
>                Cheers
>                Pascal
>
>          ------------------------------------------------------------------------
>
>
>
>                _______________________________________________
>                Users mailing list
>                [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>            _______________________________________________
>            Users mailing list
>            [hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>            http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         Users mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
In reply to this post by Anca Vamanu-2
Anca

I got the following logs when subscribing:

Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:presence:build_dlg_t: CONTACT = sip:watcher@79.149.10.246:5060;transport=tcp
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:t_uac: next_hop=<sip:213.151.105.170:6666;lr=on>
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:core:mk_proxy: doing DNS lookup...
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:dlg2hash: 42964
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:print_request_uri: sip:watcher@79.149.10.246:5060;transport=tcp
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:set_timer: relative timeout is 500000
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:insert_timer_unsafe: [4]: 0x7f8fa84c0068 (4508500000)
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:set_timer: relative timeout is 30
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:insert_timer_unsafe: [0]: 0x7f8fa84c0098 (4538)
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: INFO:presence:send_notify_request: NOTIFY [hidden email] via sip:213.151.105.170:6666;lr=on on behalf of [hidden email] for event presence
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:t_unref: UNREF_UNSAFE: after is 0
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:core:destroy_avp_list: destroying list (nil)
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:core:receive_msg: cleaning up
Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]: DBG:core:parse_msg: SIP Reply  (status):
Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]: DBG:core:parse_msg:  version: <SIP/2.0>
Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]: DBG:core:parse_msg:  status:  <200>
Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]: DBG:core:parse_msg:  reason:  <OK>

What log could I add to your patch so we can get more details ?

I recompiled the whole opensips and its modules just to make sure your patch is activated.

Cheers
Pascal


On Thu, Mar 11, 2010 at 2:07 PM, Anca Vamanu <[hidden email]> wrote:
Hi Pascal,

I have just tested myself - with a Subscribe sent on udp and contact
with trasport=tcp and the Notify is sent over tcp.
I would suggest to run opensips in debug mode and paste the log messages
when starting the processing for sending the Notify ( starting with
"DBG:presence:build_dlg_t: CONTACT ").

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:
> to: OpenSIPS users mailling list <[hidden email]
> <mailto:[hidden email]>>
> cc: Albert Petit <[hidden email] <mailto:[hidden email]>>
>
> Hello Anca
>
> Sorry but this patch does not help neither :-(
>
> FYI we applied it against rev 6706.
>
> I will test this afternoon with a subscriber that is not behind NAT,
> maybe we can isolate a bit more the problem.
>
> I'm going to answer to Iñaki's email providing tracers.
>
> Cheers
> Pascal
>
>
>
> On Wed, Mar 10, 2010 at 3:02 PM, Anca Vamanu <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Pascal,
>
>     Please try this revised patch. It is also against svn, take a new
>     copy of the tm module and apply it.
>
>     Thanks and regards,
>
>
>     --
>     Anca Vamanu
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>
>     Pascal Maugeri wrote:
>
>         Hi Anca
>
>         We just tested the patch you sent us but we don't see any
>         difference.
>
>         Just in case, we recompiled the whole server (first we updated
>         to rev 6700) and applied the patch you kindly sent us:
>
>            svn update
>            ...
>            patch -p0 < tm_proto_fix.patch
>            make all
>            make install
>            service opensips restart
>
>         The NOTIFY message is still sent over UDP :-(
>
>         What information could we send you in order to help you ?
>
>         A big thank you for your help and fast answer!
>
>         Cheers
>         Pascal
>
>         On Tue, Mar 9, 2010 at 4:55 PM, Anca Vamanu <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>            Hi Pascal,
>
>            We found the problem - the socket on which the Subscribe was
>            received was always used when sending the Notify.
>            Find attached a patch for tm module that should fix this
>         problem.
>            Please test and report the results.
>
>            Regards,
>
>            --     Anca Vamanu
>            www.voice-system.ro <http://www.voice-system.ro>
>         <http://www.voice-system.ro>
>
>
>
>
>            Pascal Maugeri wrote:
>
>                Hi
>
>                Using opensips 1.6 we need to have the presence module
>         to send
>                NOTIFY over TCP rather than UDP when the size of the
>         message
>                is greater than a given MTU.
>
>                We tried to force it sending a SUBSCRIBE with
>         transport=tcp in
>                Contact header:
>
>                   SUBSCRIBE [hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>
>                   <mailto:[hidden email]
>         <mailto:[hidden email]>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>> SIP/2.0
>
>
>                   [...]
>                   Contact: <sip:albertd@10.1.1.24:5233;transport=tcp>
>                   Event: presence
>
>
>                but the NOTIFY messages are sent over UDP (observe the
>                "transport=tcp" in the request line):
>
>                   NOTIFY sip:albertd@10.1.1.24:5233;transport=tcp SIP/2.0
>                   [...]
>                   Contact: <sip:sa@213.151.105.170:6667
>         <http://sip:sa@213.151.105.170:6667>
>                <http://sip:sa@213.151.105.170:6667>
>                   <http://sip:sa@213.151.105.170:6667>>
>
>                   Subscription-State: active;expires=120
>                   Content-Type: application/pidf+xml
>                   Content-Length: 1254
>
>
>                Could you please let me know what we should do to
>         enable the
>                sending over TCP ? I don't understand what we're doing
>         wrong.
>
>                Cheers
>                Pascal
>
>          ------------------------------------------------------------------------
>
>
>
>                _______________________________________________
>                Users mailing list
>                [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>                http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>            _______________________________________________
>            Users mailing list
>            [hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>            http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         Users mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Anca Vamanu-2
Hi Pascal,

Only now I observed that there is a Route header in the Notify - so the
first hop is in fact the address in the route and not the RURI. So it is
correct to send the Notify on udp, and the proxy at the next hop should
switch to tcp.

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:

> Anca
>
> I got the following logs when subscribing:
>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:presence:build_dlg_t: CONTACT =
>     sip:watcher@79.149.10.246:5060;transport=tcp
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:t_uac:
>     next_hop=<sip:213.151.105.170:6666;lr=on>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:core:mk_proxy: doing DNS lookup...
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:dlg2hash: 42964
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:print_request_uri: sip:watcher@79.149.10.246:5060;transport=tcp
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:set_timer: relative timeout is 500000
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:insert_timer_unsafe: [4]: 0x7f8fa84c0068 (4508500000)
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:set_timer: relative timeout is 30
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:insert_timer_unsafe: [0]: 0x7f8fa84c0098 (4538)
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     INFO:presence:send_notify_request: NOTIFY
>     sip:[hidden email]
>     <mailto:sip%[hidden email]> via
>     sip:213.151.105.170:6666;lr=on on behalf of
>     sip:[hidden email]
>     <mailto:sip%[hidden email]> for event presence
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:t_unref: UNREF_UNSAFE: after is 0
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:core:destroy_avp_list: destroying list (nil)
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:core:receive_msg: cleaning up
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg: SIP Reply  (status):
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg:  version: <SIP/2.0>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg:  status:  <200>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg:  reason:  <OK>
>
>
> What log could I add to your patch so we can get more details ?
>
> I recompiled the whole opensips and its modules just to make sure your
> patch is activated.
>
> Cheers
> Pascal
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Pascal Maugeri
Ok, good comment. Yes indeed we have a SIP proxy between the subscriber and opensips (which is only acting as presence server in this scenario).
I thought there were two problems (one at proxy and one at presence server side). We will work on proxy side now to solve this issue.

Many thanks for your time.
Pascal


On Thu, Mar 11, 2010 at 4:22 PM, Anca Vamanu <[hidden email]> wrote:
Hi Pascal,

Only now I observed that there is a Route header in the Notify - so the
first hop is in fact the address in the route and not the RURI. So it is
correct to send the Notify on udp, and the proxy at the next hop should
switch to tcp.

Regards,

--
Anca Vamanu
www.voice-system.ro



Pascal Maugeri wrote:
> Anca
>
> I got the following logs when subscribing:
>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:presence:build_dlg_t: CONTACT =
>     sip:watcher@79.149.10.246:5060;transport=tcp
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]: DBG:tm:t_uac:
>     next_hop=<sip:213.151.105.170:6666;lr=on>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:core:mk_proxy: doing DNS lookup...
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:dlg2hash: 42964
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:print_request_uri: sip:watcher@79.149.10.246:5060;transport=tcp
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:set_timer: relative timeout is 500000
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:insert_timer_unsafe: [4]: 0x7f8fa84c0068 (4508500000)
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:set_timer: relative timeout is 30
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:insert_timer_unsafe: [0]: 0x7f8fa84c0098 (4538)
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     INFO:presence:send_notify_request: NOTIFY
>     [hidden email]
>     <mailto:[hidden email]> via
>     sip:213.151.105.170:6666;lr=on on behalf of
>     [hidden email]
>     <mailto:[hidden email]> for event presence
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:tm:t_unref: UNREF_UNSAFE: after is 0
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:core:destroy_avp_list: destroying list (nil)
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
>     DBG:core:receive_msg: cleaning up
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg: SIP Reply  (status):
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg:  version: <SIP/2.0>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg:  status:  <200>
>     Mar 11 15:28:40 test /usr/local/sbin/opensips[3259]:
>     DBG:core:parse_msg:  reason:  <OK>
>
>
> What log could I add to your patch so we can get more details ?
>
> I recompiled the whole opensips and its modules just to make sure your
> patch is activated.
>
> Cheers
> Pascal
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Iñaki Baz Castillo
In reply to this post by Pascal Maugeri
2010/3/11 Pascal Maugeri <[hidden email]>:
> Hola Iñaki
> Here is the SIP flow you asked me.
> Hope it helps to spot the problem. Observe the watcher is behind NAT.

> SUBSCRIBE sip:[hidden email] SIP/2.0
> Record-Route: <sip:xxx.xxx.xxx.xxx:6666;lr=on>
> Call-ID: d041f6cae786fea76503d436585708b8@10.1.1.235
> CSeq: 1 SUBSCRIBE
> From: "watcher" <sip:[hidden email]>;tag=94671740
> To: <sip:[hidden email]>
> Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:6666;branch=z9hG4bK581b.d3f0fa41.0
> Via: SIP/2.0/UDP
> 10.1.1.235:5060;rport=5060;received=yyy.yyy.yyy.yyy;branch=z9hG4bKc5Obqwa8W
> Max-Forwards: 69
> Contact: <sip:watcher@10.1.1.235:5060;transport=tcp>
> Event: presence
> Expires: 3600
> User-Agent: XXX
> Accept: application/pidf+xml
> Content-Length: 0

Hi Pascal, the above initial SUBSCRIBE has a Record-Route containing a
SIP URI without ;transport=tcp parameter, so there is a proxy between
the NATted client and the presence server. I suspect the topology is
as follows:


  client --- Router-NAT ---- (SIP TCP) ---- Proxy ---- (SIP UDP) ----
Presence-Server

Is it correct?



--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [Presence] How to receive presence NOTIFY over TCP ?

Iñaki Baz Castillo
In reply to this post by Pascal Maugeri
2010/3/11 Pascal Maugeri <[hidden email]>:
> Ok, good comment. Yes indeed we have a SIP proxy between the subscriber and
> opensips (which is only acting as presence server in this scenario).
> I thought there were two problems (one at proxy and one at presence server
> side). We will work on proxy side now to solve this issue.

I've the same topology working with no issues (SIP TCP natted client,
a proxy and OpenSIPS as presece-server behind it, using TCP between
client and proxy, and UDP between proxy and OpenSIPS). It just works,
but you need a keepalive system to mantain the TCP connection between
the client and the proxy.
Tipically it's done by the client who keeps it by sending a periodic
TCP message (not a SIP message but anything).

Where is your problem exactly? do you have issues to get the first
NOTFY after sending the initial SUBSCRIBE? or do the issues arise just
for subsequent notifications?


--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users