Module: kamailio
Branch: master
Commit: 385995c27084bdca9ebc4a472f9ab41311416f35
URL:
https://github.com/kamailio/kamailio/commit/385995c27084bdca9ebc4a472f9ab41…
Author: Vasiliy Ganchev <vance(a)ukr.net>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-03T18:56:52+02:00
pua_reginfo: use outbound proxy for PUBLISH requests
---
Modified: src/modules/pua_reginfo/doc/pua_reginfo_admin.xml
Modified: src/modules/pua_reginfo/usrloc_cb.c
---
Diff:
https://github.com/kamailio/kamailio/commit/385995c27084bdca9ebc4a472f9ab41…
Patch:
https://github.com/kamailio/kamailio/commit/385995c27084bdca9ebc4a472f9ab41…
---
diff --git a/src/modules/pua_reginfo/doc/pua_reginfo_admin.xml
b/src/modules/pua_reginfo/doc/pua_reginfo_admin.xml
index e7b7a6e50a..9754055c33 100644
--- a/src/modules/pua_reginfo/doc/pua_reginfo_admin.xml
+++ b/src/modules/pua_reginfo/doc/pua_reginfo_admin.xml
@@ -125,7 +125,7 @@ modparam("pua_reginfo", "publish_reginfo", 0)
<section>
<title><varname>outbound_proxy</varname>(str)</title>
<para>
- The outbound_proxy uri to be used when sending Subscribe requests.
+ The outbound_proxy uri to be used when sending Subscribe and Publish requests.
</para>
<para>
<emphasis> Default value is <quote>NULL</quote>.
diff --git a/src/modules/pua_reginfo/usrloc_cb.c b/src/modules/pua_reginfo/usrloc_cb.c
index 3e00a0eaed..f8a55480bb 100644
--- a/src/modules/pua_reginfo/usrloc_cb.c
+++ b/src/modules/pua_reginfo/usrloc_cb.c
@@ -323,6 +323,9 @@ void reginfo_usrloc_cb(ucontact_t* c, int type, void* param) {
publ.event |= REGINFO_EVENT;
publ.extra_headers= NULL;
+ if(outbound_proxy.s && outbound_proxy.len)
+ publ.outbound_proxy= &outbound_proxy;
+
if(pua.send_publish(&publ) < 0) {
LM_ERR("Error while sending publish\n");
}