Gamma Trunks

Does anybody use Gamma UK SIP trunks?

Have been trying for the last two days to configure a Gamma SIP trunk and I’m having no luck.

They do not use user registration, but authenticate by IP address.

I’m only really interested in incoming calls. At the moment my sip.conf for incoming is:
host=gamma ip address

I’ve set my externip, localnet and nat(asterisk is behind firewall).

I’m forwarding everything from gamma (udp & tcp - all ports - 0 - 65535) but no joy.

I can see the gamma traffic hitting the firewall which is forwarding to asterisk, but in asterisk I see nothing. Not even failure/s. It’s as if the traffic is not getting to asterisk. I know traffic is forwarded from the firewall because I’ve setup a SIP phone at home that connects to asterisk no problem.

When I’ve tried to dial out via gamma I see no traffic from asterisk to gamma via the firewall. It’s as if asterisk doesn’t know how to get to the internet.

Any help/pointers would be very much appreciated.

If your firewall is blocking the incoming SIP traffic, you need to sort this out on the firewall itself. Did you open UDP ports 5060 and 10000 - 20000 for the LAN IP that Asterisk has on your LAN network?

I don’t know your config, but if Asterisk gets no response from remote server, it thinks of the peer as unaccessible and therefore it does not send any SIP messages to it. That is the reason for Asterisk not sending any traffic to Gamma. You can do a quick workaround for that - set qualify=no for the peer in sip.conf.

On the firewall I’ve allowed everything from the gamma sip gateway and proxy and home sip phone. TCP, UDP the lot.

All the firewall does is block access to everybody except the gamma ip addresses and the sip phone at my house (have static ip address at home).

Outbound asterisk can go anywhere i.e. no rules blocking anything.

My home sip phone registers and can make calls to the other internal sip extensions.

externip=my external ip address

fromdomain=my external ip
host=gamma ip

host=gamma ip

Using Asterisk 11 on CentOS 6.3.

After another day wasted trying to get this sorted, a bit more info required.

Got another sip trunk; this one uri authenticated.

Lo and behold it says this trunk is unreachable. Looking at the firewall logs asterisk is not even trying to go through the firewall. It is as if asterisk does not know how to get to the internet. Via the linux command line I can ping the sip trunk provider which replies and I can see it in the firewall log.

My question now is:
Is asterisk hard coded to only work via eth0?

I have only one nic (eth1) which I cannot change (it’s a vm and the internet nic is eth1).

Asterisk kernel services to route to the appropriate interface.

What happens if you run with a high debug level when Asterisk is trying to send OPTIONS for the qualify check, or if you turn off quailify, when it is trying to send the INVITE?

Even on a VM, the kernel would name the first interface it found eth0, regardless of what the host called it.

I tried the debug but it did not shed any light unfortunately. A tcpdump showed asterisk was creating the packets but for whatever reason they weren’t leaving the server.

So I just built a new physical server with asterisk on it and it works fine :smiley:

The config for Gamma trunks is:

fromuser= the DDI you get allocated from Gamma
fromdomain=your external IP address
host= Gamma’s gateway IP address

In extensions the acme context
exten => full DDI from Gamma including leading zero(for UK anyway),1,whatever you want to do with incoming calls

Thanks for all the suggestions :smiley:

Finally figured it out. It was my gateway firewall (Juniper SSG140) that was at fault. From what I can gather it has a SIP “bug” in that it will not allow SIP traffic to traverse it no matter what.

That is why a physical server not going through the Juniper in my case worked.