[OpenSIPS-Users] PUA MI and pua_publish

Julian Yap julianokyap at gmail.com
Mon Apr 26 21:12:09 CEST 2010


Hi Anca,

Yeah I upgraded to the latest Polycom firmware 3.2.3 (see User Agent below).

It seems Polycom only accepts application/xpidf+xml and
text/xml+msrtc.pidf.  If I send if "application/pidf+xml" it doesn't
work, even it I forward on a ""application/pidf+xml" NOTIFY from valid
UA like X-Lite.

If you check out:
http://fisheye.freeswitch.org/browse/~raw,r=17178/FreeSWITCH/src/mod/endpoints/mod_sofia/sofia_presence.c

The search for 'polycom'.  You'll see that it sends out
"application/xpidf+xml" specifically for Polycom phones.

This is the SUBSCRIBE that a Polycom sends out:
SUBSCRIBE sip:10001005 at sipdev1.test.com SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.47:5060;branch=z9hG4bK4f059433100DF28E.
From: "10001007" <sip:10001007 at sipdev1.test.com>;tag=3965CFF7-15338CF2.
To: <sip:10001005 at sipdev1.test.com>.
CSeq: 1 SUBSCRIBE.
Call-ID: b35e2521-9206c4ac-8639c7ef at 192.168.1.47.
Contact: <sip:10001007 at 192.168.1.47:5060>.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE,
NOTIFY, PRACK, UPDATE, REFER.
Event: presence.
User-Agent: PolycomSoundPointIP-SPIP_450-UA/3.2.3.1734.
Accept-Language: en.
Accept: application/xpidf+xml,text/xml+msrtc.pidf.
Max-Forwards: 70.
Expires: 3600.
Content-Length: 0.

- Julian

On Mon, Apr 26, 2010 at 2:31 AM, Anca Vamanu <anca at opensips.org> wrote:
> Julian Yap wrote:
>>
>> I guess Polycom phones only accept application/xpidf+xml.
>>
>>
>>
>
> Hi Julian,
>
> I kept searching what  "application/xpidf+xml" is and it was quite hard to
> find since it seems to be something not used any more. I found in the ietf
> draft preceding the PIDF RFC
> (http://www.jdrosen.net/papers/draft-rosenberg-impp-pidf-00.txt) the
> following statement:
>
> PIDF documents have the MIME type "application/xpidf+xml".
>
>
> So it seems to be a proposition present in the draft but that was latter
> dropped when passing to the RFC ( now the mime type is application/pidf+xml
> )
>
> Strange that Polycom have such an old implementation of presence  maybe you
> should update your firmare? ).
>
> And related to what you asked, you can not configure presence module to
> change the Content Type of Notify depending on the destination. But maybe
> you can hack it in a local route, catch the generated Notify, remove the
> Content-Type header and add a new one. But I don't know if the this is
> sufficient and the document itself will be accepted by the phone.
>
> Regards,
>
> --
> Anca Vamanu
> www.voice-system.ro
>
>
>
>> On Mon, Apr 26, 2010 at 1:18 AM, Anca Vamanu <anca at opensips.org> wrote:
>>
>>>
>>> Hi Julian,
>>>
>>> Julian Yap wrote:
>>>
>>>>
>>>> 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?
>>>>
>>>>
>>>>
>>>
>>> I don't understand what you mean by translate the Publish in an
>>> appropriate
>>> format.. What other format do you want to have?
>>>
>>> Regards,
>>>
>>> --
>>> Anca Vamanu
>>> www.voice-system.ro
>>>
>>>
>>>
>>>>
>>>> eg. PUBLISH is generated server side using MI:
>>>> :pua_publish:test_fifo
>>>> sip:10001005 at sipdev1.test.com
>>>> 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='10001005 at sipdev1.test.com'><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:10001005 at sipdev1.test.com SIP/2.0.
>>>> Via: SIP/2.0/UDP 64.xxx.yyy.41;branch=z9hG4bK4d6c.8543c9f1.0.
>>>> To: sip:10001005 at sipdev1.test.com.
>>>> From:
>>>>
>>>> <sip:10001005 at sipdev1.test.com>;tag=cdedd5270a3714d043d2a63f64a8b9e2-bc47.
>>>> CSeq: 10 PUBLISH.
>>>> Call-ID: 39497fd430730179-10824 at 64.xxx.yyy.41.
>>>> 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="10001005 at sipdev1.test.com"><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:10001007 at 66.aaa.bbb.23:50330 SIP/2.0.
>>>> Via: SIP/2.0/UDP 64.xxx.yyy.41;branch=z9hG4bKe0ef.b2a3e8c1.0.
>>>> To: <sip:10001007 at sipdev1.test.com>;tag=49DA9FFC-42875603.
>>>> From:
>>>>
>>>> <sip:10001005 at sipdev1.test.com>;tag=164906b045e4966ce5bf3f0df6f222f4-ba51.
>>>> CSeq: 4 NOTIFY.
>>>> Call-ID: 7f817a77-30df0af6-2e84ed8d at 192.168.1.47.
>>>> 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="10001005 at sipdev1.test.com"><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 <anca at opensips.org> 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:10001005 at sipdev1.me.com
>>>>>> 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='10001005 at sipdev1.me.com'><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="10001005 at sipdev1.me.com"><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
>>>>>> Users at lists.opensips.org
>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>



More information about the Users mailing list