<div dir="ltr">Just a guess, have you tried:<br><br><div><span style="font-size:12.8px">modparam("pv", "varset", "externalip=s:udp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a>")</span></div><div><span style="font-size:12.8px">or<br></span><span style="font-size:12.8px">modparam("pv", "varset", "externalip=s:tcp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a>")</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">etc...</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Also maybe instead of force_send_socket method, a direct assignment?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">$fs = $var(externalip); </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 4, 2017 at 8:14 AM, Jöran Vinzens <span dir="ltr"><<a href="mailto:vinzens@sipgate.de" target="_blank">vinzens@sipgate.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi all,<br><br></div>i try to re-arrange my config and i try to use a variable declared in modparam pv such like:<br>modparam("pv", "varset", "externalip=s:1.2.3.4")<br><br></div>and use it as:<br>force_send_socket($var(<wbr>externalip));<br clear="all"><div><div><div><br></div><div>unfortunately the kamailio does not start with this configuration and telling me bad config file like:<br>line 109, column 36: bad argument, [proto:]host[:port] expected <br><br></div><div>it seems the force_send_socket is not able to get variable. Is there any other way to have static content defined and put across the config?<br><br></div><div>Reason for the question is the possibility to use ansible as deployment tool. I set all the variables i need in a separate file and include it. This file contains the entire modconfig and global vars section to adapt this part to every single machine individually. This does not work if i need to put "constant" variables on different places in my config.<br><br></div><div>If anybody has ever made this, could you please help me, or give any suggestions?<br><br><br></div><div>Many thanks!<br></div><div>BR<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Jöran<br></div><div><br><br>-- <br><div class="m_-902128255529393681gmail_signature"><div dir="ltr"><pre>Jöran Vinzens - <a href="mailto:vinzens@sipgate.de" target="_blank">vinzens@sipgate.de</a><br><br>sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf<br>HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois<br>Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391<br><br><a href="http://www.sipgate.de" target="_blank">www.sipgate.de</a> - <a href="http://www.sipgate.co.uk" target="_blank">www.sipgate.co.uk</a><br></pre></div></div>
</div></font></span></div></div></div>
<br>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Sincerely,<div>Brandon Armstead</div><div>CTO / CRYY.com</div></div></div>
</div>