[asterisk-bugs] [JIRA] (ASTERISK-23436) PJSIP: Fix the DNS resolution (whoops)
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Thu Mar 6 16:10:49 CST 2014
Matt Jordan created ASTERISK-23436:
--------------------------------------
Summary: PJSIP: Fix the DNS resolution (whoops)
Key: ASTERISK-23436
URL: https://issues.asterisk.org/jira/browse/ASTERISK-23436
Project: Asterisk
Issue Type: Improvement
Security Level: None
Components: Resources/res_pjsip
Affects Versions: 12.1.0
Reporter: Matt Jordan
So, unless you turn it on, PJSIP only uses {{gethostbyname}}. We forgot to turn it on. Whoops.
http://www.pjsip.org/pjsip/docs/html/group__PJSIP__RESOLVE.htm
{quote}
Using the Resolver
To maintain backward compatibility, the resolver MUST be enabled manually. With the default settings, the resolver WILL NOT perform DNS SRV resolution, as it will just resolve the name with standard pj_gethostbyname() function.
Application can enable the SRV resolver by creating the PJLIB-UTIL DNS resolver with pjsip_endpt_create_resolver(), configure the nameservers of the PJLIB-UTIL DNS resolver object by calling pj_dns_resolver_set_ns() function, and pass the DNS resolver object to pjsip_resolver_set_resolver() function.
Once the resolver is set, it will be used automatically by PJSIP everytime PJSIP needs to send SIP request/response messages.
{quote}
We need to do that.
If possible, this should just always be on. I'm not sure why we'd want the default behaviour (as it is only the default for backwards compatibility).
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list