Outbound calls failing [Solved]

I am setting up a new AsterixNOW setup on Current Asterisk Version: 13.2.0 using the updated FreePBX.

I’ve managed to get two trunks registered (or so it seems)

voip*CLI> sip show registry
Host                                           dnsmgr       Username            Refresh State                Reg.Time
sip00.mynetfone.com.au:5060       N      0910XXXX@sip       105 Registered           Mon, 12 Sep 2016 15:59:27
sip.internode.on.net:5060               N      039036YYYY         345 Registered           Mon, 12 Sep 2016 15:56:27
2 SIP registrations.

and I can get inbound calls on the internode line OK.

However when I try and make outbound calls I’m getting problems (I was getting the same problems with a Xivo setup as well).

When I disable the internode trunk and try and call my mobile I’m getting

2016-09-12 15:49:43] VERBOSE[4937][C-00000014] pbx.c: Executing [s@macro-dialout-trunk:23] Dial("PJSIP/2010-00000011", "SIP/0910XXXX/041217ZZZZ,300,") in new stack
[2016-09-12 15:49:43] VERBOSE[4937][C-00000014] netsock2.c: Using SIP RTP CoS mark 5
[2016-09-12 15:49:43] VERBOSE[4937][C-00000014] app_dial.c: Called SIP/0910XXXX/041217ZZZZ
[2016-09-12 15:49:43] VERBOSE[8728][C-00000014] chan_sip.c: Got SIP response 502 "Bad Gateway" back from 125.213.160.81:5060
[2016-09-12 15:49:43] VERBOSE[4937][C-00000014] app_dial.c: SIP/0910XXXX-0000000c is circuit-busy
[2016-09-12 15:49:43] VERBOSE[4937][C-00000014] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)

When I disable the NetFone trunk and enable the Internode one I get

[2016-09-12 15:45:33] VERBOSE[4133][C-00000012] pbx.c: Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/2010-0000000f", "0?customtrunk") in new stack
[2016-09-12 15:45:33] VERBOSE[4133][C-00000012] pbx.c: Executing [s@macro-dialout-trunk:23] Dial("PJSIP/2010-0000000f", "SIP/039036YYYY/041217ZZZZ,300,Tt") in new stack
[2016-09-12 15:45:33] VERBOSE[4133][C-00000012] netsock2.c: Using SIP RTP CoS mark 5
[2016-09-12 15:45:33] VERBOSE[4133][C-00000012] app_dial.c: Called SIP/039036YYYY/041217ZZZZ
[2016-09-12 15:45:33] VERBOSE[8728][C-00000012] chan_sip.c: Got SIP response 604 "Does not exist anywhere" back from 203.2.134.1:5060
[2016-09-12 15:45:33] VERBOSE[4133][C-00000012] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)

I’m at a loss as to where to go from here. I’ve been trying to get these trunks working properly for months now on and off and am not getting anywhere.

The Outgoing Sip settings are

Trunk name 039036YYYY
username=039036YYYY
type=peer
secret=password
host=sip.internode.on.net
registration string 039036YYYY:password@sip.internode.on.net/039036YYYY

and

Trunk Name 0910XXXX
username=0910XXXX
type=peer
secret=password
host=sip00.mynetfone.com.au

registration string 0910XXXX@sip00.mynetfone.com.au:password:0910XXXX@sip00.mynetfone.com.au/0910XXXX

for the other.

Both trunks have the same CID <039017AAAA> because I want the CID to be the same regardless of the outbound trunk used.

Can someone please help? I’m totally stuck here. This was working on a much much older freePBX setup but I lost the server and didn’t have the configurations saved.

Ta

Peter.

You will need to ask the ITSP why they re rejecting the call as they are saying that they got an error on their outgoing side, and you need to know what error they got.

You should probably look at sip debug output first, as sometimes they will provide an informal header giving more details.

Note that registration is only intended to apply to incoming calls. The authentication data in the sip.conf entry itself is used for outgoing calls.

As @david551 suggested, you should contact your provider and ask for exact reason.
Did you use any sort of prefixes when dialing over these trunks on your old FreePBX setup?
I had seen in past some of the providers rejecting calls with “Does not exist” type of responses when dialing without their specified prefixes.
–Satish Barot

Thanks for the help folks. Turns out all I had to do was copy the settings as shown on line into the sip settings panes and now all is working on both trunks in both directions.

I think in both cases it was adding insecure=very that solved the problems and I didn’t realize I could add other parameters in there (guess its obvious when you know how).

The only thing I don’t have working is the user console (can’t log in) but I’m not sure I care that much.

Peter.