diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-03-05 11:53:36 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-03-05 11:53:36 +0000 |
commit | cb88a08734906fe0e47fef54752d5928ae9d45ac (patch) | |
tree | fd67bf0c001d6193bec0feb4d6e41cba6432ccda /pjsip/include/pjsip-ua | |
parent | 84ba2655e4a972faf9b763001579b4d5d616cc4b (diff) |
Added API to terminate dialog prematurely. Affect: dialog, invite sessions, evsub, and presence
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@283 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip-ua')
-rw-r--r-- | pjsip/include/pjsip-ua/sip_inv.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pjsip/include/pjsip-ua/sip_inv.h b/pjsip/include/pjsip-ua/sip_inv.h index f41a1d94..4939c9d3 100644 --- a/pjsip/include/pjsip-ua/sip_inv.h +++ b/pjsip/include/pjsip-ua/sip_inv.h @@ -169,6 +169,8 @@ struct pjsip_inv_session char obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification. */ pj_pool_t *pool; /**< Dialog's pool. */ pjsip_inv_state state; /**< Invite sess state. */ + pjsip_status_code cause; /**< Disconnect cause. */ + pj_bool_t notify; /**< Internal. */ pjsip_dialog *dlg; /**< Underlying dialog. */ pjsip_role_e role; /**< Invite role. */ unsigned options; /**< Options in use. */ @@ -333,6 +335,29 @@ PJ_DECL(pj_status_t) pjsip_inv_create_uas(pjsip_dialog *dlg, /** + * Forcefully terminate and destroy INVITE session, regardless of + * the state of the session. Note that this function should only be used + * when there is failure in the INVITE session creation. After the + * invite session has been created and initialized, normally application + * SHOULD use #pjsip_inv_end_session() to end the INVITE session instead. + * + * Note also that this function may terminate the underlying dialog, if + * there are no other sessions in the dialog. + * + * @param inv The invite session. + * @param st_code Status code for the reason of the termination. + * @param notify If set to non-zero, then on_state_changed() + * callback will be called. + * + * @return PJ_SUCCESS if the INVITE session has been + * terminated. + */ +PJ_DECL(pj_status_t) pjsip_inv_terminate( pjsip_inv_session *inv, + int st_code, + pj_bool_t notify ); + + +/** * Create the initial INVITE request for this session. This function can only * be called for UAC session. If local media capability is specified when * the invite session was created, then this function will put an SDP offer |