Review Board 1.7.16


res_pjsip: Enable DNS support.

Review Request #3343 - Created March 12, 2014 and submitted

Joshua Colp
ASTERISK-23435
Reviewers
asterisk-dev
Asterisk
This change adds a configuration option for setting nameservers to be used by the PJSIP DNS client. If this option is not set then the system nameservers are retrieved and used instead.

This also allows the nameservers to be changed by doing a reload.

In case others are wondering as Olle was:

PJLIB-Util (part of pjproject) provides a DNS client which can optionally (but is highly suggested) to be used with PJSIP. It provides asynchronous DNS, SRV lookups, multiple record support, etc. Right now this isn't enabled so we are simply doing A/AAAA record lookups. The reason it's not enabled is that explicit nameservers *must* be provided to it when enabling it. It will not use the system ones by itself. The change up on reviewboard enables it by default using the system nameservers it finds, but with the ability to override or completely disable it if a user wants. The reason I also provide reload functionality is that people in #asterisk-dev expressed a concern that users may change nameservers but don't want to restart Asterisk, which is understandable. 
Explicitly set nameservers and confirmed they were used by PJSIP. Disabled it and confirmed that the DNS client was disabled. Set to auto (explicitly and by default) and confirmed that the system nameservers were used.
/branches/12/CHANGES /CHANGES
Revision 410470 New Change
[20] 19 lines
[+20]
20
ARI
20
ARI
21
------------------
21
------------------
22
 * The live recording object on recording events now contains a target_uri
22
 * The live recording object on recording events now contains a target_uri
23
   field which contains the URI of what is being recorded.
23
   field which contains the URI of what is being recorded.
24

    
   
24

   

    
   
25
res_pjsip

    
   
26
------------------

    
   
27
 * DNS functionality will now automatically be enabled if the system configured

    
   
28
   nameservers can be retrieved. If the system configured nameservers can not be

    
   
29
   retrieved the functionality will resort to using system resolution. Functionalty

    
   
30
   such as SRV records and failover will not be available if system resolution

    
   
31
   is in use.
25

    
   
32

   
26
------------------------------------------------------------------------------
33
------------------------------------------------------------------------------
27
--- Functionality changes from Asterisk 12.0.0 to Asterisk 12.1.0 ------------
34
--- Functionality changes from Asterisk 12.0.0 to Asterisk 12.1.0 ------------
28
------------------------------------------------------------------------------
35
------------------------------------------------------------------------------
29

    
   
36

   
[+20] [20] 3915 lines
/branches/12/include/asterisk/dns.h
Revision 410470 New Change
 
/branches/12/main/dns.c
Revision 410470 New Change
 
/branches/12/res/res_pjsip.c
Revision 410470 New Change
 
/branches/12/res/res_pjsip/config_global.c
Revision 410470 New Change
 
/branches/12/res/res_pjsip/config_system.c
Revision 410470 New Change
 
/branches/12/res/res_pjsip/include/res_pjsip_private.h
Revision 410470 New Change
 
  1. /CHANGES: Loading...
  2. /include/asterisk/dns.h: Loading...
  3. /main/dns.c: Loading...
  4. /res/res_pjsip.c: Loading...
  5. /res/res_pjsip/config_global.c: Loading...
  6. /res/res_pjsip/config_system.c: Loading...
  7. /res/res_pjsip/include/res_pjsip_private.h: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.