[asterisk-users] SIP Trunk over Proxy (matching ip of outbound proxy in incomming calls)

Benoit Panizzon benoit.panizzon at imp.ch
Mon May 22 10:11:59 CDT 2017


Hello List

I work at an SIP Provider and we have added and SBC in front of our
Voice Switch to protect it.

This requires all our SIP Trunk customers to register via a 'proxy'.

I struggle with Asterisk to work over a proxy.

This is what I have done so far.

register => username at sip.example.com:password at sbc.example.com

This works fine, asterisk is sending registrations via the SBC to the
voice switch defined by URI.

[username]
type=peer
secret=password
host=sip.example.com
outboundproxy=sbc.example.com
context=from-ISP-X

From the Dialplan that string is dialed:

Dial(SIP/username/${EXTEN})

This works fine, asterisk sends the call to the outboundproxy defined
in the sip.conf section of [username].

Before adding outboundproxy setting, incomming calls were
matched because they originated from the host and passed to the correct
context.

I have set allowguest=no to challenge all those sip attackers in
[default] who occasionaly managed to call internal extensions defined
there.

Now incomming calls do not originate from the ip of sip.example.com
anymore, but from the ip of sbc.example.com and are not set to the
context [from-ISP-X] but probably to [default] and challenged.

Of course, I could allow guests, but that would bring back the problem
of having unwanted calls from sip scanners.

So how do I tell the asterisk to also match calls from the ip of the
outbound proxy?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G    -    Leiter Commerce Kunden
______________________________________________________

Zurlindenstrasse 29             Tel  +41 61 826 93 00
CH-4133 Pratteln                Fax  +41 61 826 93 01
Schweiz                         Web  http://www.imp.ch
______________________________________________________



More information about the asterisk-users mailing list