Hi!
I want to create custom Presence server. Main idea - phones
subscribes to it (for ex, extension 100@domain). This
subscription actually lit BLF button on a phone.
But main idea - change status of BLF can arrive from
different locations via PUBLISH, I assume.
Problem - phones has different type of SUBSCRIBE, like
dialog(application/dialog-info+xml) or
presence(application/pidf+xml). Some of phones are not fully
follow RFC (Like using in SUBSCRIBE R-URI not domain, but IP,
but in From or To - domains are used)
Phones are registered elsewhere, not on Kamailio. After
reading RFC (especially event:dialog part) I’ve found about
SIP-If-Match part, but problem about sync this data across
multiple PUBLISH locations.
Can be Kamailio be a presence server in this scenario?
For ex, SUBSCRIBE
Via: SIP/2.0/UDP
192.168.88.60:5060;branch=z9hG4bK1656003104;rport
CSeq: 20202 SUBSCRIBE
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2160 1.0.5.33
Expires: 180
Supported: replaces, path, timer, eventlist
Event: dialog
Accept:
application/dialog-info+xml,multipart/related,application/rlmi+xml
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE,
NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
I’ve tried send to Kamailio this PUBLISH
Via: SIP/2.0/UDP
10.0.20.71:5060;branch=z9hG4bK-6930-1-0
Max-Forwards: 70
CSeq: 1 PUBLISH
Event: presence
Expires: 3600
Content-Type: application/pidf+xml
Content-Length: 486
<?xml version="1.0" encoding="ISO-8859-1"?>
<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'
<tuple id='z9hG4bK-6930-1-0'>
<status>
<basic>open</basic>
</status>
</tuple>
<dm:person id='1'>
<rpid:activities>
<rpid:on-the-phone/>
</rpid:activities>
<dm:note>Night</dm:note>
</dm:person>
</presence>
Kamailio answers with 200OK, but after this - no NOTIFY
to subscribed clients.
--