summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsua-lib
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2013-06-13 08:56:51 +0000
committerNanang Izzuddin <nanang@teluu.com>2013-06-13 08:56:51 +0000
commit52dd1574caa10229ec5e672b817c75e4793d2409 (patch)
treebc877281b1e2e0a36000c8562cac6435d02357c3 /pjsip/include/pjsua-lib
parentd6ba39f9ca6c2054967ffa87275dc6b334ab3e1e (diff)
Close #1675: Added callback to allow application to specify account to handle incoming message.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4534 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua-lib')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 9fb84ea7..0cc34acc 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -1276,6 +1276,27 @@ typedef struct pjsua_callback
pjmedia_transport *base_tp,
unsigned flags);
+ /**
+ * This callback can be used by application to override the account
+ * to be used to handle an incoming message. Initially, the account to
+ * be used will be calculated automatically by the library. This initial
+ * account will be used if application does not implement this callback,
+ * or application sets an invalid account upon returning from this
+ * callback.
+ *
+ * Note that currently the incoming messages requiring account assignment
+ * are INVITE, MESSAGE, SUBSCRIBE, and unsolicited NOTIFY. This callback
+ * may be called before the callback of the SIP event itself, i.e:
+ * incoming call, pager, subscription, or unsolicited-event.
+ *
+ * @param rdata The incoming message.
+ * @param acc_id On input, initial account ID calculated automatically
+ * by the library. On output, the account ID prefered
+ * by application to handle the incoming message.
+ */
+ void (*on_acc_find_for_incoming)(const pjsip_rx_data *rdata,
+ pjsua_acc_id* acc_id);
+
} pjsua_callback;