diff options
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip-ua/sip_inv.h | 3 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 33 |
2 files changed, 35 insertions, 1 deletions
diff --git a/pjsip/include/pjsip-ua/sip_inv.h b/pjsip/include/pjsip-ua/sip_inv.h index a367fe1e..77a499ef 100644 --- a/pjsip/include/pjsip-ua/sip_inv.h +++ b/pjsip/include/pjsip-ua/sip_inv.h @@ -133,7 +133,8 @@ typedef struct pjsip_inv_callback /** * This callback is called whenever any transactions within the session * has changed their state. Application MAY implement this callback, - * e.g. to monitor the progress of an outgoing request. + * e.g. to monitor the progress of an outgoing request, or to send + * response to unhandled incoming request (such as INFO). * * This callback is optional. * diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index b727528b..062943b7 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -545,6 +545,21 @@ typedef struct pjsua_callback pjsip_rx_data *rdata); /** + * This is a general notification callback which is called whenever + * a transaction within the call has changed state. Application can + * implement this callback for example to monitor the state of + * outgoing requests, or to answer unhandled incoming requests + * (such as INFO) with a final response. + * + * @param call_id Call identification. + * @param tsx The transaction which has changed state. + * @param e Transaction event that caused the state change. + */ + void (*on_call_tsx_state)(pjsua_call_id call_id, + pjsip_transaction *tsx, + pjsip_event *e); + + /** * Notify application when media state in the call has changed. * Normal application would need to implement this callback, e.g. * to connect the call's media to sound device. @@ -2907,6 +2922,24 @@ PJ_DECL(pj_status_t) pjsua_call_send_typing_ind(pjsua_call_id call_id, const pjsua_msg_data*msg_data); /** + * Send arbitrary request with the call. This is useful for example to send + * INFO request. Note that application should not use this function to send + * requests which would change the invite session's state, such as re-INVITE, + * UPDATE, PRACK, and BYE. + * + * @param call_id Call identification. + * @param method SIP method of the request. + * @param msg_data Optional message body and/or list of headers to be + * included in outgoing request. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pjsua_call_send_request(pjsua_call_id call_id, + const pj_str_t *method, + const pjsua_msg_data *msg_data); + + +/** * Terminate all calls. This will initiate #pjsua_call_hangup() for all * currently active calls. * |