Merge "res_pjsip: Fix infinite recursion when loading transports from realtime" into 13

This commit is contained in:
Joshua Colp
2016-02-11 06:09:49 -06:00
committed by Gerrit Code Review
12 changed files with 781 additions and 259 deletions

View File

@@ -54,34 +54,59 @@ struct pjsip_tpfactory;
struct pjsip_tls_setting;
struct pjsip_tpselector;
/*! \brief Maximum number of ciphers supported for a TLS transport */
#define SIP_TLS_MAX_CIPHERS 64
/*!
* \brief Structure for SIP transport information
*/
struct ast_sip_transport_state {
/*! \brief Transport itself */
struct pjsip_transport *transport;
/*! \brief Transport factory */
struct pjsip_tpfactory *factory;
/*!
* Transport id
* \since 13.8.0
*/
char *id;
/*!
* Transport type
* \since 13.8.0
*/
enum ast_transport type;
/*!
* Address and port to bind to
* \since 13.8.0
*/
pj_sockaddr host;
/*!
* TLS settings
* \since 13.8.0
*/
pjsip_tls_setting tls;
/*!
* Configured TLS ciphers
* \since 13.8.0
*/
pj_ssl_cipher ciphers[SIP_TLS_MAX_CIPHERS];
/*!
* Optional local network information, used for NAT purposes
* \since 13.8.0
*/
struct ast_ha *localnet;
/*!
* DNS manager for refreshing the external address
* \since 13.8.0
*/
struct ast_dnsmgr_entry *external_address_refresher;
/*!
* Optional external address information
* \since 13.8.0
*/
struct ast_sockaddr external_address;
};
#define SIP_SORCERY_DOMAIN_ALIAS_TYPE "domain_alias"
/*!
* Details about a SIP domain alias
*/
struct ast_sip_domain_alias {
/*! Sorcery object details */
SORCERY_OBJECT(details);
AST_DECLARE_STRING_FIELDS(
/*! Domain to be aliased to */
AST_STRING_FIELD(domain);
);
};
/*! \brief Maximum number of ciphers supported for a TLS transport */
#define SIP_TLS_MAX_CIPHERS 64
/*
* \brief Transport to bind to
*/
@@ -108,23 +133,51 @@ struct ast_sip_transport {
);
/*! Type of transport */
enum ast_transport type;
/*! Address and port to bind to */
/*!
* \deprecated Moved to ast_sip_transport_state
* \version 13.8.0 deprecated
* Address and port to bind to
*/
pj_sockaddr host;
/*! Number of simultaneous asynchronous operations */
unsigned int async_operations;
/*! Optional external port for signaling */
unsigned int external_signaling_port;
/*! TLS settings */
/*!
* \deprecated Moved to ast_sip_transport_state
* \version 13.7.1 deprecated
* TLS settings
*/
pjsip_tls_setting tls;
/*! Configured TLS ciphers */
/*!
* \deprecated Moved to ast_sip_transport_state
* \version 13.7.1 deprecated
* Configured TLS ciphers
*/
pj_ssl_cipher ciphers[SIP_TLS_MAX_CIPHERS];
/*! Optional local network information, used for NAT purposes */
/*!
* \deprecated Moved to ast_sip_transport_state
* \version 13.7.1 deprecated
* Optional local network information, used for NAT purposes
*/
struct ast_ha *localnet;
/*! DNS manager for refreshing the external address */
/*!
* \deprecated Moved to ast_sip_transport_state
* \version 13.7.1 deprecated
* DNS manager for refreshing the external address
*/
struct ast_dnsmgr_entry *external_address_refresher;
/*! Optional external address information */
/*!
* \deprecated Moved to ast_sip_transport_state
* \version 13.7.1 deprecated
* Optional external address information
*/
struct ast_sockaddr external_address;
/*! Transport state information */
/*!
* \deprecated
* \version 13.7.1 deprecated
* Transport state information
*/
struct ast_sip_transport_state *state;
/*! QOS DSCP TOS bits */
unsigned int tos;
@@ -134,6 +187,20 @@ struct ast_sip_transport {
int write_timeout;
};
#define SIP_SORCERY_DOMAIN_ALIAS_TYPE "domain_alias"
/*!
* Details about a SIP domain alias
*/
struct ast_sip_domain_alias {
/*! Sorcery object details */
SORCERY_OBJECT(details);
AST_DECLARE_STRING_FIELDS(
/*! Domain to be aliased to */
AST_STRING_FIELD(domain);
);
};
/*!
* \brief Structure for SIP nat hook information
*/
@@ -2172,4 +2239,25 @@ const char *ast_sip_get_host_ip_string(int af);
*/
long ast_sip_threadpool_queue_size(void);
/*!
* \brief Retrieve transport state
* \since 13.7.1
*
* @param transport_id
* @returns transport_state
*
* \note ao2_cleanup(...) or ao2_ref(..., -1) must be called on the returned object
*/
struct ast_sip_transport_state *ast_sip_get_transport_state(const char *transport_id);
/*!
* \brief Retrieves all transport states
* \since 13.7.1
*
* @returns ao2_container
*
* \note ao2_cleanup(...) or ao2_ref(..., -1) must be called on the returned object
*/
struct ao2_container *ast_sip_get_transport_states(void);
#endif /* _RES_PJSIP_H */