Register with two Sip Providers over 2 ISP

Hello everyone,

I have a problem to find a solution to register a FreePBX on two Telekom Sip accounts. The problem here is that Telekom binds registration on the DSL line. I have two of them, each with Sip telephony. In Asterisk I have two NIC, each with it’s own subnet, connected to each DSL line over a separate router. I have to configure the trunk registration in that way, that trunk 1 registers over NIC 1 (192.168.1.x), connected to DSL line 1 and trunk 2 over NIC 2 (192.168.2.x) wich is connected to DSL line 2. Adding routes to WAN IP adresses in Linux won’t solve the problem, because the IP adresses of the Telekom SIP Registrars and RTP gateways are changing and sometimes they are even the same on both DSL lines. Using a separate SIP relay wich first registers on the provider and asterisk itsself registers here would be only my last solution. I know that other VoIP PBX’es like these from Auerswald can achieve this also with two LAN modules so there should also be a solution for Asterisk. I’ll be gratefull for every suggestion.

Just guessing here (I don’t have a system that I could test this on), but try setting up one trunk with pjsip and the other with chan_sip. Configure each driver to bind to just one interface. With luck, outbound SIP packets will use the configured interface. I don’t know whether RTP would also follow this path, though it may not matter if the Telekom media gateway doesn’t restrict based on the source IP address.

There are several subtle issues about how Telekom handles NAT traversal, symmetric RTP, etc., so you probably need to start by doing some testing.

Give us the current output of route -n so we can see what routes you have in place right now. You’ll need to setup routes to make the system source the right subnet out the right interface.

Proper routing is required but not sufficient. The OP may need to send an INVITE for trunk A to 1.2.3.4:5060 via interface A and one for trunk B to the same address and port via interface B.

Right. I actually should have asked for ip route show and what I’m looking at is source based routing not destination based so it would allow exactly what you are referring to.

I would also just recommend this be done via PJSIP. You can go into Settings -> Asterisk SIP Settings -> Chan_PJSIP and then set the “Advanced Settings” to Yes, save then you will see options to bind each IP as its own transport. That way you can have 192.168.1.2:5060 and 192.168.2.2:5060 and not worry about having two sets of settings, two drivers or multiple ports to worry about.

i’d honestly get an SBC like acme packet or something small. it’s pretty much what they are for, and you could have load balancing, normalization, security, etc

Thanks for the quick reponse everyone, with pjsip this I’ll try, I’m not sure if it will work with Telekom. This provider has some strange settings, that others don’t have. With rouitng the problem is that I can’t differ the destinations, the DNS gives me the same IP adress for sip’.‘telekom’.'de on both DSL Lines (have to set the apostrophes, because it’s treated as a link which I can’t post as a new user). You mean source routing yes, this would be also my solution but where in FPBX or plain asterisk I can set the source IP or interface using for a registration? I don’t even know if this is possible.

SBC would mean, thad I can’t get it working only with the Asterisk-Server. But This is what I want to achieve. I also could use an old Fritzbox as Media Gateway. This will solve the problem but on an unelegant way :wink:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.