[OpenSIPS-Users] PUA MI and pua_publish

Julian Yap julianokyap at gmail.com
Sun Apr 25 14:52:06 CEST 2010


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



More information about the Users mailing list