[Freeswitch-dev] Presence questions

Beeton, Carolyn (Carolyn) cbeeton at avaya.com
Mon Oct 25 13:03:04 PDT 2010


In an attempt to understand better what FS is doing, I have registered a couple of sets directly to FS.  One (46, a Polycom) subscribes for presence events (RFC3856), and another (48, a Snom) subscribes for dialog events (RFC4235).  Both are monitoring extension 45 (another Polycom set) as well as extension 44 (a FS application extension which just plays back a music file).  46 is another Polycom.
 
One thing I notice right away: a call from 45 to 46 (i.e. from monitored to unmonitored extension) causes the light to stick "on" on both the Polycom and Snom set.  The query around sofia_presence line 762 has the wrong user (i.e. not the monitored set).  The light goes out properly if you call from 46 to 45 and release (i.e. if the monitored set is the callee).
 
The dialog event that is sent when a call from 45 (monitored) to 46 (not monitored) is answered looks like this:
2010-10-25 15:34:45.885611 [DEBUG] sofia_presence.c:1654 send payload:
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="3" state="full" entity="sip:45 at cbeetonscs.ca.nortel.com">
<dialog id="fdc62b22-0ad9-491a-b1bb-9be30459dc10" direction="recipient">
<state>confirmed</state>
<local>
<identity display="45">sip:45 at 47.135.152.158</identity>
<target uri="sip:45 at 47.135.152.158">
<param pname="+sip.rendering" pvalue="yes"/>
</target>
</local>
<remote>
<identity display="45">sip:45 at 47.135.152.158</identity>
<target uri="sip:**45 at 47.135.152.158"/>
</remote>
</dialog>
</dialog-info>

-  ** in the remote target uri?  Does it mean something?
- both the local and remote target identity uri's are the same.  Obviously not.

>From 46 (not monitored) to 45 (monitored):

2010-10-25 15:55:05.649783 [DEBUG] sofia_presence.c:1655 send payload:
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="9" state="full" entity="sip:45 at cbeetonscs.ca.nortel.com">
<dialog id="67220171-54e0-4adb-abfe-790b6a7dd066" direction="recipient">
<state>confirmed</state>
<local>
<identity display="45">sip:45 at 47.135.152.158</identity>
<target uri="sip:45 at 47.135.152.158">
<param pname="+sip.rendering" pvalue="yes"/>
</target>
</local>
<remote>
<identity display="46">sip:46 at 47.135.152.158</identity>
<target uri="sip:**45 at 47.135.152.158"/>
</remote>
</dialog>
</dialog-info>

- note the remote display is correct, but the remote target uri is not.

Part of my confusion is that FS is sending TWO dialog events, one for each leg of the call (both labelled "full"!).  But it really shouldn't be.  It should only be sending the leg that is TO the monitored extension.  (And the direction should reflect that).  (Of course, if both ends are monitored, two events would be appropriate).

Restarting FS seems to mess up the dialog subscriptions.  Until the sets get around to resubscribing, no events are sent.  The presence subscriptions seems to survive restart.  
Not sure how that makes sense, but that's what I see.

Carolyn
 
 



More information about the FreeSWITCH-dev mailing list