[asterisk-bugs] [JIRA] (ASTERISK-22135) res_sip: Restructure ast_sip_endpoint to have better structure

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sat Jul 20 17:50:08 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-22135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-22135:
-----------------------------------

    Status: Open  (was: Triage)
    
> res_sip: Restructure ast_sip_endpoint to have better structure
> --------------------------------------------------------------
>
>                 Key: ASTERISK-22135
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22135
>             Project: Asterisk
>          Issue Type: Improvement
>          Components: Resources/res_sip
>    Affects Versions: 12
>            Reporter: Matt Jordan
>              Labels: Asterisk12
>
> It has gotten quite large:
> {noformat}
> /*!
>  * \brief An entity with which Asterisk communicates
>  */
> struct ast_sip_endpoint {
> 	SORCERY_OBJECT(details);
> 	AST_DECLARE_STRING_FIELDS(
> 		/*! Context to send incoming calls to */
> 		AST_STRING_FIELD(context);
> 		/*! Name of an explicit transport to use */
> 		AST_STRING_FIELD(transport);
> 		/*! Outbound proxy to use */
> 		AST_STRING_FIELD(outbound_proxy);
> 		/*! Explicit AORs to dial if none are specified */
> 		AST_STRING_FIELD(aors);
>                 /*! Musiconhold class to suggest that the other side use when placing on hold */
>                 AST_STRING_FIELD(mohsuggest);
> 		/*! Optional external media address to use in SDP */
> 		AST_STRING_FIELD(external_media_address);
> 		/*! Configured voicemail boxes for this endpoint. Used for MWI */
> 		AST_STRING_FIELD(mailboxes);
> 		/*! Configured RTP engine for this endpoint. */
> 		AST_STRING_FIELD(rtp_engine);
> 		/*! Configured tone zone for this endpoint. */
> 		AST_STRING_FIELD(zone);
> 		/*! Configured language for this endpoint. */
> 		AST_STRING_FIELD(language);
> 		/*! Feature to enact when one-touch recording INFO with Record: On is received */
> 		AST_STRING_FIELD(recordonfeature);
> 		/*! Feature to enact when one-touch recording INFO with Record: Off is received */
> 		AST_STRING_FIELD(recordofffeature);
> 		/*! SDP origin username */
> 		AST_STRING_FIELD(sdpowner);
> 		/*! SDP session name */
> 		AST_STRING_FIELD(sdpsession);
> 		/*! Default username to place in From header */
> 		AST_STRING_FIELD(fromuser);
> 		/*! Domain to place in From header */
> 		AST_STRING_FIELD(fromdomain);
> 		/*! Username to use when sending MWI NOTIFYs to this endpoint */
> 		AST_STRING_FIELD(mwi_from);
> 	);
> 	/*! Identification information for this endpoint */
> 	struct ast_party_id id;
> 	/*! Domain to which this endpoint belongs */
> 	struct ast_sip_domain *domain;
> 	/*! Address of record for incoming registrations */
> 	struct ast_sip_aor *aor;
> 	/*! Codec preferences */
> 	struct ast_codec_pref prefs;
> 	/*! Configured codecs */
> 	struct ast_format_cap *codecs;
> 	/*! Names of inbound authentication credentials */
> 	const char **sip_inbound_auths;
> 	/*! Number of configured auths */
> 	size_t num_inbound_auths;
> 	/*! Names of outbound authentication credentials */
> 	const char **sip_outbound_auths;
> 	/*! Number of configured outbound auths */
> 	size_t num_outbound_auths;
> 	/*! DTMF mode to use with this endpoint */
> 	enum ast_sip_dtmf_mode dtmf;
> 	/*! Whether IPv6 RTP is enabled or not */
> 	unsigned int rtp_ipv6;
> 	/*! Whether symmetric RTP is enabled or not */
> 	unsigned int rtp_symmetric;
> 	/*! Whether ICE support is enabled or not */
> 	unsigned int ice_support;
> 	/*! Whether to use the "ptime" attribute received from the endpoint or not */
> 	unsigned int use_ptime;
> 	/*! Whether to force using the source IP address/port for sending responses */
> 	unsigned int force_rport;
> 	/*! Whether to rewrite the Contact header with the source IP address/port or not */
> 	unsigned int rewrite_contact;
> 	/*! Enabled SIP extensions */
> 	unsigned int extensions;
> 	/*! Minimum session expiration period, in seconds */
> 	unsigned int min_se;
> 	/*! Session expiration period, in seconds */
> 	unsigned int sess_expires;
> 	/*! List of outbound registrations */
> 	AST_LIST_HEAD_NOLOCK(, ast_sip_registration) registrations;
> 	/*! Method(s) by which the endpoint should be identified. */
> 	enum ast_sip_endpoint_identifier_type ident_method;
> 	/*! Boolean indicating if direct_media is permissible */
> 	unsigned int direct_media;
> 	/*! When using direct media, which method should be used */
> 	enum ast_sip_session_refresh_method direct_media_method;
> 	/*! When performing connected line update, which method should be used */
> 	enum ast_sip_session_refresh_method connected_line_method;
> 	/*! Take steps to mitigate glare for direct media */
> 	enum ast_sip_direct_media_glare_mitigation direct_media_glare_mitigation;
> 	/*! Do not attempt direct media session refreshes if a media NAT is detected */
> 	unsigned int disable_direct_media_on_nat;
> 	/*! Do we trust the endpoint with our outbound identity? */
> 	unsigned int trust_id_outbound;
> 	/*! Do we trust identity information that originates externally (e.g. P-Asserted-Identity header)? */
> 	unsigned int trust_id_inbound;
> 	/*! Do we send P-Asserted-Identity headers to this endpoint? */
> 	unsigned int send_pai;
> 	/*! Do we send Remote-Party-ID headers to this endpoint? */
> 	unsigned int send_rpid;
> 	/*! Do we add Diversion headers to applicable outgoing requests/responses? */
> 	unsigned int send_diversion;
> 	/*! Should unsolicited MWI be aggregated into a single NOTIFY? */
> 	unsigned int aggregate_mwi;
> 	/*! Do we use media encryption? what type? */
> 	enum ast_sip_session_media_encryption media_encryption;
> 	/*! Do we use AVPF exclusively for this endpoint? */
> 	unsigned int use_avpf;
> 	/*! Is one-touch recording permitted? */
> 	unsigned int one_touch_recording;
> 	/*! Boolean indicating if ringing should be sent as inband progress */
> 	unsigned int inband_progress;
> 	/*! Call group */
> 	ast_group_t callgroup;
> 	/*! Pickup group */
> 	ast_group_t pickupgroup;
> 	/*! Named call group */
> 	struct ast_namedgroups *named_callgroups;
> 	/*! Named pickup group */
> 	struct ast_namedgroups *named_pickupgroups;
> 	/*! Pointer to the persistent Asterisk endpoint */
> 	struct ast_endpoint *persistent;
> 	/*! The number of channels at which busy device state is returned */
> 	unsigned int devicestate_busy_at;
> 	/*! Determines if transfers (using REFER) are allowed by this endpoint */
> 	unsigned int allowtransfer;
> 	/*! DSCP TOS bits for audio streams */
> 	unsigned int tos_audio;
> 	/*! Priority for audio streams */
> 	unsigned int cos_audio;
> 	/*! DSCP TOS bits for video streams */
> 	unsigned int tos_video;
> 	/*! Priority for video streams */
> 	unsigned int cos_video;
> 	/*! Indicates if endpoint is allowed to initiate subscriptions */
> 	unsigned int allowsubscribe;
> 	/*! The minimum allowed expiration for subscriptions from endpoint */
> 	unsigned int subminexpiry;
> };
> {noformat}
> Things that could be grouped together:
> * Media settings
> ** With possible media subtypes. This will also eliminate a lot of {{thing_type}} as a convention.
> * Authentication/Trust (maybe)
> * Transport/NAT settings
> * Party Identification

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list