Call cannot completed in outbound SIP trunk - Amazon Cloud Ubuntu 16.04 LTS

lmoraes
Joined: Mon 08 of Jan, 2018

Call cannot completed in outbound SIP trunk - Amazon Cloud Ubuntu 16.04 LTS

Posted:Mon 08 of Jan, 2018 (23:43 UTC)
Call cannot completed return BUSY to external call using a VOIP wholesale (checkbox.cc)

The caller number is 5000 and trying to call to my house number 551934518014 (number of Brazil)

    • sip.conf***
```
general
allowguest=no
context=basico
port=5060
bindport=5060
bindaddr=0.0.0.0
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
maxexpirey=360
defaultexpirey=120
disallow=all
allow=ulaw
externaddr=35.177.209.216
media_address=35.177.209.216
localnet=192.168.0.0/255.255.0.0
nat=force_rport,comedia
qualify=yes
register=>lmoraes.oliveira1219-GW:******@199.59.99.91

checkbox
type=peer
username=lmoraes.oliveira1219-GW
secret=******
domain=199.59.99.91
fromuser=lmoraes.oliveira1219-GW
fromdomain=199.59.99.91
host=199.59.99.91
qualify=yes
port=5060
nat=force_rport,comedia
disallow=all
allow=ulaw
dtmfmode=rfc2833
context=recebe_checkbox
canreinvite=yes

5000
type=friend
secret=*****
qualify=yes
nat=force_rport,comedia
host=dynamic
disallow=all
allow=ulaw
context=rotadesaida
canreinvite=yes
```

    • extensions.conf**
```
general
static=yes
writeprotect=no
clearglobalvars=no

globals
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)

rotadesaida
exten => _X.,1,Dial(SIP/${EXTEN}@checkbox,50)
exten => _X.,2,congestion()
exten => _X.,102,busy()

recebe_checkbox
exten => checkbox,1,Goto(rotadeentrada,s,1)

rotadeentrada
exten => s,1,Dial(SIP/${EXTEN},50)

```

    • Complete log of SIP and RTM Debug ON**
```
<--- SIP read from UDP:177.129.14.34:27436 --->
INVITE sip:551943518014@solaristelecom.ddns.net;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---a4442f1fedd77411;rport
Max-Forwards: 70
Contact: <sip:5000@177.129.14.34:27436;transport=UDP>
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rd82a609
Allow-Events: presence, kpml, talk
Content-Length: 243

v=0
o=Zoiper 0 0 IN IP4 177.129.14.34
s=Zoiper
c=IN IP4 177.129.14.34
t=0 0
m=audio 27466 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<------------->

Sending to 177.129.14.34:27436 (NAT)
Sending to 177.129.14.34:27436 (NAT)
Using INVITE request as basis request - IkgQfNSXNJhh2xlnpR8RXA..
Found peer '5000' for '5000' from 177.129.14.34:27436

<--- Reliably Transmitting (NAT) to 177.129.14.34:27436 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---a4442f1fedd77411;received=177.129.14.34;rport=27436
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>;tag=as2caa5a6a
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 1 INVITE
Server: Asterisk PBX 13.18.5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="30eeff3e"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'IkgQfNSXNJhh2xlnpR8RXA..' in 83264 ms (Method: INVITE)

<--- SIP read from UDP:177.129.14.34:27436 --->
ACK sip:551943518014@solaristelecom.ddns.net;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---a4442f1fedd77411;rport
Max-Forwards: 70
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>;tag=as2caa5a6a
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 1 ACK
Content-Length: 0

<------------->


<--- SIP read from UDP:177.129.14.34:27436 --->
INVITE sip:551943518014@solaristelecom.ddns.net;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---e990ad657519ad3b;rport
Max-Forwards: 70
Contact: <sip:5000@177.129.14.34:27436;transport=UDP>
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rd82a609
Authorization: Digest username="5000",realm="asterisk",nonce="30eeff3e",uri="sip:551943518014@solaristelecom.ddns.net;transport=UDP",response="7e8115c561dd54a516f60cad749cb029",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 243

v=0
o=Zoiper 0 0 IN IP4 177.129.14.34
s=Zoiper
c=IN IP4 177.129.14.34
t=0 0
m=audio 27466 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<------------->

Sending to 177.129.14.34:27436 (NAT)
Using INVITE request as basis request - IkgQfNSXNJhh2xlnpR8RXA..
Found peer '5000' for '5000' from 177.129.14.34:27436
== Using SIP RTP CoS mark 5
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format GSM for ID 3
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), peer - audio=(ulaw|gsm|alaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 177.129.14.34:27466
Looking for 551943518014 in rotadesaida (domain solaristelecom.ddns.net)
sip_route_dump: route/path hop: <sip:5000@177.129.14.34:27436;transport=UDP>

<--- Transmitting (NAT) to 177.129.14.34:27436 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---e990ad657519ad3b;received=177.129.14.34;rport=27436
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 2 INVITE
Server: Asterisk PBX 13.18.5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:551943518014@35.177.209.216:5060>
Content-Length: 0


<------------>
— Executing 551943518014@rotadesaida:1 Dial("SIP/5000-00000052", "SIP/551943518014@checkbox,50") in new stack
== Using SIP RTP CoS mark 5
— Called SIP/551943518014@checkbox
— SIP/checkbox-00000053 redirecting info has changed, passing it to SIP/5000-00000052

<--- Transmitting (NAT) to 177.129.14.34:27436 --->
SIP/2.0 181 Call is being forwarded
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---e990ad657519ad3b;received=177.129.14.34;rport=27436
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>;tag=as3b1d5cf9
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 2 INVITE
Server: Asterisk PBX 13.18.5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:551943518014@35.177.209.216:5060>
Content-Length: 0


<------------>
— SIP/checkbox-00000053 is busy
== Everyone is busy/congested at this time (1:1/0/0)
— Executing 551943518014@rotadesaida:2 Congestion("SIP/5000-00000052", "") in new stack

<--- Reliably Transmitting (NAT) to 177.129.14.34:27436 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---e990ad657519ad3b;received=177.129.14.34;rport=27436
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>;tag=as3b1d5cf9
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 2 INVITE
Server: Asterisk PBX 13.18.5
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-Asterisk-HangupCause: User alerting, no answer
X-Asterisk-HangupCauseCode: 19
Content-Length: 0


<------------>
== Spawn extension (rotadesaida, 551943518014, 2) exited non-zero on 'SIP/5000-00000052'
Jan 8 22:45:21 ERROR1540: cdr_csv.c:315 csv_log: Unable to re-open master file /var/log/asterisk//cdr-csv//Master.csv : Permission denied

<--- SIP read from UDP:177.129.14.34:27436 --->
ACK sip:551943518014@solaristelecom.ddns.net;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 177.129.14.34:27436;branch=z9hG4bK-524287-1---e990ad657519ad3b;rport
Max-Forwards: 70
To: <sip:551943518014@solaristelecom.ddns.net;transport=UDP>;tag=as3b1d5cf9
From: <sip:5000@solaristelecom.ddns.net;transport=UDP>;tag=06eab136
Call-ID: IkgQfNSXNJhh2xlnpR8RXA..
CSeq: 2 ACK
Content-Length: 0

```