mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Add callbackextension matching & realtime callbackextensions
This patch is based on the one by David Vossel, developer extrodinaire, at https://reviewboard.asterisk.org/r/344/. If multiple peers are defined with the same host/port, but differing callbackextensions, it chooses the peer with the matching callbackextension. Since callbackextension creates an outbound registration with the callbackextension as the Contact address, matching an incoming request by that (in addition to the host/port) makes a lot of sense. This patch also adds support for callbackextension to realtime by querying all peers with callbackextensions on reload and adding registrations for them. (closes issue ASTERISK-13456) Review: https://reviewboard.asterisk.org/r/344/ Review: https://reviewboard.asterisk.org/r/1717/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1261,6 +1261,7 @@ struct sip_peer {
|
||||
AST_STRING_FIELD(zone); /*!< Tonezone for this device */
|
||||
AST_STRING_FIELD(record_on_feature); /*!< Feature to use when receiving INFO with record: on during a call */
|
||||
AST_STRING_FIELD(record_off_feature); /*!< Feature to use when receiving INFO with record: off during a call */
|
||||
AST_STRING_FIELD(callback); /*!< Callback extension */
|
||||
);
|
||||
struct sip_socket socket; /*!< Socket used for this peer */
|
||||
enum sip_transport default_outbound_transport; /*!< Peer Registration may change the default outbound transport.
|
||||
@@ -1345,7 +1346,7 @@ struct sip_peer {
|
||||
* \todo Convert this to astobj2
|
||||
*/
|
||||
struct sip_registry {
|
||||
ASTOBJ_COMPONENTS_FULL(struct sip_registry,1,1);
|
||||
ASTOBJ_COMPONENTS_FULL(struct sip_registry, 80, 1);
|
||||
AST_DECLARE_STRING_FIELDS(
|
||||
AST_STRING_FIELD(callid); /*!< Global Call-ID */
|
||||
AST_STRING_FIELD(realm); /*!< Authorization realm */
|
||||
|
Reference in New Issue
Block a user