Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-08 Thread James Lamanna
On Wed, Apr 7, 2010 at 2:06 AM, Anca Vamanu a...@opensips.org wrote:
 Hi James,

 What you see happens because of a improvement that I made in
 pua_dialoginfo module. Now the presentity_uri for the callee ( the uri
 that will be used as RURI in Publish message) is taken from RURI of
 Invite in the moment you call dialoginfo_set(before this To header was
 used). From the trace it seems that you call this function after you do
 lookup(location). Move this call upper, before lookup() changes the
 RURI to the contact of the phone. Also you can check out the possibility
 to set custom uris to be used as presentity uri by setting some
 pseudovariables
 (http://www.opensips.org/html/docs/modules/devel/pua_dialoginfo.html#id227160
 ).

Hi Anca,
Moving the dialoginfo_set() above location() seems to fix the problem!
I will let you know how things go.
I also added another patch to get the green light upon startup, but I
believe this causes the
light to go solid amber during the first call, but then all subsequent
calls seem to work ok.
I will also try and see if I can duplicate the stuck 'red' state.
Thanks for all your help.


 Regards,

 --
 Anca Vamanu
 www.voice-system.ro

-- James

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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-07 Thread Anca Vamanu
Hi James,

What you see happens because of a improvement that I made in 
pua_dialoginfo module. Now the presentity_uri for the callee ( the uri 
that will be used as RURI in Publish message) is taken from RURI of 
Invite in the moment you call dialoginfo_set(before this To header was 
used). From the trace it seems that you call this function after you do 
lookup(location). Move this call upper, before lookup() changes the 
RURI to the contact of the phone. Also you can check out the possibility 
to set custom uris to be used as presentity uri by setting some 
pseudovariables 
(http://www.opensips.org/html/docs/modules/devel/pua_dialoginfo.html#id227160 
).

Regards,

-- 
Anca Vamanu
www.voice-system.ro





James Lamanna wrote:
 The phones should never receive the Publish message. Please catch a
 trace containing this Publish and send it to me.
 What do you mean by before? Before updating from svn with my patch?
   
 Before I updated from 1.6.2 to SVN I think - I'll try and double-check.
 I have a revised patch that covers my case that I'll submit this afternoon
 with the trace. Any luck with the stuck BLF trace I submitted as well?

 I also think that my configuration might need some help wrt when and where
 to call presence functions - I will post that once I get in the office. I
 noticed that with svn I'm not getting any entries in pua or presentity, only
 in active_watchers.
 

 Ok here's what I saw, running the 1.6 branch SVN HEAD - it is attached
 in bad_publish.txt.
 Also, I've attached my opensips.cfg to see if I'm doing anything bad
 in there as well.

 Thanks.

 -- James
   
 

 ___
 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 and Linksys phones - not working 1.6.1

2010-04-06 Thread Anca Vamanu
James Lamanna wrote:
 On Mon, Apr 5, 2010 at 12:52 AM, Angel Marin an...@anmar.eu.org wrote:
   
 On 03/04/10 01:40, James Lamanna wrote:
 
 On Fri, Apr 2, 2010 at 4:52 AM, Anca Vamanu a...@opensips.org wrote:
   
 Hi James,

 I think that the problem is with those Notifies without a body sent by
 OpenSIPS when the phone was started. This is normal behavior, correct
 and conform RFC - when the presence server does not have any record for
 that presentity - it includes no body. But since you say that Linksys
 does not like this and since it was not that difficult to change, I just
 committed a patch that sends a Notify with an empty dialoginfo tuple as
 body when no published record is found. Please upgrade from svn and test
 this case again.
 
 Hi Anca,
 I saw your patch and upgraded to the SVN 1.6 branch.
 However, I do not believe I ever hit that code path.
 In my debug logs I see No record exists in hash table (notify.c:853).
 I'm not sure if fallback2db is true, but I don't think it is, so I
 never make it to that codepath.
   
 Give the attached patch a shot, it should do what you're looking for.

 Though I'm not sure generating an empty dialog without a presence entry
 is the correct approach, I mean, the monitored extension is not there,
 so why not hint it as a blinking light? In a cold start scenario, it'll
 go green once your re-subscribe time comes, so set it to a couple
 minutes or lower in the phone and you'll be good to go.
 

 Actually, it never changes from blinking to green in that scenario, even
 after multiple subscribes and registers.
 Also, I just noticed that I'm receiving a peculiar response, a 501 Not
 Implemented from the phones in response to a PUBLISH (I swear it wasn't
 doing this before!)...

 -- James


   
Hi James,


The phones should never receive the Publish message. Please catch a 
trace containing this Publish and send it to me.
What do you mean by before? Before updating from svn with my patch?

Regards,

-- 
Anca Vamanu
www.voice-system.ro


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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-06 Thread James Lamanna


On Apr 6, 2010, at 3:24, Anca Vamanu a...@opensips.org wrote:

 James Lamanna wrote:
 On Mon, Apr 5, 2010 at 12:52 AM, Angel Marin an...@anmar.eu.org  
 wrote:

 On 03/04/10 01:40, James Lamanna wrote:

 On Fri, Apr 2, 2010 at 4:52 AM, Anca Vamanu a...@opensips.org  
 wrote:

 Hi James,

 I think that the problem is with those Notifies without a body  
 sent by
 OpenSIPS when the phone was started. This is normal behavior,  
 correct
 and conform RFC - when the presence server does not have any  
 record for
 that presentity - it includes no body. But since you say that  
 Linksys
 does not like this and since it was not that difficult to  
 change, I just
 committed a patch that sends a Notify with an empty dialoginfo  
 tuple as
 body when no published record is found. Please upgrade from svn  
 and test
 this case again.

 Hi Anca,
 I saw your patch and upgraded to the SVN 1.6 branch.
 However, I do not believe I ever hit that code path.
 In my debug logs I see No record exists in hash table (notify.c: 
 853).
 I'm not sure if fallback2db is true, but I don't think it is, so I
 never make it to that codepath.

 Give the attached patch a shot, it should do what you're looking  
 for.

 Though I'm not sure generating an empty dialog without a presence  
 entry
 is the correct approach, I mean, the monitored extension is not  
 there,
 so why not hint it as a blinking light? In a cold start scenario,  
 it'll
 go green once your re-subscribe time comes, so set it to a couple
 minutes or lower in the phone and you'll be good to go.


 Actually, it never changes from blinking to green in that scenario,  
 even
 after multiple subscribes and registers.
 Also, I just noticed that I'm receiving a peculiar response, a 501  
 Not
 Implemented from the phones in response to a PUBLISH (I swear it  
 wasn't
 doing this before!)...

 -- James



 Hi James,


 The phones should never receive the Publish message. Please catch a
 trace containing this Publish and send it to me.
 What do you mean by before? Before updating from svn with my patch?

Before I updated from 1.6.2 to SVN I think - I'll try and double-check.
I have a revised patch that covers my case that I'll submit this  
afternoon with the trace. Any luck with the stuck BLF trace I  
submitted as well?

I also think that my configuration might need some help wrt when and  
where to call presence functions - I will post that once I get in the  
office. I noticed that with svn I'm not getting any entries in pua or  
presentity, only in active_watchers.

Thanks.

-- James


 Regards,

 -- 
 Anca Vamanu
 www.voice-system.ro


 ___
 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 and Linksys phones - not working 1.6.1

2010-04-06 Thread James Lamanna

 The phones should never receive the Publish message. Please catch a
 trace containing this Publish and send it to me.
 What do you mean by before? Before updating from svn with my patch?

 Before I updated from 1.6.2 to SVN I think - I'll try and double-check.
 I have a revised patch that covers my case that I'll submit this afternoon
 with the trace. Any luck with the stuck BLF trace I submitted as well?

 I also think that my configuration might need some help wrt when and where
 to call presence functions - I will post that once I get in the office. I
 noticed that with svn I'm not getting any entries in pua or presentity, only
 in active_watchers.

Ok here's what I saw, running the 1.6 branch SVN HEAD - it is attached
in bad_publish.txt.
Also, I've attached my opensips.cfg to see if I'm doing anything bad
in there as well.

Thanks.

-- James
U opensips.ip:5060 - phone.nat.ip:8640
INVITE sip:000...@phone.nat.ip:8640 SIP/2.0..Record-Route: 
sip:opensips.ip;r2=on;lr=on;ftag=as0175fba8;did=9e5.a4630c74..Record-Route: 
sip:opensips.ip:5061;r2=on;lr=on;ftag=as0175fba8;did=9e5.a4630c74..Via: 
SIP/2.0/UDP opensips.ip;branch=z9hG4bK9b4b.3093b021.0..Via: SIP/2.0/UDP 
asterisk.server.ip:5060;received=asterisk.server.ip;branch=z9hG4bK58a5bbd7;rport=5060..From:
 6266395478 sip:16266395...@asterisk.server.ip;tag=as0175fba8..To: 
sip:000...@opensips.ip:5061..Contact: 
sip:16266395...@asterisk.server.ip..Call-ID: 
6355d0e82d3d60622ced249859e95...@asterisk.server.ip..cseq: 102 
INVITE..User-Agent: Asterisk PBX..Max-Forwards: 69..Date: Tue, 06 Apr 2010 
15:12:11 GMT..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, 
NOTIFY, INFO..Supported: replaces..Content-Type: 
application/sdp..Content-Length: 280..P-hint: usrloc appliedv=0..o=root 
6818 6818 IN IP4 asterisk.server.ip..s=session..c=IN IP4 opensips.ip..t=0 
0..m=audio 35470 RTP/AVP 0 8 101..a=rtpmap:0 PCMU/8000..a=rtpmap:8 
PCMA/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 
0-16..a=silenceSupp:off - - - -..a=ptime:20..a=sendrecv..a=nortpproxy:yes..
#
U phone.nat.ip:8640 - opensips.ip:5060
SIP/2.0 100 Trying..To: sip:000...@opensips.ip:5061..From: 6266395478 
sip:16266395...@asterisk.server.ip;tag=as0175fba8..Call-ID: 
6355d0e82d3d60622ced249859e95...@asterisk.server.ip..cseq: 102 INVITE..Via: 
SIP/2.0/UDP opensips.ip;branch=z9hG4bK9b4b.3093b021.0..Via: SIP/2.0/UDP 
asterisk.server.ip:5060;received=asterisk.server.ip;branch=z9hG4bK58a5bbd7;rport=5060..Record-Route:
 sip:opensips.ip;r2=on;lr=on;ftag=as0175fba8;did=9e5.a4630c74..Record-Route: 
sip:opensips.ip:5061;r2=on;lr=on;ftag=as0175fba8;did=9e5.a4630c74..Server: 
Linksys/SPA942-6.1.3(a)..Content-Length: 0
#
U phone.nat.ip:8640 - opensips.ip:5060
SIP/2.0 180 Ringing..To: 
sip:000...@opensips.ip:5061;tag=c3f142fab548cb0i0..From: 6266395478 
sip:16266395...@asterisk.server.ip;tag=as0175fba8..Call-ID: 
6355d0e82d3d60622ced249859e95...@asterisk.server.ip..cseq: 102 INVITE..Via: 
SIP/2.0/UDP opensips.ip;branch=z9hG4bK9b4b.3093b021.0..Via: SIP/2.0/UDP 
asterisk.server.ip:5060;received=asterisk.server.ip;branch=z9hG4bK58a5bbd7;rport=5060..Record-Route:
 sip:opensips.ip;r2=on;lr=on;ftag=as0175fba8;did=9e5.a4630c74..Record-Route: 
sip:opensips.ip:5061;r2=on;lr=on;ftag=as0175fba8;did=9e5.a4630c74..Contact: 
000-000-0002 sip:000...@192.168.1.151:8640..Server: 
Linksys/SPA942-6.1.3(a)..Content-Length: 0
#
U opensips.ip:5060 - phone.nat.ip:8640
PUBLISH sip:000...@phone.nat.ip:8640 SIP/2.0..Record-Route: 
sip:opensips.ip;lr=on;ftag=501689153a5b5fe31491a47f27dc82f5-5f2e..Via: 
SIP/2.0/UDP opensips.ip;branch=z9hG4bKa371.56493fb4.0..Via: SIP/2.0/UDP 
opensips.ip;branch=z9hG4bKa371.46493fb4.0..To: 
sip:000...@phone.nat.ip:8640..From: 
sip:000...@phone.nat.ip:8640;tag=501689153a5b5fe31491a47f27dc82f5-5f2e..CSeq:
 10 PUBLISH..Call-ID: 77b9fe2016a10a4c-30...@opensips.ip..content-length: 
627..User-Agent: OpenSIPS (1.6.2-notls (x86_64/linux))..Max-Forwards: 
69..Event: dialog..Expires: 43201..Content-Type: 
application/dialog-info+xml..P-hint: outbound?xml 
version=1.0?.dialog-info xmlns=urn:ietf:params:xml:ns:dialog-info 
version=0 state=full entity=sip:000...@phone.nat.ip:8640dialog 
id=6355d0e82d3d60622ced249859e95...@asterisk.server.ip 
call-id=6355d0e82d3d60622ced249859e95...@asterisk.server.ip 
local-tag=c3f142fab548cb0i0 remote-tag=as0175fba8 
direction=recipientstateearly/stateremoteidentity 
display=6266395478sip:16266395...@asterisk.server.ip/identitytarget 
uri=sip:16266395...@asterisk.server.ip//remotelocalidentitysip:000...@phone.nat.ip:8640/identitytarget
 uri=sip:000...@phone.nat.ip:8640//local/dialog/dialog-info.
#
U phone.nat.ip:8640 - opensips.ip:5060
SIP/2.0 501 Not Implemented..To: 
sip:000...@phone.nat.ip:8640;tag=1ded7a2d320fb7c4i0..From: 
sip:000...@phone.nat.ip:8640;tag=501689153a5b5fe31491a47f27dc82f5-5f2e..Call-ID:
 77b9fe2016a10a4c-30...@opensips.ip..cseq: 10 PUBLISH..Via: SIP/2.0/UDP 

Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-05 Thread Angel Marin
On 03/04/10 01:40, James Lamanna wrote:
 On Fri, Apr 2, 2010 at 4:52 AM, Anca Vamanu a...@opensips.org wrote:
 Hi James,

 I think that the problem is with those Notifies without a body sent by
 OpenSIPS when the phone was started. This is normal behavior, correct
 and conform RFC - when the presence server does not have any record for
 that presentity - it includes no body. But since you say that Linksys
 does not like this and since it was not that difficult to change, I just
 committed a patch that sends a Notify with an empty dialoginfo tuple as
 body when no published record is found. Please upgrade from svn and test
 this case again.
 
 Hi Anca,
 I saw your patch and upgraded to the SVN 1.6 branch.
 However, I do not believe I ever hit that code path.
 In my debug logs I see No record exists in hash table (notify.c:853).
 I'm not sure if fallback2db is true, but I don't think it is, so I
 never make it to that codepath.


Give the attached patch a shot, it should do what you're looking for.

Though I'm not sure generating an empty dialog without a presence entry
is the correct approach, I mean, the monitored extension is not there,
so why not hint it as a blinking light? In a cold start scenario, it'll
go green once your re-subscribe time comes, so set it to a couple
minutes or lower in the phone and you'll be good to go.

-- 
Angel Marin
http://anmar.eu.org/
Index: notify_body.c
===
--- notify_body.c   (revision 6758)
+++ notify_body.c   (working copy)
@@ -340,7 +340,6 @@
xmlNodePtr state_node = NULL;
 
str *body= NULL;
-   str *pres_uri= NULL;
char buf[MAX_URI_SIZE+1];
 
if ( (pres_user-len + pres_domain-len + 1)  MAX_URI_SIZE) {
@@ -353,23 +352,6 @@
memcpy(buf + pres_user-len + 5, pres_domain-s, pres_domain-len);
buf[pres_user-len + 5 + pres_domain-len]= '\0';
 
-   pres_uri = (str*)pkg_malloc(sizeof(str));
-   if(pres_uri == NULL)
-   {
-   LM_ERR(while allocating memory\n);
-   return NULL;
-   }
-   memset(pres_uri, 0, sizeof(str));
-   pres_uri-s = buf;
-   pres_uri-len = pres_user-len + 5 + pres_domain-len;
-
-   LM_DBG([pres_uri] %.*s\n, pres_uri-len, pres_uri-s);
-
-   if ( pres_contains_presence(pres_uri)0 ) {
-   LM_DBG(No record exists in hash_table\n);
-   goto error;
-   }
-
/* create the Publish body  */
doc = xmlNewDoc(BAD_CAST 1.0);
if(doc==0)
@@ -427,10 +409,6 @@
xmlCleanupParser();
return body;
 error:
-   if ( pres_uri )
-   {
-   pkg_free(pres_uri);
-   }
if(body)
{
if(body-s)
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-05 Thread James Lamanna
On Mon, Apr 5, 2010 at 12:52 AM, Angel Marin an...@anmar.eu.org wrote:
 On 03/04/10 01:40, James Lamanna wrote:
 On Fri, Apr 2, 2010 at 4:52 AM, Anca Vamanu a...@opensips.org wrote:
 Hi James,

 I think that the problem is with those Notifies without a body sent by
 OpenSIPS when the phone was started. This is normal behavior, correct
 and conform RFC - when the presence server does not have any record for
 that presentity - it includes no body. But since you say that Linksys
 does not like this and since it was not that difficult to change, I just
 committed a patch that sends a Notify with an empty dialoginfo tuple as
 body when no published record is found. Please upgrade from svn and test
 this case again.

 Hi Anca,
 I saw your patch and upgraded to the SVN 1.6 branch.
 However, I do not believe I ever hit that code path.
 In my debug logs I see No record exists in hash table (notify.c:853).
 I'm not sure if fallback2db is true, but I don't think it is, so I
 never make it to that codepath.


 Give the attached patch a shot, it should do what you're looking for.

 Though I'm not sure generating an empty dialog without a presence entry
 is the correct approach, I mean, the monitored extension is not there,
 so why not hint it as a blinking light? In a cold start scenario, it'll
 go green once your re-subscribe time comes, so set it to a couple
 minutes or lower in the phone and you'll be good to go.

Actually, it never changes from blinking to green in that scenario, even
after multiple subscribes and registers.
Also, I just noticed that I'm receiving a peculiar response, a 501 Not
Implemented from the phones in response to a PUBLISH (I swear it wasn't
doing this before!)...

-- James



 --
 Angel Marin
 http://anmar.eu.org/

 ___
 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 and Linksys phones - not working 1.6.1

2010-04-02 Thread Anca Vamanu
Hi James,

I think that the problem is with those Notifies without a body sent by 
OpenSIPS when the phone was started. This is normal behavior, correct 
and conform RFC - when the presence server does not have any record for 
that presentity - it includes no body. But since you say that Linksys 
does not like this and since it was not that difficult to change, I just 
committed a patch that sends a Notify with an empty dialoginfo tuple as 
body when no published record is found. Please upgrade from svn and test 
this case again.

Regards,

-- 
Anca Vamanu
www.voice-system.ro


James Lamanna wrote:
 On Thu, Apr 1, 2010 at 12:26 AM, Anca Vamanu a...@opensips.org wrote:
   
 [snip]

 Ok I think I got this somewhat working.
 I was missing a dialoginfo_set() in another INVITE path.
 However, does anyone know how, if you add a new phone, to make the
 presence initialize to idle?
 The BLF light blinks amber until I call the phone that is being
 monitored, then it will blink red, and go back to green when the call
 is terminated.


   
 Hi James,

 Can you please run a network trace and catch the Notify that goes first
 to the phone and makes it blink amber as you said? Send that to me to
 see how we can fix that.

 

 Hi Anca,
 Attached is a log of a startup of 2 phones.
 Each phone is monitoring the other phone.
 This is a clean startup, so all presence tables are empty.
 I think this may be a lack of any NOTIFYs being sent at startup to the
 phone that a phone is online.

 Thanks.

 -- James
   
 

 ___
 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 and Linksys phones - not working 1.6.1

2010-04-02 Thread Anca Vamanu
Hi James,

For this case, indeed I see that when BYE is received the server 
generates a Notify with state confirmed.. which is really strange. Can 
you please run opensips in debug mode and catch the logs when BYE is 
processed. Send them to me in an e-mail.

Thanks,

-- 
Anca Vamanu
www.voice-system.ro



James Lamanna wrote:
 Also, I've found a case where the BLF light stays red, even when a
 call is hung up.
 This seems to happen in the intercom case, where the SIP URI is
 sip:u...@ip;intercom=true.
 It doesn't happen on every intercom call, but once it does happen, it
 is impossible to clear without clearing the presence tables and
 rebooting the phone..

 -- James


   
 Can you please catch the traces for this case also? All the presence
 traffic that you see when you hang up the phone - the Publish generated
 by OpenSIPS and the Notify sent to the phone.

 Thanks,
 

 Hi Anca,
 Here's the full trace.
 I call one phone (01) from my cell phone, and 02 is
 monitoring it.
 When 01 hangs up, the light on 02 stays red.

 Thanks for all your help!

 -- James
   
 

 ___
 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 and Linksys phones - not working 1.6.1

2010-04-02 Thread James Lamanna
On Fri, Apr 2, 2010 at 4:52 AM, Anca Vamanu a...@opensips.org wrote:
 Hi James,

 I think that the problem is with those Notifies without a body sent by
 OpenSIPS when the phone was started. This is normal behavior, correct
 and conform RFC - when the presence server does not have any record for
 that presentity - it includes no body. But since you say that Linksys
 does not like this and since it was not that difficult to change, I just
 committed a patch that sends a Notify with an empty dialoginfo tuple as
 body when no published record is found. Please upgrade from svn and test
 this case again.

Hi Anca,
I saw your patch and upgraded to the SVN 1.6 branch.
However, I do not believe I ever hit that code path.
In my debug logs I see No record exists in hash table (notify.c:853).
I'm not sure if fallback2db is true, but I don't think it is, so I
never make it to that codepath.


Apr  2 16:42:24 [12585] DBG:presence:send_notify_request: dialog info:
Apr  2 16:42:24 [12585] DBG:presence:printf_subs:
[pres_uri]= sip:000...@opensips.ip
[to_user]= 02   [to_domain]= opensips.ip
[w_user]= 01[w_domain]= opensips.ip
[event]= dialog
[status]= active
[expires]= 60
[callid]= 9673ec38-b54b9...@192.168.1.165   [local_cseq]=0
[to_tag]= 89c56fdf6f5b6f30be24c8867d74b34a-8b2f [from_tag]= f9ba884d0d82aab
[contact]= sip:000...@phone.nat.ip:6095 [record_route]=
Apr  2 16:42:24 [12585] DBG:presence:search_phtable: pres_uri=
sip:000...@opensips.ip
Apr  2 16:42:24 [12585] DBG:presence:get_p_notify_body: No record
exists in hash_table
Apr  2 16:42:24 [12585] DBG:presence_dialoginfo:dlginfo_agg_nbody:
[pres_user]=02 [pres_domain]= opensips.ip, [n]=0
Apr  2 16:42:24 [12585] DBG:presence_dialoginfo:build_dialoginfo:
[pres_uri] sip:000...@opensips.ip
Apr  2 16:42:24 [12585] DBG:presence:search_phtable: pres_uri=
sip:000...@opensips.ip
Apr  2 16:42:24 [12585] DBG:presence_dialoginfo:build_dialoginfo: No
record exists in hash_table
Apr  2 16:42:24 [12585] DBG:presence:send_notify_request: Could not
get the notify_body
Apr  2 16:42:24 [12585] DBG:presence:send_notify_request: headers:
Max-Forwards: 70^M
Event: dialog^M
Contact: sip:s...@opensips.ip:5060^M
Subscription-State: active;expires=50^M

Apr  2 16:42:24 [12585] DBG:presence:build_dlg_t: CONTACT =
sip:000...@phone.nat.ip:6095
Apr  2 16:42:24 [12585] DBG:tm:t_uac:
next_hop=sip:000...@phone.nat.ip::6095
Apr  2 16:42:24 [12585] DBG:core:mk_proxy: doing DNS lookup...
Apr  2 16:42:24 [12585] DBG:tm:dlg2hash: 63929
Apr  2 16:42:24 [12585] DBG:tm:print_request_uri:
sip:000...@phone.nat.ip::6095
Apr  2 16:42:24 [12585] DBG:tm:set_timer: relative timeout is 50
Apr  2 16:42:24 [12585] DBG:tm:insert_timer_unsafe: [4]:
0x7f0f225b44d0 (580)
Apr  2 16:42:24 [12585] DBG:tm:set_timer: relative timeout is 30
Apr  2 16:42:24 [12585] DBG:tm:insert_timer_unsafe: [0]: 0x7f0f225b4500 (35)
Apr  2 16:42:24 [12585] INFO:presence:send_notify_request: NOTIFY
sip:000...@opensips.ip via sip:000...@phone.nat.ip::6095 on



 Regards,

 --
 Anca Vamanu
 www.voice-system.ro

-- James



 James Lamanna wrote:
 On Thu, Apr 1, 2010 at 12:26 AM, Anca Vamanu a...@opensips.org wrote:

 [snip]

 Ok I think I got this somewhat working.
 I was missing a dialoginfo_set() in another INVITE path.
 However, does anyone know how, if you add a new phone, to make the
 presence initialize to idle?
 The BLF light blinks amber until I call the phone that is being
 monitored, then it will blink red, and go back to green when the call
 is terminated.



 Hi James,

 Can you please run a network trace and catch the Notify that goes first
 to the phone and makes it blink amber as you said? Send that to me to
 see how we can fix that.



 Hi Anca,
 Attached is a log of a startup of 2 phones.
 Each phone is monitoring the other phone.
 This is a clean startup, so all presence tables are empty.
 I think this may be a lack of any NOTIFYs being sent at startup to the
 phone that a phone is online.

 Thanks.

 -- James

 

 ___
 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] Presence and Linksys phones - not working 1.6.1

2010-04-02 Thread James Lamanna
On Fri, Apr 2, 2010 at 4:40 PM, James Lamanna jlama...@gmail.com wrote:
 On Fri, Apr 2, 2010 at 4:52 AM, Anca Vamanu a...@opensips.org wrote:
 Hi James,

 I think that the problem is with those Notifies without a body sent by
 OpenSIPS when the phone was started. This is normal behavior, correct
 and conform RFC - when the presence server does not have any record for
 that presentity - it includes no body. But since you say that Linksys
 does not like this and since it was not that difficult to change, I just
 committed a patch that sends a Notify with an empty dialoginfo tuple as
 body when no published record is found. Please upgrade from svn and test
 this case again.

 Hi Anca,
 I saw your patch and upgraded to the SVN 1.6 branch.
 However, I do not believe I ever hit that code path.
 In my debug logs I see No record exists in hash table (notify.c:853).
 I'm not sure if fallback2db is true, but I don't think it is, so I
 never make it to that codepath.
[snip]

Setting fallback2db == 1 as a modparam doesn't hit it either because
it aggregates the body.
Also, that has another side effect of crashing opensips after about 1
minute as well.
Last entry in the log in that case is termination due to SIGCHLD.

Thanks.

-- James

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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-01 Thread Anca Vamanu
James Lamanna wrote:
 On Wed, Mar 31, 2010 at 9:16 PM, James Lamanna jlama...@gmail.com wrote:
   
 On Wed, Mar 31, 2010 at 10:28 AM, Anca Vamanu a...@opensips.org wrote:
 
 James Lamanna wrote:
   
 Anca Vamanu Wrote:


 
 Andrew, this patch is already in 1.6.2 and trunk.
 James, the first thing that you need to check is that you receive
 Subscribes from the phones with event 'dialog'. And indeed as Andrew
 said, you need to load pua and pua_dialoginfo modules.

   
 Ok thanks. I'll upgrade to 1.6.2.
 Do I still need to explicitly call dialoginfo_set()?


 
 Yes, you have to call it.
   
 Hi Anca,
 I'm still having problems getting this to work at all.
 I've now upgraded to 1.6.2.
 Here is my entire config:
 

 [snip]

 Ok I think I got this somewhat working.
 I was missing a dialoginfo_set() in another INVITE path.
 However, does anyone know how, if you add a new phone, to make the
 presence initialize to idle?
 The BLF light blinks amber until I call the phone that is being
 monitored, then it will blink red, and go back to green when the call
 is terminated.

   
Hi James,

Can you please run a network trace and catch the Notify that goes first 
to the phone and makes it blink amber as you said? Send that to me to 
see how we can fix that.

Regards,

-- 
Anca Vamanu
www.voice-system.ro


 Thanks.

 -- James

 ___
 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 and Linksys phones - not working 1.6.1

2010-04-01 Thread Anca Vamanu
James Lamanna wrote:
 On Wed, Mar 31, 2010 at 9:28 PM, James Lamanna jlama...@gmail.com wrote:
   
 On Wed, Mar 31, 2010 at 9:16 PM, James Lamanna jlama...@gmail.com wrote:
 
 On Wed, Mar 31, 2010 at 10:28 AM, Anca Vamanu a...@opensips.org wrote:
   
 James Lamanna wrote:
 
 Anca Vamanu Wrote:


   
 Andrew, this patch is already in 1.6.2 and trunk.
 James, the first thing that you need to check is that you receive
 Subscribes from the phones with event 'dialog'. And indeed as Andrew
 said, you need to load pua and pua_dialoginfo modules.

 
 Ok thanks. I'll upgrade to 1.6.2.
 Do I still need to explicitly call dialoginfo_set()?


   
 Yes, you have to call it.
 
 Hi Anca,
 I'm still having problems getting this to work at all.
 I've now upgraded to 1.6.2.
 Here is my entire config:
   
 [snip]

 Ok I think I got this somewhat working.
 I was missing a dialoginfo_set() in another INVITE path.
 However, does anyone know how, if you add a new phone, to make the
 presence initialize to idle?
 The BLF light blinks amber until I call the phone that is being
 monitored, then it will blink red, and go back to green when the call
 is terminated.
 

 Also, I've found a case where the BLF light stays red, even when a
 call is hung up.
 This seems to happen in the intercom case, where the SIP URI is
 sip:u...@ip;intercom=true.
 It doesn't happen on every intercom call, but once it does happen, it
 is impossible to clear without clearing the presence tables and
 rebooting the phone..

 -- James

   
Can you please catch the traces for this case also? All the presence 
traffic that you see when you hang up the phone - the Publish generated 
by OpenSIPS and the Notify sent to the phone.

Thanks,

-- 
Anca Vamanu
www.voice-system.ro


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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-01 Thread James Lamanna
On Thu, Apr 1, 2010 at 12:26 AM, Anca Vamanu a...@opensips.org wrote:
 [snip]

 Ok I think I got this somewhat working.
 I was missing a dialoginfo_set() in another INVITE path.
 However, does anyone know how, if you add a new phone, to make the
 presence initialize to idle?
 The BLF light blinks amber until I call the phone that is being
 monitored, then it will blink red, and go back to green when the call
 is terminated.


 Hi James,

 Can you please run a network trace and catch the Notify that goes first
 to the phone and makes it blink amber as you said? Send that to me to
 see how we can fix that.


Hi Anca,
Attached is a log of a startup of 2 phones.
Each phone is monitoring the other phone.
This is a clean startup, so all presence tables are empty.
I think this may be a lack of any NOTIFYs being sent at startup to the
phone that a phone is online.

Thanks.

-- James


opensips_init.log
Description: Binary data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-04-01 Thread James Lamanna
 Also, I've found a case where the BLF light stays red, even when a
 call is hung up.
 This seems to happen in the intercom case, where the SIP URI is
 sip:u...@ip;intercom=true.
 It doesn't happen on every intercom call, but once it does happen, it
 is impossible to clear without clearing the presence tables and
 rebooting the phone..

 -- James


 Can you please catch the traces for this case also? All the presence
 traffic that you see when you hang up the phone - the Publish generated
 by OpenSIPS and the Notify sent to the phone.

 Thanks,

Hi Anca,
Here's the full trace.
I call one phone (01) from my cell phone, and 02 is
monitoring it.
When 01 hangs up, the light on 02 stays red.

Thanks for all your help!

-- James


opensips_red.log
Description: Binary data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-31 Thread Anca Vamanu
Hi,

Andrew, this patch is already in 1.6.2 and trunk.
James, the first thing that you need to check is that you receive 
Subscribes from the phones with event 'dialog'. And indeed as Andrew 
said, you need to load pua and pua_dialoginfo modules.

Regards,

-- 
Anca Vamanu
www.voice-system.ro




Andrew Pogrebennyk wrote:
 James,
 Are you using pua_dialoginfo to get device state? If so are you telling 
 the dialog module to monitor the interesting dialogs and calling 
 dialoginfo_set()?
 Note that once you get this working you will likely need this fix:
 http://sourceforge.net/tracker/?func=detailatid=1086412aid=2847397group_id=232389

 On 31.03.2010 08:31, James Lamanna wrote:
   
 Sorry, I realized I had a configuration error on my phone, but the
 presence still does not work.
 The phone now subscribes to the event: dialog.
 Here are relevant parts of my opensips config:

 modparam(presence, server_address, sip:s...@xxx.xxx.xxx.xxx:5060)
 modparam(presence, expires_offset, 10)
 modparam(presence_xml, force_active, 1)
 modparam(presence_dialoginfo, force_single_dialog, 1)

 I have also verified that handle_subscribe() is being called when a
 SUBSCRIBE message comes in.
 Calling the phone doesn't seem to produce any PUBLISH messages or
 anything pertaining to presence.

 Thanks.

 -- James

 

   

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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-31 Thread James Lamanna
On Wed, Mar 31, 2010 at 10:28 AM, Anca Vamanu a...@opensips.org wrote:
 James Lamanna wrote:
 Anca Vamanu Wrote:


 Andrew, this patch is already in 1.6.2 and trunk.
 James, the first thing that you need to check is that you receive
 Subscribes from the phones with event 'dialog'. And indeed as Andrew
 said, you need to load pua and pua_dialoginfo modules.


 Ok thanks. I'll upgrade to 1.6.2.
 Do I still need to explicitly call dialoginfo_set()?


 Yes, you have to call it.

Hi Anca,
I'm still having problems getting this to work at all.
I've now upgraded to 1.6.2.
Here is my entire config:

debug=3 # debug level (cmd line: -dd)
fork=yes
log_stderror=no # (cmd line: -E)
log_facility=LOG_LOCAL0
tos=0x60

# Uncomment these lines to enter debugging mode
#fork=no
log_stderror=yes
debug=6

check_via=no# (cmd. line: -v)
dns=no   # (cmd. line: -r)
rev_dns=no  # (cmd. line: -R)
port=5060
children=4

listen=udp:my.ip.address:5060
listen=udp:my.ip.address:5061
# -- module loading --

#set module path
#mpath=/usr/local/lib/opensips/modules/
mpath=/usr/local/lib64/opensips/modules/

# Uncomment this if you want to use SQL database
loadmodule db_mysql.so

loadmodule sl.so
loadmodule maxfwd.so
loadmodule textops.so
loadmodule avpops.so
loadmodule tm.so
loadmodule rr.so
loadmodule dialog.so
loadmodule signaling.so
loadmodule options.so
loadmodule localcache.so

loadmodule usrloc.so

loadmodule presence.so
loadmodule presence_xml.so
loadmodule presence_dialoginfo.so
loadmodule pua.so
loadmodule pua_dialoginfo.so
#loadmodule pua_bla.so
loadmodule pua_usrloc.so

loadmodule registrar.so
loadmodule mi_fifo.so
loadmodule xlog.so

# Uncomment this if you want digest authentication
# db_mysql.so must be loaded !
loadmodule auth.so
loadmodule auth_db.so

# !! Nathelper
loadmodule nathelper.so


# - setting module-specific parameters ---

# -- mi_fifo params --
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)

modparam(usrloc, db_mode, 2)
modparam(usrloc|dialog|dispatcher|presence|presence_xml|pua|avpops,
db_url, mysql://opensips:myp...@localhost/opensips)


modparam(avpops,avp_table,usr_preferences)

#modparam(dispatcher, force_dst, 1)
# Only use username
#modparam(dispatcher, flags, 1)

# Store passwords for 1 hour in cache

modparam(auth,username_spec,$avp(i:54))
modparam(auth,password_spec,$avp(i:55))
modparam(auth,calculate_ha1,1)

modparam(auth_db, db_url,
mysql://opensipsro:mypas...@localhost/opensips)
modparam(auth_db, calculate_ha1, yes)
modparam(auth_db, password_column, password)
modparam(auth_db, load_credentials, $avp(i:55)=password)

modparam(rr, enable_full_lr, 1)

modparam(dialog, dlg_flag, 4)
modparam(dialog, profiles_with_value, caller)

modparam(usrloc,nat_bflag,6)
modparam(nathelper,sipping_bflag,8)
#modparam(nathelper, natping_interval, 30)
modparam(nathelper, ping_nated_only, 1)   # Ping only clients behind NAT
#modparam(nathelper, natping_interval, 30)
modparam(nathelper, sipping_from, sip:pin...@my.ip.address)
modparam(nathelper, rtpproxy_sock, unix:/var/run/rtpproxy/rtpproxy.sock)

modparam(presence, server_address, sip:s...@my.ip.address:5060)
modparam(presence, expires_offset, 10)
modparam(presence_xml, force_active, 1)

modparam(presence_dialoginfo, force_single_dialog, 1)
modparam(pua_dialoginfo, presence_server, sip:s...@my.ip.address:5060)
modparam(pua_dialoginfo, include_callid, 1)
modparam(pua_dialoginfo, include_tags, 1)
modparam(pua_dialoginfo, caller_confirmed, 1)

modparam(pua_usrloc, default_domain,  my.ip.address)
modparam(pua_usrloc, presence_server, sip:s...@my.ip.address:5060)


# -  request routing logic ---

# main routing logic

route{


if (!is_method(NOTIFY))
xlog(L_INFO, New request - Request/failure/branch routes: 
M=$rm
RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n);

# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header(10)) {
sl_send_reply(483,Too Many Hops);
exit;
};
if (msg:len =  2048 ) {
sl_send_reply(513, Message too big);
exit;
};

# !! Nathelper
# Special handling for NATed clients; first, NAT test is
# executed: it looks for via!=received and RFC1918 addresses
# in Contact (may fail if line-folding is used); also,
# the received test should, if completed, should check all
# vias for rpesence of received
if (nat_uac_test(3)) {
# Allow RR-ed requests, as these may indicate that
# a NAT-enabled proxy takes care of it; unless it is
# a REGISTER

if (is_method(REGISTER) || !is_present_hf(Record-Route)) {
#xlog(L_INFO, LOG:Someone trying to register from 
private IP,
rewriting\n);
#xlog(L_INFO, $rb\n);

Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-31 Thread James Lamanna
On Wed, Mar 31, 2010 at 9:16 PM, James Lamanna jlama...@gmail.com wrote:
 On Wed, Mar 31, 2010 at 10:28 AM, Anca Vamanu a...@opensips.org wrote:
 James Lamanna wrote:
 Anca Vamanu Wrote:


 Andrew, this patch is already in 1.6.2 and trunk.
 James, the first thing that you need to check is that you receive
 Subscribes from the phones with event 'dialog'. And indeed as Andrew
 said, you need to load pua and pua_dialoginfo modules.


 Ok thanks. I'll upgrade to 1.6.2.
 Do I still need to explicitly call dialoginfo_set()?


 Yes, you have to call it.

 Hi Anca,
 I'm still having problems getting this to work at all.
 I've now upgraded to 1.6.2.
 Here is my entire config:

[snip]

Ok I think I got this somewhat working.
I was missing a dialoginfo_set() in another INVITE path.
However, does anyone know how, if you add a new phone, to make the
presence initialize to idle?
The BLF light blinks amber until I call the phone that is being
monitored, then it will blink red, and go back to green when the call
is terminated.

Thanks.

-- James

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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-31 Thread James Lamanna
On Wed, Mar 31, 2010 at 9:28 PM, James Lamanna jlama...@gmail.com wrote:
 On Wed, Mar 31, 2010 at 9:16 PM, James Lamanna jlama...@gmail.com wrote:
 On Wed, Mar 31, 2010 at 10:28 AM, Anca Vamanu a...@opensips.org wrote:
 James Lamanna wrote:
 Anca Vamanu Wrote:


 Andrew, this patch is already in 1.6.2 and trunk.
 James, the first thing that you need to check is that you receive
 Subscribes from the phones with event 'dialog'. And indeed as Andrew
 said, you need to load pua and pua_dialoginfo modules.


 Ok thanks. I'll upgrade to 1.6.2.
 Do I still need to explicitly call dialoginfo_set()?


 Yes, you have to call it.

 Hi Anca,
 I'm still having problems getting this to work at all.
 I've now upgraded to 1.6.2.
 Here is my entire config:

 [snip]

 Ok I think I got this somewhat working.
 I was missing a dialoginfo_set() in another INVITE path.
 However, does anyone know how, if you add a new phone, to make the
 presence initialize to idle?
 The BLF light blinks amber until I call the phone that is being
 monitored, then it will blink red, and go back to green when the call
 is terminated.

Also, I've found a case where the BLF light stays red, even when a
call is hung up.
This seems to happen in the intercom case, where the SIP URI is
sip:u...@ip;intercom=true.
It doesn't happen on every intercom call, but once it does happen, it
is impossible to clear without clearing the presence tables and
rebooting the phone..

-- James


 Thanks.

 -- James


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


[OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-30 Thread James Lamanna
Hi,
I'm trying to get presence (BLF) working with some Linksys 942 phones.
I've noticed that I get the error,
handle_subscribe: Missing or unsupported event header field value

I did a trace and the phone is trying to subscribe to the x-spa-cti event.
Is there a way to support/fix this? Is there something that supports that event?

Thank you.

This is opensips 1.6.1.

-- James

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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-30 Thread James Lamanna
Sorry, I realized I had a configuration error on my phone, but the
presence still does not work.
The phone now subscribes to the event: dialog.
Here are relevant parts of my opensips config:

modparam(presence, server_address, sip:s...@xxx.xxx.xxx.xxx:5060)
modparam(presence, expires_offset, 10)
modparam(presence_xml, force_active, 1)
modparam(presence_dialoginfo, force_single_dialog, 1)

I have also verified that handle_subscribe() is being called when a
SUBSCRIBE message comes in.
Calling the phone doesn't seem to produce any PUBLISH messages or
anything pertaining to presence.

Thanks.

-- James


On Tue, Mar 30, 2010 at 7:56 PM, James Lamanna jlama...@gmail.com wrote:
 Hi,
 I'm trying to get presence (BLF) working with some Linksys 942 phones.
 I've noticed that I get the error,
 handle_subscribe: Missing or unsupported event header field value

 I did a trace and the phone is trying to subscribe to the x-spa-cti event.
 Is there a way to support/fix this? Is there something that supports that 
 event?

 Thank you.

 This is opensips 1.6.1.

 -- James


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


Re: [OpenSIPS-Users] Presence and Linksys phones - not working 1.6.1

2010-03-30 Thread Andrew Pogrebennyk
James,
Are you using pua_dialoginfo to get device state? If so are you telling 
the dialog module to monitor the interesting dialogs and calling 
dialoginfo_set()?
Note that once you get this working you will likely need this fix:
http://sourceforge.net/tracker/?func=detailatid=1086412aid=2847397group_id=232389

On 31.03.2010 08:31, James Lamanna wrote:
 Sorry, I realized I had a configuration error on my phone, but the
 presence still does not work.
 The phone now subscribes to the event: dialog.
 Here are relevant parts of my opensips config:
 
 modparam(presence, server_address, sip:s...@xxx.xxx.xxx.xxx:5060)
 modparam(presence, expires_offset, 10)
 modparam(presence_xml, force_active, 1)
 modparam(presence_dialoginfo, force_single_dialog, 1)
 
 I have also verified that handle_subscribe() is being called when a
 SUBSCRIBE message comes in.
 Calling the phone doesn't seem to produce any PUBLISH messages or
 anything pertaining to presence.
 
 Thanks.
 
 -- James
 

-- 
Sincerely,
Andrew Pogrebennyk

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