[sr-dev] [kamailio/kamailio] subscribe > Notify without xml body (#1930)
Denis
notifications at github.com
Fri Apr 19 17:18:09 CEST 2019
hello, trying to get user status using subscription.
But for some reason the notification comes without a body xml
`
SUBSCRIBE sip:dendy at xxxxxxxx:xxxxx;transport=tcp SIP/2.0
Via: SIP/2.0/TCP xxxxxx.x:xxxxx;rport;branch=z9hG4bKPjDQwwW-dtn73uWvfKqpQhAo.BwcQhtj.X;alias
Max-Forwards: 70
From: sip:1203 at xxxxxx;tag=E-xtzmcTcV5OkvKZG3e5pF671Rv0ntn5
To: sip:dendy at xxxxxx
Contact: <sip:1203 at xxxxxx:xxxxx>;transport=tcp
Call-ID: jymDoKAg4ffapLjQREv4qDGNqFN35.jb
CSeq: 6797 SUBSCRIBE
Event: presence
Expires: 36000
Accept: application/pidf+xml, application/xpidf+xml
Allow-Events: presence
Content-Length: 0
2019/04/19 14:17:31.261866 xxxxxx:xxxxxx -> xxxxxx:xxxx
NOTIFY sip:1203 at xxxxxx:xxxxxx SIP/2.0
Via: SIP/2.0/TCP xxxxxx:xxxxxx;branch=z9hG4bK1afa.0124b9a6000000000000000000000000.0
To: <sip:1203 at xxxxxx>;tag=E-xtzmcTcV5OkvKZG3e5pF671Rv0ntn5
From: <sip:dendy at xxxxxx>;tag=dbcd16266fcdb51ae84a18eeabb1faa3-b21b
CSeq: 2 NOTIFY
Call-ID: jymDoKAg4ffapLjQREv4qDGNqFN35.jb
Content-Length: 0
User-Agent: kamailio (5.2.2 (x86_64/linux))
Max-Forwards: 70
Event: presence
Contact: <xxxxxx:xxxxxx;transport=tcp>
Subscription-State: active;expires=3600
`
kamailio.cfg
.....
#!define WITH_PRESENCE
#!define WITH_NAT
#!define WITH_USRLOCDB
#!define WITH_XCAPSRV
loadmodule "db_text.so"
loadmodule "jsonrpcs.so"
loadmodule "kex.so"
loadmodule "corex.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "acc.so"
loadmodule "counters.so"
......
#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
#!endif
......
`
# ----- usrloc params -----
/* enable DB persistency for location entries */
#!ifdef WITH_USRLOCDB
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 0)
#!endif
...........
#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "xxxxxx:xxxxx")
# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "integrated_xcap_server", 1)
#!endif
#!ifdef WITH_PRESENCE
if (!t_newtran()) {
sl_reply_error();
exit;
}
if(is_method("PUBLISH")) {
handle_publish();
t_release();
} else if(is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
}
exit;
#!endif
`
I need to get the body of the form:
`
<?xml version="1.0" encoding="UTF-8"?>
<presence entity="sip:1201 at xxxxxx:xxxxxx;transportTCP"
xmlns="urn:ietf:params:xml:ns:pidf" xmlns:dm="urn:i
f:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:pa
ms:xml:ns:pidf:rpid">
<note>Ready</note>
<tuple id="1201">
<status>
<basic>open</basic>
</status>
<contact priority="1">sip:1203@хххх.com</contact>
</tuple>
<dm:person />
</presence>
`
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1930
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190419/f84c702e/attachment-0001.html>
More information about the sr-dev
mailing list