mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-07 13:49:18 +00:00
pjsip_cli: Create pjsip show channel and contact, and general cli code cleanup.
Created the 'pjsip show channel' and 'pjsip show contact' commands. Refactored out the hated ast_hashtab. Replaced with ao2_container. Cleaned up function naming. Internal only, no public name changes. Cleaned up whitespace and brace formatting in cli code. Changed some NULL checking from "if"s to ast_asserts. Fixed some register/unregister ordering to reduce deadlock potential. Fixed ast_sip_location_add_contact where the 'name' buffer was too short. Fixed some self-assignment issues in res_pjsip_outbound_registration. (closes issue ASTERISK-23276) Review: http://reviewboard.asterisk.org/r/3283/ ........ Merged revisions 410287 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -222,6 +222,19 @@ struct ast_sip_aor {
|
||||
unsigned int support_path;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief A wrapper for contact that adds the aor_id and
|
||||
* a consistent contact id. Used by ast_sip_for_each_contact.
|
||||
*/
|
||||
struct ast_sip_contact_wrapper {
|
||||
/*! The id of the parent aor. */
|
||||
char *aor_id;
|
||||
/*! The id of contact in form of aor_id/contact_uri. */
|
||||
char *contact_id;
|
||||
/*! Pointer to the actual contact. */
|
||||
struct ast_sip_contact *contact;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief DTMF modes for SIP endpoints
|
||||
*/
|
||||
@@ -1620,7 +1633,8 @@ void *ast_sip_dict_set(pj_pool_t* pool, void *ht,
|
||||
* \brief For every contact on an AOR call the given 'on_contact' handler.
|
||||
*
|
||||
* \param aor the aor containing a list of contacts to iterate
|
||||
* \param on_contact callback on each contact on an AOR
|
||||
* \param on_contact callback on each contact on an AOR. The object
|
||||
* received by the callback will be a ast_sip_contact_wrapper structure.
|
||||
* \param arg user data passed to handler
|
||||
* \retval 0 Success, non-zero on failure
|
||||
*/
|
||||
|
Reference in New Issue
Block a user