diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-02-02 21:17:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-02-02 21:17:40 +0000 |
commit | 04468bc0cde5faab1ed8bea2b39c95d7dccb0fc4 (patch) | |
tree | 832059c6771abaf28013f8753374559663fbd4c2 /pjsip | |
parent | 4fcef1a3ff5b140b15562165ca6eb5570e8dee3d (diff) |
Added pjsip_dlg_respond()
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@133 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/include/pjsip/sip_dialog.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_dialog.h b/pjsip/include/pjsip/sip_dialog.h index 9e827c78..fde16ad9 100644 --- a/pjsip/include/pjsip/sip_dialog.h +++ b/pjsip/include/pjsip/sip_dialog.h @@ -126,6 +126,11 @@ PJ_DECL(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua, * local Contact to contact. If contact is not specified, the local contact * is initialized from the URI in the To header in the request. * + * This function will also create UAS transaction for the incoming request, + * and associate the transaction to the rdata. Application can query the + * transaction used to handle this request by calling #pjsip_rdata_get_tsx() + * after this function returns. + * * Note that initially, the session count in the dialog will be initialized * to zero. */ @@ -300,6 +305,28 @@ PJ_DECL(pj_status_t) pjsip_dlg_send_response( pjsip_dialog *dlg, pjsip_tx_data *tdata); +/** + * This composite function sends response message statefully to an incoming + * request message. + * + * @param endpt The endpoint instance. + * @param rdata The incoming request message. + * @param st_code Status code of the response. + * @param st_text Optional status text of the response. + * @param hdr_list Optional header list to be added to the response. + * @param body Optional message body to be added to the response. + * + * @return PJ_SUCCESS if response message has successfully been + * sent. + */ +PJ_DECL(pj_status_t) pjsip_dlg_respond( pjsip_dialog *dlg, + pjsip_rx_data *rdata, + int st_code, + const pj_str_t *st_text); + +/* + * Internal (called by sip_ua_layer.c) + */ /* Receives transaction event (called by user_agent module) */ void pjsip_dlg_on_tsx_state( pjsip_dialog *dlg, |