Module: sems Branch: master Commit: b72a51235b94855e24ae48ca6b9bbf1230b1a86a URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=b72a51235b94855e24ae48ca6b9bbf1230b1a86a
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Fri Jun 10 15:26:11 2011 +0200 db_reg_agent: adds optional outbound_proxy --- apps/db_reg_agent/DBRegAgent.cpp | 7 +++++-- apps/db_reg_agent/DBRegAgent.h | 2 ++ apps/db_reg_agent/etc/db_reg_agent.conf | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/db_reg_agent/DBRegAgent.cpp b/apps/db_reg_agent/DBRegAgent.cpp index 71c486a..c18df61 100644 --- a/apps/db_reg_agent/DBRegAgent.cpp +++ b/apps/db_reg_agent/DBRegAgent.cpp @@ -50,6 +50,7 @@ bool DBRegAgent::delete_removed_registrations = true; bool DBRegAgent::save_contacts = true; bool DBRegAgent::db_read_contact = false; string DBRegAgent::contact_hostport; +string DBRegAgent::outbound_proxy; bool DBRegAgent::save_auth_replies = false; unsigned int DBRegAgent::error_retry_interval = 300; @@ -143,6 +144,8 @@ int DBRegAgent::onLoad() contact_hostport = cfg.getParameter("contact_hostport"); + outbound_proxy = cfg.getParameter("outbound_proxy"); + error_retry_interval = cfg.getParameterInt("error_retry_interval", 300); if (!error_retry_interval) { WARN("disabled retry on errors!\n"); @@ -368,7 +371,7 @@ void DBRegAgent::createRegistration(long subscriber_id, user, // name user, // auth_user pass, - "", // proxy + outbound_proxy, // proxy contact_uri // contact ); @@ -447,7 +450,7 @@ void DBRegAgent::updateRegistration(long subscriber_id, user, // name user, // auth_user pass, - "", // proxy + outbound_proxy, // proxy contact)); // contact registrations_mut.unlock(); } diff --git a/apps/db_reg_agent/DBRegAgent.h b/apps/db_reg_agent/DBRegAgent.h index 8fec10f..cc40602 100644 --- a/apps/db_reg_agent/DBRegAgent.h +++ b/apps/db_reg_agent/DBRegAgent.h @@ -134,6 +134,8 @@ class DBRegAgent static string contact_hostport; + static string outbound_proxy; + static bool save_auth_replies; static unsigned int error_retry_interval; diff --git a/apps/db_reg_agent/etc/db_reg_agent.conf b/apps/db_reg_agent/etc/db_reg_agent.conf index 7f43a59..76bda8b 100644 --- a/apps/db_reg_agent/etc/db_reg_agent.conf +++ b/apps/db_reg_agent/etc/db_reg_agent.conf @@ -18,6 +18,11 @@ joined_query="select subscribers.subscriber_id as subscriber_id, subscribers.use #example with contact: # joined_query="select subscribers.subscriber_id as subscriber_id, subscribers.user as user, subscribers.pass as pass, subscribers.realm as realm, subscribers.contact as contact, registrations.registration_status as registration_status, registrations.expiry as expiry, registrations.last_registration as last_registration from subscribers left join registrations on subscribers.subscriber_id=registrations.subscriber_id;" +# outbound_proxy=<sip_uri> +# set the outbound proxy to send registrations through +# +#outbound_proxy=sip:10.0.0.2:5070 + # contact_hostport=<host:port> - overriding contact host:port # sets the contact host:port portion that is registered # default: empty _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
