<div dir="ltr">Thanks a lot for your replay. I already change the option "insecure=INVITE" as you suggested but I am still having the same problem. Find attached the peer configuration maybe I am missing something else. </div><span>
</span><p dir="ltr">About opensips authenticating calls from SIPphones how do I disabled that behavior? because my opensips sends an 407 Proxy Authentication to the Sip phone before sending the INVITE to asterisk server.</p><span>
</span><p dir="ltr">Best regards<br>
David <br>
</p><span>
</span><br><div class="gmail_quote"><div dir="ltr">On Wed, May 31, 2017, 10:50 John Quick <<a href="mailto:john.quick@smartvox.co.uk">john.quick@smartvox.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: John Quick [mailto:<a href="mailto:john.quick@smartvox.co.uk" target="_blank">john.quick@smartvox.co.uk</a>]<br>
Sent: 31 May 2017 09:49<br>
To: '<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>' <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
Subject: Re: [OpenSIPS-Users] 401 Unauthorized after Authentication Digest<br>
<br>
Hi David,<br>
<br>
In the scenario you describe, I would expect to see one of the following<br>
solutions (but not both at the same time):<br>
1. OpenSIPS acts as the registrar for the SIP phones. Calls (INVITE<br>
requests) from SIP phones are routed on via a SIP trunk 2. OpenSIPS acts as<br>
a transparent proxy in front of another SIP server such as Asterisk<br>
<br>
Scenario 1 is the most common. OpenSIPS authenticates calls based on a list<br>
of credentials that it holds, normally in the subscriber table. In this<br>
case, you really want to avoid the situation where each outbound call<br>
triggers an additional authentication request from the SIP trunk. Can you<br>
re-configure your Asterisk endpoint so it trusts INVITE requests coming from<br>
your OpenSIPS server? E.g. add the line insecure=INVITE to the sip peer<br>
definition.<br>
<br>
In scenario 2, which I would not consider to be the preferred solution,<br>
OpenSIPS just passes the SIP messages between the phone and the Asterisk<br>
server - in both directions. OpenSIPS does not authenticate calls because<br>
that job is done by the Asterisk server and all the credentials are held by<br>
Asterisk, not by OpenSIPS. In this case the 401 request would just be passed<br>
upstream to the phone.<br>
<br>
Try to avoid the situation where OpenSIPS is authenticating the INVITE from<br>
the SIP phones using its own list of credentials, but then it also has to<br>
authenticate each call sent over the SIP trunk. In theory you could use the<br>
UAC_AUTH module of OpenSIPS to do this, but in practice I have never been<br>
able to make this work because it breaks the CSeq numbering sequence of the<br>
SIP request messages.<br>
<br>
John Quick<br>
Smartvox Limited<br>
<br>
</blockquote></div>