<p dir="ltr">Not sure maybe there's a better solution but I thought about using another peer with type=user for incoming connections.</p>
<br><div class="gmail_quote"><div dir="ltr">On Mon, May 22, 2017, 6:13 PM Benoit Panizzon <<a href="mailto:benoit.panizzon@imp.ch">benoit.panizzon@imp.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello List<br>
<br>
I work at an SIP Provider and we have added and SBC in front of our<br>
Voice Switch to protect it.<br>
<br>
This requires all our SIP Trunk customers to register via a 'proxy'.<br>
<br>
I struggle with Asterisk to work over a proxy.<br>
<br>
This is what I have done so far.<br>
<br>
register => username@sip.example.com:p<a href="mailto:assword@sbc.example.com" target="_blank">assword@sbc.example.com</a><br>
<br>
This works fine, asterisk is sending registrations via the SBC to the<br>
voice switch defined by URI.<br>
<br>
[username]<br>
type=peer<br>
secret=password<br>
host=<a href="http://sip.example.com" rel="noreferrer" target="_blank">sip.example.com</a><br>
outboundproxy=<a href="http://sbc.example.com" rel="noreferrer" target="_blank">sbc.example.com</a><br>
context=from-ISP-X<br>
<br>
>From the Dialplan that string is dialed:<br>
<br>
Dial(SIP/username/${EXTEN})<br>
<br>
This works fine, asterisk sends the call to the outboundproxy defined<br>
in the sip.conf section of [username].<br>
<br>
Before adding outboundproxy setting, incomming calls were<br>
matched because they originated from the host and passed to the correct<br>
context.<br>
<br>
I have set allowguest=no to challenge all those sip attackers in<br>
[default] who occasionaly managed to call internal extensions defined<br>
there.<br>
<br>
Now incomming calls do not originate from the ip of <a href="http://sip.example.com" rel="noreferrer" target="_blank">sip.example.com</a><br>
anymore, but from the ip of <a href="http://sbc.example.com" rel="noreferrer" target="_blank">sbc.example.com</a> and are not set to the<br>
context [from-ISP-X] but probably to [default] and challenged.<br>
<br>
Of course, I could allow guests, but that would bring back the problem<br>
of having unwanted calls from sip scanners.<br>
<br>
So how do I tell the asterisk to also match calls from the ip of the<br>
outbound proxy?<br>
<br>
-Benoît Panizzon-<br>
--<br>
I m p r o W a r e A G - Leiter Commerce Kunden<br>
______________________________________________________<br>
<br>
Zurlindenstrasse 29 Tel +41 61 826 93 00<br>
CH-4133 Pratteln Fax +41 61 826 93 01<br>
Schweiz Web <a href="http://www.imp.ch" rel="noreferrer" target="_blank">http://www.imp.ch</a><br>
______________________________________________________<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div>