<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp; I have asterisk register two users (client-1,
client-2) with a SIP proxy. I have the same two SIP client registered with asterisk.
Now my dial plan setup is such that any call from client-1/client-2 is
forwarded to the SIP proxy and the SIP proxy then takes the routing decision. Calls
coming from SIP proxy will dial out the respective user. Asterisk is required
to stay in the signaling as well as the media path. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Client-1--------</span></font><font size=2 face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings'>&agrave;</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> Asterisk-----------</span></font><font
size=2 face=Wingdings><span style='font-size:10.0pt;font-family:Wingdings'>&agrave;</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> SIP Proxy<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Client-2</span></font><font size=2 face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings'>&szlig;</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>--------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size=2 face=Wingdings><span style='font-size:10.0pt;
font-family:Wingdings'>&szlig;</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>----------<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>So for call from client-1 to client-2, asterisk forwards the
INVITE to the SIP proxy but when the SIP proxy gives the INVITE back to
asterisk (as asterisk registered client-2 with the SIP proxy), asterisk is
challenging the incoming INVITE. It seems asterisk is seeing the INVITE from
SIP proxy as INVITE coming from client (this is I guess as per the lookup that
asterisk performs). However is there a way to have it first match the INVITE
host IP rather than FROM user first? Or rather is there a way to have this
setup working?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Mayur<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>