Problem with outbound call with SIP-trunk

I try to make the server autodail a number and play a message. But I get the following message:
Call failed to go through, reason (5) Remote end is Busy

But im 100% sure that its not busy. What can be wrong. This is the code that I add to a file in /var/spool/asterix/outbound

Channel: SIP/Phonzo2/0735453334
CallerID: “Linus” <0382788032>
Application: Playback
Data: hello-world

And this is the debug message that I get:

[2016-06-09 16:14:13] WARNING[1937]: pbx_spool.c:309 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/test: Operation not permitted
Audio is at 13396
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 80.232.37.178:5060:
INVITE sip:0735453334@sip.phonzo.com SIP/2.0
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK19c331ae;rport
Max-Forwards: 70
From: “Linus” < sip:46382799032@80.232.37.178>;tag=as494f4a16
To: < sip:0735453334@sip.phonzo.com>
Contact: < sip:46382799032@192.168.2.52:5060>
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 102 INVITE
User-Agent: it-slav PBX
Date: Thu, 09 Jun 2016 14:14:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 249

v=0
o=root 201537809 201537809 IN IP4 192.168.2.52
s=it-slav PBX
c=IN IP4 192.168.2.52
t=0 0
m=audio 13396 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


<— SIP read from UDP:80.232.37.178:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK19c331ae;rport=23536;received=88.206.243.45
To: < sip:0735453334@sip.phonzo.com>
From: “Linus”< sip:46382799032@80.232.37.178>;tag=as494f4a16
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 102 INVITE
Content-Length: 0

<------------->
— (7 headers 0 lines) —

<— SIP read from UDP:80.232.37.178:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.52:5060;received=88.206.243.45;branch=z9hG4bK19c331ae;rport=23536
Record-Route: < sip:80.232.37.178;lr>
To: < sip:0735453334@sip.phonzo.com>
From: “Linus”< sip:46382799032@80.232.37.178>;tag=as494f4a16
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 102 INVITE
Server: Sippy
WWW-Authenticate: Digest realm=“sip.phonzo.com”,nonce="a346c623f3dce8987c99f669701552931929"
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Transmitting (NAT) to 80.232.37.178:5060:
ACK sip:0735453334@sip.phonzo.com SIP/2.0
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK19c331ae;rport
Max-Forwards: 70
From: “Linus” < sip:46382799032@80.232.37.178>;tag=as494f4a16
To: < sip:0735453334@sip.phonzo.com >
Contact: < sip:46382799032@192.168.2.52:5060>
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 102 ACK
User-Agent: it-slav PBX
Content-Length: 0


Audio is at 13396
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 80.232.37.178:5060:
INVITE sip:0735453334@sip.phonzo.com SIP/2.0
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK0fd84f18;rport
Max-Forwards: 70
From: “Linus” < sip:46382799032@80.232.37.178>;tag=as494f4a16
To: < sip:0735453334@sip.phonzo.com >
Contact: < sip:46382799032@192.168.2.52:5060 >
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 103 INVITE
User-Agent: it-slav PBX
Authorization: Digest username=“46382799032”, realm=“sip.phonzo.com”, algorithm=MD5, uri="sip:0735453334@sip.phonzo.com", nonce=“a346c623f3dce8987c99f669701552931929”, response="10d1b1d4a4455561870e264a3d46375b"
Date: Thu, 09 Jun 2016 14:14:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 249

v=0
o=root 201537809 201537810 IN IP4 192.168.2.52
s=it-slav PBX
c=IN IP4 192.168.2.52
t=0 0
m=audio 13396 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


<— SIP read from UDP:80.232.37.178:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK0fd84f18;rport=23536;received=88.206.243.45
To: < sip:0735453334@sip.phonzo.com >
From: “Linus”< sip:46382799032@80.232.37.178 >;tag=as494f4a16
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 103 INVITE
Content-Length: 0

<------------->
— (7 headers 0 lines) —

<— SIP read from UDP:80.232.37.178:5060 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.2.52:5060;received=88.206.243.45;branch=z9hG4bK0fd84f18;rport=23536
Record-Route: < sip:80.232.37.178;lr >
To: < sip:0735453334@sip.phonzo.com >;tag=4quafrq5hp47dm2g.i
From: “Linus”< sip:46382799032@80.232.37.178 >;tag=as494f4a16
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 103 INVITE
Content-Type: application/sdp
Server: Sippy
Content-Length: 255

v=0
o=Sippy 739145560 1 IN IP4 80.232.37.178
s=session
t=0 0
m=audio 44734 RTP/AVP 0 8 101
c=IN IP4 80.232.37.178
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=sendrecv
<------------->
— (10 headers 12 lines) —
list_route: hop: < sip:80.232.37.178;lr >
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 80.232.37.178:44734

<— SIP read from UDP:80.232.37.178:5060 —>
OPTIONS sip:80.232.37.178 SIP/2.0
Via: SIP/2.0/UDP 80.232.37.178:5060;branch=z9hG4bK-d8754z-26dddf06bb36490c-1—d8754z-;rport
Max-Forwards: 1
To: < sip:80.232.37.178 >
From: < sip:80.232.37.178:5060 >;tag=50c0895e
Call-ID: natpingNWQwMmRmY2Q0OGVlYzdkMmI0YTA5OGIyZGUwMTcyMTQ.
CSeq: 1 OPTIONS
Accept: application/sdp
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 80.232.37.178:5060 (NAT)
Looking for s in from-sip-external (domain 80.232.37.178)

<— Transmitting (NAT) to 80.232.37.178:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 80.232.37.178:5060;branch=z9hG4bK-d8754z-26dddf06bb36490c-1—d8754z-;received=80.232.37.178;rport=5060
From: < sip:80.232.37.178:5060 >;tag=50c0895e
To: < sip:80.232.37.178 >;tag=as730bb54d
Call-ID: natpingNWQwMmRmY2Q0OGVlYzdkMmI0YTA5OGIyZGUwMTcyMTQ.
CSeq: 1 OPTIONS
Server: it-slav PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: < sip:192.168.2.52:5060 >
Accept: application/sdp
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘natpingNWQwMmRmY2Q0OGVlYzdkMmI0YTA5OGIyZGUwMTcyMTQ.’ in 32000 ms (Method: OPTIONS)
[2016-06-09 16:14:24] NOTICE[1936]: chan_sip.c:15089 sip_reregister: – Re-registration for 46382799032@80.232.37.178
REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 80.232.37.178:5060:
REGISTER sip:80.232.37.178 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK7b5768ec;rport
Max-Forwards: 70
From: < sip:46382799032@80.232.37.178 >;tag=as79185ba2
To: < sip:46382799032@80.232.37.178 >
Call-ID: 5ff5d51c1d539cf1474618651768f624@[::1]
CSeq: 116 REGISTER
User-Agent: it-slav PBX
Authorization: Digest username=“46382799032”, realm=“80.232.37.178”, algorithm=MD5, uri=“sip:80.232.37.178”, nonce=“1465481559:0e6077e64a854b78fd283fe40309f04d”, response="e0335a3a1ada13b9c154e3c20af81ec6"
Expires: 120
Contact: < sip:382799032@192.168.2.52:5060>
Content-Length: 0


<— SIP read from UDP:80.232.37.178:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK7b5768ec;rport=23536;received=88.206.243.45
Contact: < sip:382799032@88.206.243.45:23536>;expires=300
To: < sip:46382799032@80.232.37.178>;tag=6d83bc30
From: < sip:46382799032@80.232.37.178>;tag=as79185ba2
Call-ID: 5ff5d51c1d539cf1474618651768f624@[::1]
CSeq: 116 REGISTER
Date: Thu, 09 Jun 2016 14:14:24 GMT
PortaBilling: available-funds:2499.97 currency:SEK
Content-Length: 0

<------------->
— (10 headers 0 lines) —
[2016-06-09 16:14:24] NOTICE[1936]: chan_sip.c:23631 handle_response_register: Outbound Registration: Expiry for 80.232.37.178 is 120 sec (Scheduling reregistration in 105 s)
Really destroying SIP dialog ‘5ff5d51c1d539cf1474618651768f624@[::1]’ Method: REGISTER

<— SIP read from UDP:80.232.37.178:5060 —>
SIP/2.0 603 Declined
Via: SIP/2.0/UDP 192.168.2.52:5060;received=88.206.243.45;branch=z9hG4bK0fd84f18;rport=23536
Record-Route: < sip:80.232.37.178;lr>
To: < sip:0735453334@sip.phonzo.com>;tag=4quafrq5hp47dm2g.i
From: “Linus”< sip:46382799032@80.232.37.178>;tag=as494f4a16
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 103 INVITE
Server: Sippy
Content-Length: 0

<------------->
— (9 headers 0 lines) —
set_destination: Parsing < sip:80.232.37.178;lr> for address/port to send to
set_destination: set destination to 80.232.37.178:5060
Transmitting (NAT) to 80.232.37.178:5060:
ACK sip:0735453334@sip.phonzo.com SIP/2.0
Via: SIP/2.0/UDP 192.168.2.52:5060;branch=z9hG4bK0fd84f18;rport
Route: < sip:80.232.37.178;lr>
Max-Forwards: 70
From: “Linus” < sip:46382799032@80.232.37.178>;tag=as494f4a16
To: < sip:0735453334@sip.phonzo.com>;tag=4quafrq5hp47dm2g.i
Contact: < sip:46382799032@192.168.2.52:5060>
Call-ID: 50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178
CSeq: 103 ACK
User-Agent: it-slav PBX
Content-Length: 0


[2016-06-09 16:14:25] NOTICE[2809]: pbx_spool.c:389 attempt_thread: Call failed to go through, reason (5) Remote end is Busy
[2016-06-09 16:14:25] NOTICE[2809]: pbx_spool.c:392 attempt_thread: Queued call to SIP/Phonzo2/0735453334 expired without completion after 0 attempts
Really destroying SIP dialog ‘50c06e960a4db12d2fedc8450dc11f2a@80.232.37.178’ Method: INVITEindent preformatted text by 4 spaces

There’s nothing on the Asterisk side that appears to be wrong. The call is initiated successfully, they provide inband progress, and eventually send back a declined.

So it can be pretty much anything from the provider (Phonzo) that is blocking the call? So the next step should be to contact them?

Google told me that the User-Agent could be the problem so I changed that without any success. The strange thing is that there is no problem with incoming calls…

Yes, you would need to contact the provider to find out why they are behaving as such.

there is a 603 Decline SIP response, this indicate the callee’s machine was successfully contacted but the user
explicitly does not wish to or cannot participate.

Yes, the dialog from your side seems to be correct.
So, there are two options:

  1. There is something wrong with the destination number (0735453334)
  2. Provider is blocking your call for some reason.

Try to call this destination via another provider and you will be clear about option 1 or 2.

P.S. For security reasons, I would recommend not to display public IP addresses in open Internet - it would be enough to replace some digits with fake ones.