[OpenSIPS-Users] PUA MI and pua_publish

Anca Vamanu anca at opensips.org
Mon Apr 26 13:18:03 CEST 2010


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