18#include "pjsip/sip_multipart.h"
38 JAMI_ERR(
"PresSubServer::pres_evsub_on_srv_state() is deprecated and does nothing");
45 JAMI_DBG(
"Presence_subscription_server estate has changed but no rdata.");
52 JAMI_ERR(
"Unable to find account IP2IP");
59 JAMI_ERR(
"Presence not initialized");
67 JAMI_DBG(
"Presence_subscription_server to %s is %s",
90 std::string request(
str->ptr,
str->slen);
109 JAMI_ERR(
"PresSubServer::pres_evsub_on_srv_state() is deprecated and does nothing");
114 std::string name(
rdata->msg_info.to->name.ptr,
rdata->msg_info.to->name.slen);
115 std::string
server(
rdata->msg_info.from->name.ptr,
rdata->msg_info.from->name.slen);
116 JAMI_DBG(
"Incoming pres_on_rx_subscribe_request for %s, name:%s, server:%s."
125 JAMI_ERR(
"Unable to find account IP2IP");
140 JAMI_WARN(
"Unable to create UAS dialog for subscription: %s [status=%d]",
errmsg, status);
148 pres_cb.on_evsub_state = &pres_evsub_on_srv_state;
157 JAMI_WARN(
"Unable to create server subscription %d", status);
159 if (code == 599 || code > 699 || code < 300) {
180 remote[status] =
'\0';
210 JAMI_WARN(
"Unable to accept presence subscription %d", status);
255 JAMI_WARN(
"Unable to create/send NOTIFY %d", status);
317 return (!(
strcmp(remote_, s)));
324 JAMI_DBG(
"Approve Presence_subscription_server for %s: %s.", remote_,
flag ?
"true" :
"false");
349 JAMI_WARN(
"Unable to create/send NOTIFY");
static LIBJAMI_TEST_EXPORT Manager & instance()
SIPVoIPLink & sipVoIPLink() const
static pjsip_module mod_presence_server
PresSubServer(SIPPresence *pres, pjsip_evsub *evsub, const char *remote, pjsip_dialog *d)
bool matches(const char *s) const
pjsip_pres_status * getStatus()
Return presence data.
void fillDoc(pjsip_tx_data *tdata, const pres_msg_data *msg_data)
Fill xml document, the header and the body.
pjsip_endpoint * getEndpoint()
constexpr const pj_str_t CONST_PJ_STR(T(&a)[N]) noexcept
void emitSignal(Args... args)
pj_bool_t pres_on_rx_subscribe_request(pjsip_rx_data *rdata)
A SIP Account specify SIP specific functions and object = SIPCall/SIPVoIPLink)
A SIP Presence manages buddy subscription in both PBX and IP2IP contexts.
Specific VoIPLink for SIP (SIP core for incoming and outgoing events).