<div dir="ltr">Brian ,It looks interesting but you should be confident enough altering a FS source code :) , that I wont bother at least. And I guess, you have to recompile FS each time you are making a change in that string?<div>
<br></div><div>A code snippet :<div><div> <font size="1">if (user_agent_filter) {</font></div><div><font size="1">                if (switch_regex_match(user_agent, user_agent_filter) == SWITCH_STATUS_SUCCESS) {</font></div>
<div><font size="1">                        if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {</font></div><div><font size="1">                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,</font></div>
<div><font size="1">                                                                  &quot;SIP auth OK (REGISTER) due to user-agent-filter.  Filter \&quot;%s\&quot; User-Agent \&quot;%s\&quot;\n&quot;, user_agent_filter, user_agent);</font></div>
<div><font size="1">                        }</font></div><div><font size="1">                } else {</font></div><div><font size="1">                        ret = AUTH_FORBIDDEN;</font></div><div><font size="1">                        if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {</font></div>
<div><font size="1">                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,</font></div><div><font size="1">                                                                  &quot;SIP auth failure (REGISTER) due to user-agent-filter.  Filter \&quot;%s\&quot; User-Agent \&quot;%s\&quot;\n&quot;, user_agent_filter,</font></div>
<div><font size="1">                                                                  user_agent);</font></div><div><font size="1">                        }</font></div><div><font size="1">                        goto end;</font></div>
<div><font size="1">                }</font></div><div><font size="1">        }</font></div></div><div><font size="1"><br></font></div><div> can block a specific User-agent comparing that value in the first nested IF condition.</div>
<div>But my vote goes to xml_curl method !</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 6, 2013 at 1:41 AM, Brian West <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You guys try way too hard.<br>
<br>
sofia_reg.c:                    if (!strcasecmp(var, &quot;user-agent-filter&quot;)) {<br>
<br>
This is a sofia profile param that you can put a regex in and filter it out.  ;)<br>
<br>
--<br>
Brian West<br>
<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a><br>
FreeSWITCH Solutions, LLC<br>
PO BOX 2531<br>
Brookfield, WI 53008-2531<br>
Twitter: @FreeSWITCH_Wire , @briankwest<br>
<a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br>
<a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a><br>
<br>
T: <a href="tel:%2B1.918.420.9001" value="+19184209001">+1.918.420.9001</a>  |  F: <a href="tel:%2B1.918.420.9002" value="+19184209002">+1.918.420.9002</a>  |  M: +1.918.424.WEST<br>
iNUM: <a href="tel:%2B883%205100%201420%209001" value="+883510014209001">+883 5100 1420 9001</a><br>
ISN: 410*543<br>
Skype:briankwest<br>
PGP Key: <a href="http://www.bkw.org/key.txt" target="_blank">http://www.bkw.org/key.txt</a> (AB93356707C76CED)<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Dec 5, 2013, at 11:59 AM, Peter Steinbach &lt;<a href="mailto:lists@telefaks.de">lists@telefaks.de</a>&gt; wrote:<br>
<br>
&gt; xml_curl looks a server URL with the registration params.<br>
&gt;<br>
&gt; So you will need to set up a web server (e.g. with apache/php, Ruby, Perl, Python or anything else), manage these parameters and return an XML to Freeswitch based on the parameters.<br>
&gt; Some programming skills will be needed for that.<br>
&gt;<br>
&gt; Best regards<br>
&gt; Peter<br>
<br>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>