Chan_sip.c: Got SIP response 503 "Service Unavailable" back from

Hi all,

I’m having problems with my outbound route.

I get a “chan_sip.c: Got SIP response 503 “Service Unavailable” back from xxx.xxx.xxx.xxx error”

I’m using a Grandstream HL503 with a POTS connected to the FXO port. The other port FSX I have a modem connected. I’m dialling from the modem (FSX port) to my mobile phone number to see if the outbound calling is working. I get the error listed above.

I have a SIP trunk setup to my HL503 FXO port and its is registered with FreePBX. Have a outbound route configured to use the sip trunk.

Any ideas why it’s failing the outbound call?

[2020-12-13 00:18:07] VERBOSE[81925][C-00000067] pbx.c: Executing [s@func-apply-sipheaders:14] Return(“SIP/xxxxxxx4-00000010”, “”) in new stack

[2020-12-13 00:18:07] VERBOSE[81925][C-00000067] app_stack.c: Spawn extension (from-trunk, my mobile, 1) exited non-zero on ‘SIP/xxxxxxxx4-00000010’

[2020-12-13 00:18:07] VERBOSE[81925][C-00000067] app_stack.c: SIP/xxxxxxxx-00000010 Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=

[2020-12-13 00:18:07] VERBOSE[81925][C-00000067] app_dial.c: Called SIP/xxxxxxxx/my mobile

[2020-12-13 00:18:17] VERBOSE[10604][C-00000067] chan_sip.c: Got SIP response 503 “Service Unavailable” back from 192.168.1.223:5062

[2020-12-13 00:18:17] VERBOSE[81925][C-00000067] app_dial.c: SIP/xxxxxxx-00000010 is circuit-busy

[2020-12-13 00:18:17] VERBOSE[81925][C-00000067] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)

[2020-12-13 00:18:17] VERBOSE[81925][C-00000067] pbx.c: Executing [s@macro-dialout-trunk:35] NoOp(“PJSIP/100-000000a4”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34”) in ne

Thanks,

Confirm that incoming calls work ok, Stage Method is set to 1, and Dial Plan permits and does not alter the called number (the default should be fine).

The 10 second delay before the 503 leads me to suspect that Wait for Dial Tone is timing out.
If you have this set to Yes, report whether setting it to No changes the behavior.

Also, report what the Status page shows for Hook when idle and when attempting to call.

What country are you in? What is the 503 connected to (copper pair from central office, cable MTA, fiber ONT, etc.)?

To confirm that nothing is wrong at the PBX end, at the Asterisk command prompt type
sip set debug on
make a failing test call, paste the Asterisk log (which will now include a SIP trace) at pastebin.freepbx.org and post the link here.

Also, try connecting a line-powered corded phone in place of the HT503, using the same cord. Confirm that you can call out ok.

If you still have trouble, post screenshots of the FXO page.

Thanks for the reply.
I can confirm connecting a phone to the actual POTS line dials out fine to my mobile number I have been testing.

I’m located in Spain. The status on the FXO port changes to in use. On my Grandstream HL503 the FX0 port has stage method set to 1.

The dial plan has a prefix 0 (for outside line) set. I have XXXXXXXXX in the match pattern.

Here is the sip log dealing out:

https://pastebin.freepbx.org/view/1b3e0aa5
Cheers,

The INVITE sent from the PBX side looks properly formatted, so we need to see why the HT responded with a 503.

Although the log in your older post had timestamps, the new log doesn’t, so I can’t see if any timing has changed. I’m guessing that you pasted from the console, rather than the logfile /var/log/asterisk/full

In the HT, how was Wait for Dial Tone set for your old log? Did you change it for the new log? If so, did that change the 10 second delay?

Please confirm that incoming calls work ok (so we know that there isn’t a problem with loop voltage or current).

Do you have a way to listen to the analog line while the HT attempts to call out? If not, we can try the syslog feature of the HT to see what it is doing.

Sorry here is a new try with the full log from /var/log/asterisk/full timestamp: 08:59

https://pastebin.freepbx.org/view/9ebbf5d4

Outgoing calls directly from the POTS line work fine. (meaning connecting a normal telephone to the pots and manually dialling my mobile phone number).

HT wait for tone is setup to 10 sec. Here is the config for the FSO port on the HT: (Wont let me upload anything or link it as I’m a new user) :frowning:

Yes I will try later “listening in” on the line via another phone to see what its doing…

Sorry if I didn’t make myself clear.

When you call the POTS number from your mobile, does the call reach the PBX and can it answer successfully and provide audio in both directions? If so, that eliminates many possible issues (loop voltage, loop current, A/D and D/A conversion, etc.).

When Wait for Dial Tone is set to No, what do you hear on an outgoing call? Do you get an error other than 503?

You have been posting links and they come through fine. Or, you can upload a .tgz file. I believe that you can rename e.g. foo.txt to foo.txt.tgz and the forum will let you upload it, even though it isn’t actually a tgz file.

Solved :slight_smile: Its the wait for dial tone option. It needs to be set to NO. How very strange…

Thanks for helping out.

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