<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="Open WebMail 2.20 20031014" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>

<font size="2">So... if I understand this correctly, you're having problems with diverted calls FROM the Asterisk IVR not being able to authenticate on SER? 
<br />
<br />Could you just add the Asterisk server to the trust tables and skip the auth process for calls coming back or would that create problems? 
<br />
<br />N.
<br /><b>
<br />On Tue, 5 Sep 2006 21:16:45 +0100, Roberto Lopes wrote</b>
<br />&gt; Hi to all!
<br />&gt; I've a big problem with SER &amp; Asterisk
<br />&gt; I've a network where i put them working together.
<br />&gt; Asterisk is the media gateway with PSTN as well as being the server
which is making all the services available (IVR, voicemail, conference
calls, etc).
<br />&gt; 
SER just routes calls either to the softphones, VoIP phones or to Asterisk who will just forward the calls to PSTN (via Asterisk).
<br />&gt; 
Till now everything works well except the service IVR which is working on Asterisk.
<br />&gt; 
<br />&gt; Details:
<br />&gt; <a href="http://192.168.226.13"></b></font><font color="red"><b>MailScanner has detected a possible fraud attempt from "192.168.226.13" claiming to be</b></font> <font color="red"><b>MailScanner warning: numerical links are often malicious: 192.168.226.13</a> - IP SER
<br />&gt; <a href="http://192.168.226.45"></b></font><font color="red"><b>MailScanner has detected a possible fraud attempt from "192.168.226.45" claiming to be</b></font> <font color="red"><b>MailScanner warning: numerical links are often malicious: 192.168.226.45</a> - IP Asterisk

<br />&gt; 
<br />&gt; The problem is only after the user (<a href="mailto:roberto@192.168.226.13">roberto@192.168.226.13</a> - authenticated and authorized in RADIUS) calls IVR.
<br />&gt; Till then the user calls, IVR gives some information to the user and everything goes well.

<br />&gt; Problem is when he presses a number which will have to redirect the call to another user.
<br />&gt; And why is there a problem.
<br />&gt; Because the initially <a href="mailto:roberto@192.168.226.13">roberto@192.168.226.13</a> to be able to call IVR had to rewrite host &amp; port 
<a href="http://192.168.226.45"></b></font><font color="red"><b>MailScanner has detected a possible fraud attempt from "192.168.226.45" claiming to be</b></font> <font color="red"><b>MailScanner warning: numerical links are often malicious: 192.168.226.45</a> so that the call would reach Asterisk who would then call to the IVR.
<br />&gt; That rewriting turned <a href="mailto:roberto@192.168.226.13">roberto@192.168.226.13</a> into <a href="mailto:roberto@192.168.226.45">
roberto@192.168.226.45</a>. That is, I can say, that it became a &quot;new user&quot;.
<br />&gt; While it's on the IVR there's no problem, but when call is diverted it has to give its credentials...
<br />&gt; Credentials that don't exist in RADIUS cause it only accepts usernames that end in @
<a href="http://192.168.226.13"></b></font><font color="red"><b>MailScanner has detected a possible fraud attempt from "192.168.226.13" claiming to be</b></font> <font color="red"><b>MailScanner warning: numerical links are often malicious: 192.168.226.13</a> (IP of SER)
<br />&gt; 
<br />&gt; Here is the following code, both of extensions file in Asterisk and configure file of SER
<br />&gt; I hope somebody knows how to solve it or at least find a way how to.

<br />&gt; 
<br />&gt; extensions.conf - Asterisk
<br />&gt; 
<br style="font-style: italic;" /><span style="font-style: italic;"><span style="font-style: italic;">
[</span>sip]</span>
<br style="font-style: italic;" /><span style="font-style: italic;"></span><span style="font-style: italic;">exten =&gt; 74001,1,Answer
</span>
<br style="font-style: italic;" />
<span style="font-style: italic;">exten =&gt; 74001,2,SetMusicOnHold(default)
</span>
<br style="font-style: italic;" /><span style="font-style: italic;">exten =&gt; 74001,3,Set(TIMEOUT(digit)=5)</span>
<br style="font-style: italic;" />
<span style="font-style: italic;">exten =&gt; 74001,4,Set(TIMEOUT(response)=10)
</span>
<br style="font-style: italic;" /><span style="font-style: italic;">exten =&gt; 74001,5,Background(menu)</span>
<br style="font-style: italic;" />
<span style="font-style: italic;"></span>
<br />&gt; <span style="font-style: italic;">exten =&gt; 1,1,Dial(SIP/roberto@192.168.226.13:5060,,r)
</span>
<br style="font-style: italic;" /><span style="font-style: italic;">...</span><span style="font-style: italic;"></span>
<br style="font-style: italic;" /><span style="font-style: italic;">exten =&gt; 7,1,Goto(sip,74001,1)
</span>
<br style="font-style: italic;" /><span style="font-style: italic;">exten =&gt; 8,1,Hangup
</span>
<br style="font-style: italic;" />
<br />&gt; 
<br />&gt; ser.cfg - SER
<br />&gt; 
<br />&gt; ...
<br />&gt; if ((uri=~&quot;^sip:7[0-9]{4}@.*&quot;)) {
<br />&gt;         route(5);
<br />&gt;         break;
<br />&gt; };
<br style="font-style: italic;" /><span style="font-style: italic;">
<span style="font-style: italic;">...
<br />&gt; </span></span>route[5] {     # Redirecting to Asterisk
<br />&gt; 
    # MsgLog
<br />&gt;     xlog(&quot;L_ALERT&quot;,&quot;(WARNING) Sending to Asterisk request of %fu to %tu\n&quot;);
<br />&gt;     rewritehostport(&quot;<a href="http://192.168.226.45:5060"></b></font><font color="red"><b>MailScanner has detected a possible fraud attempt from "192.168.226.45:5060" claiming to be</b></font> <font color="red"><b>MailScanner warning: numerical links are often malicious: 192.168.226.45:5060</a>&quot;);
<br />&gt;     route(1);

<br />&gt; }
<br />&gt; <span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;">
<br />&gt; 
<br />&gt; </span></span></span>Thanks for your help,
<br />&gt; Roberto Lopes
<br />
<br />
<br />
</font>
</BODY>
</HTML>