<div>Ok. That's the easy solution. However, that ain't protected againts IP spoofing problems. Isn't there a way to authenticate using users (with username and password)? So that, when Asterisk send an INVITE do SER, Asterisk should be a normal SER user, like any other user. I am using the following code to see if the invite is trusted or not:
</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(1, &quot;INVITE&nbsp;not in table&nbsp;trusted\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!radius_www_authorize(&quot;ser host&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(1, &quot;INVITE&nbsp;not authorized, generating digest\n&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; www_challenge(&quot;ser host&quot;, &quot;0&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(1, &quot;INVITE authorized\n&quot;);<br><br>And this way, I think only the users that are in my LDAP database (contacted via radius) and registred to my&nbsp;ser host can make the calls. Am I correct?
</div>
<div>&nbsp;</div>
<div>Jose Simoes<br>&nbsp;</div>
<div><span class="gmail_quote">On 11/25/05, <b class="gmail_sendername">Arek Bekiersz</b> &lt;<a href="mailto:sip@perceval.net">sip@perceval.net</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">You should add following in sip.conf in Asterisk:<br><br>; Proxy server for making calls to SIP or receiving calls from SIP
<br>[your.ser.host]<br>type=friend<br>host=your.ser.host<br>context = your-origin<br>fromdomain=your.domain<br><br><br>In SER, do something like this:<br><br># Authentication for all but your host<br>if( method==&quot;INVITE&quot; &amp;&amp; src_ip!=
your.ser.host.ip) {<br>&nbsp;&nbsp;&nbsp;&nbsp;# Authorize here<br>}<br><br><br>--<br>Arek<br><br><br><br>Voipers Portugal wrote:<br>&gt; Hello,<br>&gt;<br>&gt; I am trying to authenticate the call redirection between my SER and my<br>&gt; Asterisk server. My idea is to create a User for each Server, but still
<br>&gt; donīt know how to do it. Any ideas?<br>&gt;<br>&gt; Regards,<br>&gt;<br>&gt; Jose Simoes<br><br>_______________________________________________<br>Serusers mailing list<br><a href="mailto:serusers@lists.iptel.org">Serusers@iptel.org
</a><br><a href="http://lists.iptel.org/mailman/listinfo/serusers">http://mail.iptel.org/mailman/listinfo/serusers</a><br></blockquote></div><br>