diff options
author | Jeff Peeler <jpeeler@digium.com> | 2008-04-01 22:07:30 +0000 |
---|---|---|
committer | Jeff Peeler <jpeeler@digium.com> | 2008-04-01 22:07:30 +0000 |
commit | e9825d7c8a54554d791600758385a878eef9963c (patch) | |
tree | 27889d63d136703de45d9a225e3ab2a95e3337a0 | |
parent | 2fb0bfba352f60e32448e2ae1932e7a439ae623e (diff) |
Existing DNS manager lookups extended to check for SRV records.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | CHANGES | 18 | ||||
-rw-r--r-- | channels/chan_iax2.c | 4 |
2 files changed, 13 insertions, 9 deletions
@@ -30,6 +30,11 @@ SIP Changes ----------- * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given audio file to be played upon completion of an attended transfer. + * Added DNS manager support to registrations for peers referencing peer entries. + +IAX Changes +----------- + * Existing DNS manager lookups extended to check for SRV records. CLI Changes ----------- @@ -37,6 +42,11 @@ CLI Changes references that particular configuration file. Also added "config list" which shows which configuration files are in use. +DNS manager changes +------------------- + * Addresses managed by DNS manager now can check to see if there is a DNS + SRV record for a given domain and will use that hostname/port if present. + ------------------------------------------------------------------------------ --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0 ------------- ------------------------------------------------------------------------------ @@ -194,8 +204,7 @@ SIP changes configs/sip.conf.sample for more information on how it is used. * Added a new configuration option "authfailureevents" that enables manager events when a peer can't authenticate properly. - * Added DNS manager support to registrations, both for peers referencing - and not referencing a peer entry. + * Added DNS manager support to registrations for peers not referencing a peer entry. IAX2 changes ------------ @@ -536,11 +545,6 @@ Call Detail Records * The ResetCDR application now has an 'e' option that re-enables a CDR if it has been disabled using the NoCDR application. -DNS manager changes -------------------- - * Addresses managed by DNS manager now will check to see if there is a DNS - SRV record for a given domain and will use that hostname/port if present. - Miscellaneous New Modules ------------------------- * Added a new CDR module, cdr_sqlite3_custom. diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 0ab1f3bd3..ce89db72f 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -6427,7 +6427,7 @@ static int iax2_append_register(const char *hostname, const char *username, if (!(reg = ast_calloc(1, sizeof(*reg)))) return -1; - if (ast_dnsmgr_lookup(hostname, ®->addr, ®->dnsmgr, NULL) < 0) { + if (ast_dnsmgr_lookup(hostname, ®->addr, ®->dnsmgr, srvlookup ? "_iax._udp" : NULL) < 0) { ast_free(reg); return -1; } @@ -10095,7 +10095,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st /* Non-dynamic. Make sure we become that way if we're not */ AST_SCHED_DEL(sched, peer->expire); ast_clear_flag(peer, IAX_DYNAMIC); - if (ast_dnsmgr_lookup(v->value, &peer->addr, &peer->dnsmgr, NULL)) + if (ast_dnsmgr_lookup(v->value, &peer->addr, &peer->dnsmgr, srvlookup ? "_iax._udp" : NULL)); return peer_unref(peer); if (!peer->addr.sin_port) peer->addr.sin_port = htons(IAX_DEFAULT_PORTNO); |