Asterisk with 2 ips (isp)

I have a server with 2 ISP connected to it. One is static public ip “T1” and the other static “Cablevision” through NAT.

Both ips accessible from public, the server has a default ip from NAT (default gateway).

The problem is that I cannot connect by SIP though T1 to the server, only though the Capblevision IP. If i change the default to T1 than I can connect to asterisk though T1.

any advise?

thanks

Read up sip.conf

try
bindaddr = 0.0.0.0

(or maybe you can post the [genera] portion of your sip config)

regards!

i do have bindaddr = 0.0.0.0
and it is open
[root@office ~]# netstat -na |grep 5060
udp 0 0 0.0.0.0:5060 0.0.0.0:*

here is my [general]

[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

That route is called “default” for a reason. The server sees an IP address that does not have a static route, so it sends packets through the default route. Then, the NAT firewall probably doesn’t like these packets.

Sounds like a reasonable workaround.

i can’t use T1 for that, it is too expensive

this can’t be right. are you telling me that this cannot be done?

It may be doable. Need to tweak the cable NAT firewall somewhat. I don’t quite understand why using T1 would be more expensive - you have already paid for the bandwidth. And why would you allow access to the T1 interface if it is expensive?

because T1 is already in use by web server and mail server which needs to have a very good speed, so VOIP cannot be on it becuase it will slow down our web sites.

If you know from where users will connect to the T1 interface, simple route additions should solve the problem. (From your description, this should be fairly predictable.)

you mean route on linux or on asterisk? please give more details.

thanks

Sorry - I mean IP route in Linux. For example, if you know a group of callers would be calling from 206.86.155.0 network to eth1 where the T1 connects to, you can

so Linux will route all traffic to those addresses through eth1 instead of the default route. (Of course you can also specify gw instead of dev.)

I need to connect some people to my pbx from different location and IPs will always change.

Please tell me if this is possible.
Make default T1 and connect to my voip provider through “cable”. Now, how can I register with voip provider? the regular registration

;register => 2345:password@sip_proxy/1234

will connect voip provider to t1

any ideas?

thanks

[quote=“bellorusha”]I need to connect some people to my pbx from different location and IPs will always change.
[/quote]

The simplest solution to me is to make all users use the IP address of your cable ISP.

In this case, simply add a static route to your VoIP provider’s proxy/registrar. If they have different IP’s for registrar and proxy (maybe other resources), add a static route to their network. For example, if they are with 206.86.155.0,

route add -net 206.86.155.0 dev eth1

It’s really not, becuase cable ISP is behind NAT and users phones outsite are behind the NAT, so it connects but I have problems with sound, i guess because NAT on both side, I’ll try to do the route to VOIP provider…

thank you so much