Hello,<div>Asterisk seems to try to authenticate incoming INVITE based on the [section] in sip.conf and not the username specified.</div><div><br><div>I just removed the &quot;insecure&quot; option from my sip.conf requesting every connection to be authenticated. I added the match_auth_username=yes in the [general] section for extra security. To make it work, I have to use the same [section] identifier as username. This is really bad because if multiple provider are giving me the same username, it doesn&#39;t work.</div>
<div><br></div><div>If I put the following data in sip.conf, it doesn&#39;t work. Asterisk return the following error:</div><div><br></div><div>[2011-07-29 04:55:30] WARNING[9971]: chan_sip.c:13205 check_auth: username mismatch, have &lt;GoodProvider&gt;, digest has &lt;myusername&gt;</div>
<div><br></div><div><div>[GoodProvider]</div><div>username=myusername</div><div>auth=myusername</div><div>defaultuser=myusername</div><div>secret=verydifficultpass</div><div>type=friend</div><div>host=<a href="http://pbx.goodprovider.com">pbx.goodprovider.com</a></div>
<div>canreinvite=No</div><div>dtmfmode=rfc2833</div><div>context=from-outside</div><div>accountcode=GoodProvider</div><div>disallow=all</div><div>allow=ulaw</div></div><div><br></div><div>If I put the following data in sip.conf, it does work:</div>
<div><br></div><div><div><div>[myusername]</div><div>username=myusername</div><div>auth=myusername</div><div>defaultuser=myusername</div><div>secret=verydifficultpass</div><div>type=friend</div><div>host=<a href="http://pbx.goodprovider.com">pbx.goodprovider.com</a></div>
<div>canreinvite=No</div><div>dtmfmode=rfc2833</div><div>context=from-outside</div><div>accountcode=GoodProvider</div><div>disallow=all</div><div>allow=ulaw</div></div></div><div><br></div><div>I check the INVITE from the &quot;GoodProvider&quot; and it is sending &quot;myusername&quot;</div>
<div><br></div><div>Am I doing something wrong or is really asterisk checking the wrong section?</div><div><br></div><div>Leandro</div><div><br></div><div><br></div></div>