[OpenSIPS-Users] Proxy question

Flavio Goncalves flavio at voffice.com.br
Wed Oct 21 02:56:44 CEST 2015


Travis,

It is hard to understand why you have in the Asterisk contact the ip
address of the firewall, unless you have NAT on the firewall translating
the address or a fix_contact before the register request. Please send me
the cfg and a draft with the topology and IP addresses and I can check to
understand what is going on. Please indicate in the draft the ip address of
all interfaces. I still think Path is the solution for what you want or use
an outbound proxy setting on Asterisk to tell it to send back to your
proxy.

The basic idea when you use a proxy to balance Sip servers is: When the
subscriber receives the call, the proxy sends the request-uri as the final
destination and a Route-header with the proxy address. When you register
using Path it includes the address of the proxy in the registration.
Asterisk now supports Path, but if you are using an older version maybe
setting the outbound proxy in the peers can possibly work. I actually use
exactly in this way in my Office, I have an OpenSIPS server working as an
SBC and a SIP server inside my private network.

B.R.


Flavio E. Goncalves



2015-10-19 13:41 GMT-02:00 Travis Manson-Drake <travism at simplybits.com>:

> Hey Flavio!
>
>
>
> Good to hear from you.
>
>
>
> I checked to make sure my ALG was disabled, it is. I recall you telling me
> you had trouble with Mikrotiks before when I was in your bootcamp a few
> months ago.
>
>
>
> However to answer your question.
>
>
>
> All I’m really trying to do is have my Opensips Proxy hand all traffic off
> to the appropriate Asterisk PBX based on the auth_userID of a UAC.
>
>
>
> The proxy will simply be acting as a stateful relay.
>
>
>
> I have it working for the most part, but what seems to be stumping me is
> the Ip addr address sees the UAC behind is the FW in front of theProxy and
> not the ip address of the FW the UAC is behind
>
>
>
> For example:
>
>
>
> When I do a “sip show peer 7001context” in asterisk
>
>
>
> Ip->addr will show the ip of the FW in front of my Opensips proxy and not
> the ip address of the FW in front of my UAC
>
>
>
> The reason this is a problem is because we track the location of
> registered UAC’s based on the value of that ip address.
>
>
>
> I was thinking of messing around with $si, but I don’t know where I would
> use it as I have no registration logic in my proxy.
>
>
>
> If you like I can send you a copy of my opensips.cfg file?
>
>
>
> Any help and or advice is incredibly appreciated!
>
>
>
> Thank you very much for your time!
>
>
>
> -Travis Manson
>
>
>
>
>
>
>
> *From:* users-bounces at lists.opensips.org [mailto:
> users-bounces at lists.opensips.org] *On Behalf Of *Flavio Goncalves
> *Sent:* Monday, October 19, 2015 5:30 AM
> *To:* OpenSIPS users mailling list <users at lists.opensips.org>
> *Subject:* Re: [OpenSIPS-Users] Proxy question
>
>
>
> Hi Travis,
>
>
>
> If I understood correctly, you want to balance registrations between
> Asterisk PBXs. In the latest versions, Asterisk has support for Path
> (RFC3327). By using this on your Asterisk and also on OpenSIPS you can send
> the address from where the request was received. Also check if your
> firewall does not have ALG (Application Layer Gateway) enabled, it can be
> changing your SIP headers, that's why you receive the firewall address
> instead of the source address.
>
>
> Flavio E. Goncalves
>
>
>
>
>
> 2015-10-15 13:41 GMT-03:00 Travis Manson-Drake <travism at simplybits.com>:
>
> Hello All,
>
>
>
> Hope you’re doing well!
>
>
>
> I seem to be drawing a blank on this one, and I’m hoping someone out there
> may have an idea.
>
>
>
> So here it is:
>
>
>
> Essentially what’s happening:
>
>
>
> I have a phone in a remote location that’s outside of my network
>
>
>
> The phone is pointed to my opensips proxy
>
>
>
> Once the request comes in the proxy does some sql queries to find out what
> PBX the phone should register to
>
>
>
> Once the phone has registered with the correct Asterisk PBX everything
> works great.
>
>
>
> However, I seem to be having an issure in which after its registered with
> Asterisk the Ip address asterisk has on record when I do a “sip show peer
> 7001XXXXX” is the public IP of the firewall the Sip proxy is behind. And
> not the ip address of the FW the phone is behind.
>
>
>
> This is a bit of a problem as we use the Public IP to determine Location
> of Phones etc etc.
>
>
>
> I was thinking of doing something with $si and $avp variables, but nowhere
> in my logic do I handle registration request’s I simply Middle man the
> traffic and relay the request’s to the right PBX.
>
>
>
> Does anyone have any suggestions on how I might force the source IP of
> where the UAC is registering into the packet asterisk receives as a Reg
> from address?
>
>
>
> Any input is greatly appreciated!
>
>
>
> As always thank you all for your time!
>
>
>
>
>
>
>
> *Travis Manson-Drake*
>
> *Voice Systems Analyst L1*
>
> *Simply Bits, LLC*
>
> *Now You’re Thinkin’ Smart!*
>
> 5225 N. Sabino Canyon Road
> Tucson, AZ 85750
>
> *Phone:* 520-545-0311
>
> *Fax:* 520-545-7252
>
> *Support Hotline*: 5205450333
>
> www.simplybits.com
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151020/5807082e/attachment-0001.htm>


More information about the Users mailing list