Add a a check to see if the dial_string is null then add a default dial string

This commit is contained in:
Mark Crane
2014-04-30 20:54:30 +00:00
parent c1d4cfda15
commit f0dc0d7183

View File

@@ -249,7 +249,9 @@
dial_string = row.dial_string;
else
--set a default dial string
dial_string = "{sip_invite_domain=" .. domain_name .. ",leg_timeout=" .. call_timeout .. ",presence_id=" .. user .. "@" .. domain_name .. "}${sofia_contact(" .. user .. "@" .. domain_name .. ")}";
if (dial_string == null) then
dial_string = "{sip_invite_domain=" .. domain_name .. ",leg_timeout=" .. call_timeout .. ",presence_id=" .. user .. "@" .. domain_name .. "}${sofia_contact(" .. user .. "@" .. domain_name .. ")}";
end
--set the an alternative dial string if the hostnames don't match
if (load_balancing) then
if (local_hostname == database_hostname) then