Hmm, I have this working now using SIP SIMPLE standard (by testing
with X-Lite user agent)...  Unfortunately this doesn't look to be
supported by Polycom phones.  Is there a way to translate the PUBLISH
so the NOTIFY will go out in an appropriate format depending on the
UA?

eg. PUBLISH is generated server side using MI:
:pua_publish:test_fifo
sip:[email protected]
3600
presence
application/pidf+xml
.
.
<?xml version='1.0' encoding='UTF-8'?><presence
xmlns='urn:ietf:params:xml:ns:pidf'
xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model'
xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid'
xmlns:c='urn:ietf:params:xml:ns:pidf:cipid'
entity='[email protected]'><tuple><status><basic>open</basic></status></tuple><dm:person><rpid:activities><rpid:on-the-phone/></rpid:activities><dm:note>On
the Phone</dm:note></dm:person></presence>


SIP packet:
U 2010/04/26 00:49:32.590822 64.xxx.yyy.41:5060 -> 64.xxx.yyy.41:5060
PUBLISH sip:[email protected] SIP/2.0.
Via: SIP/2.0/UDP 64.xxx.yyy.41;branch=z9hG4bK4d6c.8543c9f1.0.
To: sip:[email protected].
From: <sip:[email protected]>;tag=cdedd5270a3714d043d2a63f64a8b9e2-bc47.
CSeq: 10 PUBLISH.
Call-ID: [email protected].
Content-Length: 476.
UA: Test SIP Proxy.
Max-Forwards: 70.
Event: presence.
Expires: 3601.
SIP-If-Match: a.1272199485.30908.19.4.
Content-Type: application/pidf+xml.
.
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid"
entity="[email protected]"><tuple
id="0x7fff82d20c50"><status><basic>open</basic></status></tuple><dm:person
id="0x7fff82d20c50"><rpid:activities><rpid:on-the-phone/></rpid:activities><dm:note>On
the Phone</dm:note></dm:person></presence>


And the NOTIFY goes out:
U 2010/04/26 00:49:32.594132 64.xxx.yyy.41:5060 -> 66.aaa.bbb.23:50330
NOTIFY sip:[email protected]:50330 SIP/2.0.
Via: SIP/2.0/UDP 64.xxx.yyy.41;branch=z9hG4bKe0ef.b2a3e8c1.0.
To: <sip:[email protected]>;tag=49DA9FFC-42875603.
From: <sip:[email protected]>;tag=164906b045e4966ce5bf3f0df6f222f4-ba51.
CSeq: 4 NOTIFY.
Call-ID: [email protected].
Content-Length: 583.
UA: Test SIP Proxy.
Max-Forwards: 70.
Event: presence.
Contact: <sip:64.xxx.yyy.41:5060>.
Subscription-State: active;expires=3136.
Content-Type: application/pidf+xml.
.
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid"
entity="[email protected]"><tuple
id="0x7fff82d20c50"><status><basic>open</basic></status></tuple><dm:person
id="0x7fff82d20c50"><rpid:activities><rpid:on-the-phone/></rpid:activities><dm:note>On
the Phone</dm:note></dm:person><tuple
xmlns="urn:ietf:params:xml:ns:pidf"
id="0x7fff1b75a760"><status><basic>open</basic></status></tuple></presence>




On Sun, Apr 25, 2010 at 11:14 PM, Anca Vamanu <[email protected]> wrote:
> Hi Julian,
>
> Putting inuse as basic status is not really legal - since the pidf RFC
> says that you can have only open and close
> (http://www.faqs.org/rfcs/rfc3863.html).
>
> Regards,
>
> --
> Anca Vamanu
> www.voice-system.ro
>
>
> Julian Yap wrote:
>> I'm trying to hack together my own presence server.  I have PUA USRLOC
>> working fine.
>>
>> So then I just want to be able to generate the 'phone in use' and
>> 'phone not in use' PUBLISH messages via PUA MI.
>>
>> Here's what I have in my pua_publish FIFO example:
>> ---
>> :pua_publish:test_fifo
>> sip:[email protected]
>> 3600
>> presence
>> application/pidf+xml
>> .
>> .
>> <?xml version='1.0'?><presence xmlns='urn:ietf:params:xml:ns:pidf'
>> xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model'
>> xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid'
>> xmlns:c='urn:ietf:params:xml:ns:pidf:cipid'
>> entity='[email protected]'><tuple><status><basic>inuse</basic></status></tuple></presence>
>>
>> ---
>>
>> The actual NOTIFY goes out as:
>> <?xml version="1.0"?>
>> <presence xmlns="urn:ietf:params:xml:ns:pidf"
>> xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
>> xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
>> xmlns:c="urn:ietf:params:xml:ns:pidf:cipid"
>> entity="[email protected]"><tuple
>> id="0x7fff9d908330"><status><basic>inuse</basic></status></tuple><tuple
>> xmlns="urn:ietf:params:xml:ns:pidf"
>> id="0x7fff1b75a760"><status><basic>open</basic></status></tuple></presence>
>>
>>
>>
>> ... So the status gets overwritten as 'open'.
>>
>> Any tips?  What would a working 'phone is in use' and 'phone is not in
>> use' FIFO look like?
>>
>> Thanks!
>>
>> Julian
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

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

Reply via email to