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

2010-03-11 Thread Pascal Maugeri
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:present...@presence.net sip%3apresent...@presence.netSIP/2.0
Record-Route: sip:xxx.xxx.xxx.xxx:;lr=on
Call-ID: d041f6cae786fea76503d43658570...@10.1.1.235
CSeq: 1 SUBSCRIBE
From: watcher sip:watc...@presence.net sip%3awatc...@presence.net
;tag=94671740
To: sip:present...@presence.net sip%3apresent...@presence.net
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:;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:watc...@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:;lr=on
Call-ID: d041f6cae786fea76503d43658570...@10.1.1.235
CSeq: 1 SUBSCRIBE
From: watcher sip:watc...@presence.net sip%3awatc...@presence.net
;tag=94671740
To: sip:present...@presence.net sip%3apresent...@presence.net
;tag=9886f112d485ff608a79084eaa27a247-6965
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:;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:s...@xxx.xxx.xxx.xxx:6667
Server: OpenSIPS (1.6.1-notls (x86_64/linux))
Content-Length: 0

NOTIFY sip:watc...@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: sip:watc...@presence.net sip%3awatc...@presence.net;tag=94671740
From: sip:present...@presence.net sip%3apresent...@presence.net
;tag=9886f112d485ff608a79084eaa27a247-6965
CSeq: 1 NOTIFY
Call-ID: d041f6cae786fea76503d43658570...@10.1.1.235
Route: sip:xxx.xxx.xxx.xxx:;lr=on
Content-Length: 1030
User-Agent: OpenSIPS (1.6.1-notls (x86_64/linux))
Max-Forwards: 70
Event: presence
Contact: sip:s...@xxx.xxx.xxx.xxx: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 i...@aliax.net wrote:

 2010/3/10 Pascal Maugeri pascal.maug...@gmail.com:
  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
 i...@aliax.net

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

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


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

2010-03-11 Thread Pascal Maugeri
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:watc...@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:;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:watc...@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 50
Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
DBG:tm:insert_timer_unsafe: [4]: 0x7f8fa84c0068 (450850)
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:watc...@test.genaker.netsip%3awatc...@test.genaker.netvia
sip:213.151.105.170:;lr=on
on behalf of 
sip:present...@test.genaker.netsip%3apresent...@test.genaker.netfor
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 a...@opensips.org 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 users@lists.opensips.org
  mailto:users@lists.opensips.org
  cc: Albert Petit albertpe...@gmail.com mailto:albertpe...@gmail.com
 
  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 a...@opensips.org
  mailto:a...@opensips.org 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 a...@opensips.org
  mailto:a...@opensips.org mailto:a...@opensips.org
  mailto:a...@opensips.org 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

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

2010-03-11 Thread 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 a...@opensips.org 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:watc...@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:;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:watc...@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 50
  Mar 11 15:28:40 test /usr/local/sbin/opensips[3258]:
  DBG:tm:insert_timer_unsafe: [4]: 0x7f8fa84c0068 (450850)
  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:watc...@test.genaker.net sip%3awatc...@test.genaker.net
  
  mailto:sip%3awatc...@test.genaker.netsip%253awatc...@test.genaker.net
 via
  sip:213.151.105.170:;lr=on on behalf of
  sip:present...@test.genaker.net sip%3apresent...@test.genaker.net
  
  mailto:sip%3apresent...@test.genaker.netsip%253apresent...@test.genaker.net
 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
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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


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

2010-03-10 Thread Pascal Maugeri
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 a...@opensips.org 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 sip:echo...@presence.net sip%3aecho...@presence.net
mailto:sip%3aecho...@presence.net sip%253aecho...@presence.net
 SIP/2.0

[...]
Contact: sip:albe...@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:albe...@10.1.1.24:5233;transport=tcp SIP/2.0
[...]
Contact: sip:s...@213.151.105.170:6667
http://sip:s...@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
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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


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


[OpenSIPS-Users] [Presence] How to receive presence NOTIFY over TCP ?

2010-03-09 Thread 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 sip:echo...@presence.net sip%3aecho...@presence.net SIP/2.0
[...]
Contact: sip:albe...@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:albe...@10.1.1.24:5233;transport=tcp SIP/2.0
[...]
Contact: sip:s...@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
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Presence] Empty NOTIFY received after re-subscription

2009-10-22 Thread Pascal Maugeri
Thank you for your answer and suggestion Anca.To avoid to loosing time I
believe I should upgrade to 1.6 first (we're using 1.5 here). Then we'll try
to reproduce the issue and I'll come back to you with the log you asked.

Cheers
Pascal

On Thu, Oct 22, 2009 at 5:00 PM, Anca Vamanu a...@opensips.org wrote:

 Hi Pascal,

 I don't know why would that happen. I keep testing it and didn't see
 this case..
 Can you please raise the debug level and if you see it send me the part
 of the log corresponding to the processing of the Subscribe and
 generation of Notify.

 Regards,
 Anca

 Pascal Maugeri wrote:
  Hi
 
  After re-subscribing to a user presence, we receive immediately a
  NOTIFY with no content:
 
  NOTIFY sip:us...@xx.xx.xx.xx:5060 SIP/2.0
  Via: SIP/2.0/UDP YY.YY.YY.YY:6667;branch=z9hG4bK34ab.7700bc14.0
  To: sip:us...@mycompany.com sip%3aus...@mycompany.com
  mailto:sip%3aus...@mycompany.com sip%253aus...@mycompany.com
 ;tag=14257163
  From: sip:us...@mycompany.com sip%3aus...@mycompany.com
  mailto:sip%3aus...@mycompany.com sip%253aus...@mycompany.com
 ;tag=9886f112d485ff608a79084eaa27a247-48fb
  CSeq: 5 NOTIFY
  Call-ID: 87cbad243e9c1b48c8333cbbb99cb...@xx.xx.xx.xx
  Route: sip:YY.YY.YY.YY:;lr=on
  Content-Length: 0
  User-Agent: OpenSIPS (1.5.2-notls (x86_64/linux))
  Max-Forwards: 70
  Event: presence
  Contact: sip:s...@yy.yy.yy.yy:6667
  Subscription-State: active;expires=100
 
   and then few seconds later I receive a NOTIFY with the proper
  presence document.
 
  Which are the possible reasons why the presence server sends an
  empty NOTIFY ?
 
  Cheers
  Pascal
  
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


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

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


[OpenSIPS-Users] [Presence] Empty NOTIFY received after re-subscription

2009-10-21 Thread Pascal Maugeri
Hi

After re-subscribing to a user presence, we receive immediately a NOTIFY
with no content:

NOTIFY sip:us...@xx.xx.xx.xx:5060 SIP/2.0
Via: SIP/2.0/UDP YY.YY.YY.YY:6667;branch=z9hG4bK34ab.7700bc14.0
To: sip:us...@mycompany.com sip%3aus...@mycompany.com;tag=14257163
From: sip:us...@mycompany.com sip%3aus...@mycompany.com
;tag=9886f112d485ff608a79084eaa27a247-48fb
CSeq: 5 NOTIFY
Call-ID: 87cbad243e9c1b48c8333cbbb99cb...@xx.xx.xx.xx
Route: sip:YY.YY.YY.YY:;lr=on
Content-Length: 0
User-Agent: OpenSIPS (1.5.2-notls (x86_64/linux))
Max-Forwards: 70
Event: presence
Contact: sip:s...@yy.yy.yy.yy:6667
Subscription-State: active;expires=100

 and then few seconds later I receive a NOTIFY with the proper presence
document.

Which are the possible reasons why the presence server sends an empty
NOTIFY ?

Cheers
Pascal
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] [RLS] rate of notifications and max size of NOTIFY

2009-10-06 Thread Pascal Maugeri
Hi

Using RLS is there a way to control the rate of notifications and the
maximum size of NOTIFY packets (partial notification) ?

Our application is running on mobile phones and we don't want to receive a
big NOTIFY packets if our client is subscribed to 20 or more buddies.

Regards,
Pascal
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [RLS] rate of notifications and max size of NOTIFY

2009-10-06 Thread Pascal Maugeri
I opened one artifact for this purpose:
http://sourceforge.net/tracker/?func=detailaid=2873450group_id=232389atid=1086413
Regards,
Pascal

On Tue, Oct 6, 2009 at 2:34 PM, Anca Vamanu a...@opensips.org wrote:

 Hi Pascal,

 No, there is no mechanism now to limit the size of the Notify, but I
 understand this could be useful. Please open a feature request with this
 and maybe we will implement it after the release.

 Anca

 Pascal Maugeri wrote:
  Hi
 
  Using RLS is there a way to control the rate of notifications and the
  maximum size of NOTIFY packets (partial notification) ?
 
  Our application is running on mobile phones and we don't want to
  receive a big NOTIFY packets if our client is subscribed to 20 or
  more buddies.
 
  Regards,
  Pascal
  
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


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

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


Re: [OpenSIPS-Users] How to install opensips on Fedora10 ?

2009-06-15 Thread Pascal Maugeri
On FC9 I have this basic problem:
I can start using
  opensipsctl start

but service opensips start does not return, it blocks and never shows the
[OK]:

[r...@sandbox ~]# service opensips start
Starting opensips:

Have you met this problem ?

-pascal

On Mon, Jun 15, 2009 at 7:21 AM, Cao Lei-MNW784 lei@motorola.comwrote:

  I have installed opensips on Fedora and CentOS.
 No much difference. Just follow the opensips' standard installation

 Thanks  Regards
 Cao, Charles


  --
 *From:* users-boun...@lists.opensips.org [mailto:
 users-boun...@lists.opensips.org] *On Behalf Of *XIN Xiuhe
 *Sent:* Monday, June 15, 2009 12:06 PM
 *To:* Users@lists.opensips.org
 *Subject:* [OpenSIPS-Users] How to install opensips on Fedora10 ?


 Hi,  friends

 I am newbie of opensips and try to install opensips on Fedora10.
 Can anyone give me some instructions ?

 Thanks for your help!

 xxh

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


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