Need SIP 480 instead of 486 when call not answered

it is a NO ANSWER where the caller gave up

So what is returning a 486? A user device or an upstream? And if the caller gave up that would be a CANCEL which is neither a 480 or 486.

what I mean by caller gave up is callee did not pick and call dropped after RINGING

upstream and user device

You are going to need to be more specific, Caller → Callee and then what is cancelling the call? Are you limiting the ringtime in the Dial() so if the Callee doesn’t pick up in 30 seconds, hangup? 480/486 are responses from the callee’s side meaning their device returned it. If the Dial() timeout that would be a completely different response.

Ringing time is over and call drops because callee did not answer the call

we’re connected to MNO so this is the case, yes

You’re going to need to show a debug of this call. Asterisk canceling the Dial() isn’t going to result in a 486 so something is missing here. We’re going to need a call that returns a 486 when Dial() cancels the call.

here is the debug

<— SIP read from UDP:197.211.58.14:37664 —>

REGISTER sip:102.129.36.92:5060;transport=UDP SIP/2.0

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—d7b07ecc155e21fd;rport

Max-Forwards: 70

Contact: sip:5337260406@197.211.58.14:37664;transport=UDP;rinstance=9b4eaf23cf87c36c

To: sip:5337260406@102.129.36.92:5060;transport=UDP

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=9952f23d

Call-ID: 0ChtCRH2q9zMUi4zg1ET4Q…

CSeq: 9 REGISTER

Expires: 60

Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE

User-Agent: Z 5.5.13 v2.10.18.3

Authorization: Digest username=“5337260406”,realm=“asterisk”,nonce=“46ce6751”,uri=“sip:102.129.36.92:5060;transport=UDP”,response=“cba1f9d9899b7b16eab9a19b943a3080”,algorithm=MD5

Allow-Events: presence, kpml, talk

Content-Length: 0

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

— (14 headers 0 lines) —

Sending to 197.211.58.14:37664 (NAT)

Sending to 197.211.58.14:37664 (NAT)

<— Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—d7b07ecc155e21fd;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=9952f23d

To: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=as07e4c5f7

Call-ID: 0ChtCRH2q9zMUi4zg1ET4Q…

CSeq: 9 REGISTER

Server: Asterisk PBX 13.38.3

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“5518163e”

Content-Length: 0

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

Scheduling destruction of SIP dialog ‘0ChtCRH2q9zMUi4zg1ET4Q…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:197.211.58.14:37664 —>

REGISTER sip:102.129.36.92:5060;transport=UDP SIP/2.0

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—78c204b64d39a81a;rport

Max-Forwards: 70

Contact: sip:5337260406@197.211.58.14:37664;transport=UDP;rinstance=9b4eaf23cf87c36c

To: sip:5337260406@102.129.36.92:5060;transport=UDP

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=9952f23d

Call-ID: 0ChtCRH2q9zMUi4zg1ET4Q…

CSeq: 10 REGISTER

Expires: 60

Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE

User-Agent: Z 5.5.13 v2.10.18.3

Authorization: Digest username=“5337260406”,realm=“asterisk”,nonce=“5518163e”,uri=“sip:102.129.36.92:5060;transport=UDP”,response=“a7ab45da014e02df0dce09bd918794ae”,algorithm=MD5

Allow-Events: presence, kpml, talk

Content-Length: 0

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

— (14 headers 0 lines) —

Sending to 197.211.58.14:37664 (NAT)

<— Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—78c204b64d39a81a;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=9952f23d

To: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=as07e4c5f7

Call-ID: 0ChtCRH2q9zMUi4zg1ET4Q…

CSeq: 10 REGISTER

Server: Asterisk PBX 13.38.3

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Expires: 60

Contact: sip:5337260406@197.211.58.14:37664;transport=UDP;rinstance=9b4eaf23cf87c36c;expires=60

Date: Sat, 10 Sep 2022 16:14:07 GMT

Content-Length: 0

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

Scheduling destruction of SIP dialog ‘0ChtCRH2q9zMUi4zg1ET4Q…’ in 32000 ms (Method: REGISTER)

mkel*CLI>

<— SIP read from UDP:197.211.58.14:37664 —>

INVITE sip:2347038284899@102.129.36.92:5060;transport=UDP SIP/2.0

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—27f3ea9f09b99b2b;rport

Max-Forwards: 70

Contact: sip:5337260406@197.211.58.14:37664;transport=UDP

To: sip:2347038284899@102.129.36.92:5060

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 1 INVITE

Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE

Content-Type: application/sdp

User-Agent: Z 5.5.13 v2.10.18.3

Allow-Events: presence, kpml, talk

Content-Length: 331

v=0

o=Z 0 764905876 IN IP4 192.168.0.100

s=Z

c=IN IP4 192.168.0.100

t=0 0

m=audio 57098 RTP/AVP 106 9 98 101 0 8 3

a=rtpmap:106 opus/48000/2

a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1

a=rtpmap:98 telephone-event/48000

a=fmtp:98 0-16

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=sendrecv

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

— (13 headers 13 lines) —

Sending to 197.211.58.14:37664 (NAT)

Sending to 197.211.58.14:37664 (NAT)

Using INVITE request as basis request - 24mhrqKqSTdrLzGpONTftg…

Found peer ‘5337260406’ for ‘5337260406’ from 197.211.58.14:37664

<— Reliably Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—27f3ea9f09b99b2b;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

To: sip:2347038284899@102.129.36.92:5060;tag=as7a489290

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 1 INVITE

Server: Asterisk PBX 13.38.3

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“13af5697”

Content-Length: 0

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

Scheduling destruction of SIP dialog ‘24mhrqKqSTdrLzGpONTftg…’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:197.211.58.14:37664 —>

ACK sip:2347038284899@102.129.36.92:5060;transport=UDP SIP/2.0

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—27f3ea9f09b99b2b;rport

Max-Forwards: 70

To: sip:2347038284899@102.129.36.92:5060;tag=as7a489290

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 1 ACK

Content-Length: 0

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

— (8 headers 0 lines) —

<— SIP read from UDP:197.211.58.14:37664 —>

INVITE sip:2347038284899@102.129.36.92:5060;transport=UDP SIP/2.0

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—eeeb5c745b03db34;rport

Max-Forwards: 70

Contact: sip:5337260406@197.211.58.14:37664;transport=UDP

To: sip:2347038284899@102.129.36.92:5060

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 2 INVITE

Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE

Content-Type: application/sdp

User-Agent: Z 5.5.13 v2.10.18.3

Authorization: Digest username=“5337260406”,realm=“asterisk”,nonce=“13af5697”,uri=“sip:2347038284899@102.129.36.92:5060;transport=UDP”,response=“35c95e20dd3aefea03623d61155cd07b”,algorithm=MD5

Allow-Events: presence, kpml, talk

Content-Length: 331

v=0

o=Z 0 764905876 IN IP4 192.168.0.100

s=Z

c=IN IP4 192.168.0.100

t=0 0

m=audio 57098 RTP/AVP 106 9 98 101 0 8 3

a=rtpmap:106 opus/48000/2

a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1

a=rtpmap:98 telephone-event/48000

a=fmtp:98 0-16

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=sendrecv

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

— (14 headers 13 lines) —

Sending to 197.211.58.14:37664 (NAT)

Using INVITE request as basis request - 24mhrqKqSTdrLzGpONTftg…

Found peer ‘5337260406’ for ‘5337260406’ from 197.211.58.14:37664

== Using SIP RTP CoS mark 5

Got SDP version 764905876 and unique parts [Z 0 IN IP4 192.168.0.100]

Found RTP audio format 106

Found RTP audio format 9

Found RTP audio format 98

Found RTP audio format 101

Found RTP audio format 0

Found RTP audio format 8

Found RTP audio format 3

Found audio description format opus for ID 106

Found unknown media description format telephone-event for ID 98

Found audio description format telephone-event for ID 101

Capabilities: us - (ulaw|alaw|gsm|g729), peer - audio=(ulaw|gsm|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (ulaw|alaw|gsm)

Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)

0x7ff4e800bf50 – Strict RTP learning after remote address set to: 192.168.0.100:57098

Peer audio RTP is at port 192.168.0.100:57098

Looking for 2347038284899 in a2billing (domain 102.129.36.92)

sip_route_dump: route/path hop: sip:5337260406@197.211.58.14:37664;transport=UDP

<— Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—eeeb5c745b03db34;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

To: sip:2347038284899@102.129.36.92:5060

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 2 INVITE

Server: Asterisk PBX 13.38.3

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Contact: sip:2347038284899@102.129.36.92:5060

Content-Length: 0

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

– Executing [2347038284899@a2billing:1] NoOp(“SIP/5337260406-00000004”, “a2billing start”) in new stack

– Executing [2347038284899@a2billing:2] Set(“SIP/5337260406-00000004”, “A2BACCOUNTCODE=5337260406”) in new stack

– Executing [2347038284899@a2billing:3] MYSQL(“SIP/5337260406-00000004”, “Connect CONNID localhost a2billinguser a2billing mya2billing”) in new stack

– Executing [2347038284899@a2billing:4] MYSQL(“SIP/5337260406-00000004”, “Query RESULTID 1 SELECT max_concurrent FROM cc_card WHERE username = 5337260406”) in new stack

– Executing [2347038284899@a2billing:5] GotoIf(“SIP/5337260406-00000004”, “0?lbl_a2billing_0:”) in new stack

– Executing [2347038284899@a2billing:6] MYSQL(“SIP/5337260406-00000004”, “Fetch vdp_tmp 2 MAXCHANNELS”) in new stack

– Executing [2347038284899@a2billing:7] GotoIf(“SIP/5337260406-00000004”, “0?lbl_a2billing_0:”) in new stack

– Executing [2347038284899@a2billing:8] MYSQL(“SIP/5337260406-00000004”, “Clear 2”) in new stack

– Executing [2347038284899@a2billing:9] MYSQL(“SIP/5337260406-00000004”, “Disconnect 1”) in new stack

– Executing [2347038284899@a2billing:10] NoOp(“SIP/5337260406-00000004”, “Maximum Channels Allowed = 10”) in new stack

– Executing [2347038284899@a2billing:11] NoOp(“SIP/5337260406-00000004”, “Channels in use = 0”) in new stack

– Executing [2347038284899@a2billing:12] Set(“SIP/5337260406-00000004”, “CURRENTCHANNELS=0”) in new stack

– Executing [2347038284899@a2billing:13] Set(“SIP/5337260406-00000004”, “REMAININGCHANNELS=10.000000”) in new stack

– Executing [2347038284899@a2billing:14] NoOp(“SIP/5337260406-00000004”, “Remaining channels available = 10.000000”) in new stack

– Executing [2347038284899@a2billing:15] Set(“SIP/5337260406-00000004”, “GROUP(OUT)=5337260406”) in new stack

– Executing [2347038284899@a2billing:16] GotoIf(“SIP/5337260406-00000004”, “1?:lbl_a2billing_1”) in new stack

– Executing [2347038284899@a2billing:17] NoOp(“SIP/5337260406-00000004”, “Call Allowed as channels available”) in new stack

– Executing [2347038284899@a2billing:18] AGI(“SIP/5337260406-00000004”, “a2billing.php,2”) in new stack

– Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php

– AGI Script Executing Application: (DIAL) Options: (SIP/mtn/+2347038284899,60,iL(19963000:61000:30000))

Limit Data for this call:

timelimit = 19963000 ms (19963.000 s)

play_warning = 61000 ms (61.000 s)

play_to_caller = yes

play_to_callee = no

warning_freq = 30000 ms (30.000 s)

start_sound =

warning_sound = timeleft

end_sound =

== Using SIP RTP CoS mark 5

Audio is at 19120

Adding codec ulaw to SDP

Adding codec g729 to SDP

Adding codec alaw to SDP

Adding non-codec 0x1 (telephone-event) to SDP

Reliably Transmitting (NAT) to 197.210.19.91:5060:

INVITE sip:+2347038284899@197.210.19.91 SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK3ca1351f;rport

Max-Forwards: 70

From: sip:+447749931908@102.129.36.92;tag=as513b94b1

To: sip:+2347038284899@197.210.19.91

Contact: sip:+447749931908@102.129.36.92:5060

Call-ID: 0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060

CSeq: 102 INVITE

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:23 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

P-Asserted-Identity: “+447749931908” sip:+447749931908@102.129.36.92

Content-Type: application/sdp

Content-Length: 311

v=0

o=root 561962203 561962203 IN IP4 102.129.36.92

s=Asterisk PBX 13.38.3

c=IN IP4 102.129.36.92

t=0 0

m=audio 19120 RTP/AVP 0 18 8 101

a=rtpmap:0 PCMU/8000

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=maxptime:150

a=sendrecv


– Called SIP/mtn/+2347038284899

<— SIP read from UDP:197.210.19.91:5060 —>

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK3ca1351f;rport=5060

Call-ID: 0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060

From: sip:+447749931908@102.129.36.92;tag=as513b94b1

To: sip:+2347038284899@197.210.19.91

CSeq: 102 INVITE

Content-Length: 0

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

— (7 headers 0 lines) —

Reliably Transmitting (NAT) to 197.210.19.91:5060:

OPTIONS sip:197.210.19.91 SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK6f4bc342;rport

Max-Forwards: 70

From: “asterisk” sip:asterisk@102.129.36.92;tag=as36e9dc5b

To: sip:197.210.19.91

Contact: sip:asterisk@102.129.36.92:5060

Call-ID: 1137544836fb254c20e2f8ea504151fd@102.129.36.92:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:24 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0


<— SIP read from UDP:197.210.19.91:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK6f4bc342;rport=5060

Call-ID: 1137544836fb254c20e2f8ea504151fd@102.129.36.92:5060

From: "asterisk"sip:asterisk@102.129.36.92;tag=as36e9dc5b

To: sip:197.210.19.91;tag=01122773567416

CSeq: 102 OPTIONS

Accept: application/sdp

Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,PRACK,UPDATE

Supported: 100rel,resource-priority,precondition

Accept-Resource-Priority: q735.0,q735.1,q735.2,q735.3,q735.4

Content-Length: 0

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

— (11 headers 0 lines) —

Really destroying SIP dialog ‘1137544836fb254c20e2f8ea504151fd@102.129.36.92:5060’ Method: OPTIONS

Reliably Transmitting (NAT) to 105.112.159.104:5060:

OPTIONS sip:105.112.159.104;user=phone SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK17701983;rport

Max-Forwards: 70

From: “asterisk” sip:asterisk@102.129.36.92;tag=as3c7a022f

To: sip:105.112.159.104;user=phone

Contact: sip:asterisk@102.129.36.92:5060

Call-ID: 3e67ed23031f108621fba3670728d552@102.129.36.92:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:24 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0


<— SIP read from UDP:105.112.159.104:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK17701983;rport=5060

Call-ID: 3e67ed23031f108621fba3670728d552@102.129.36.92:5060

From: "asterisk"sip:asterisk@102.129.36.92;tag=as3c7a022f

To: sip:105.112.159.104;user=phone;tag=9aa86cs8

CSeq: 102 OPTIONS

Allow: OPTIONS,NOTIFY,SUBSCRIBE,INFO,REGISTER,MESSAGE,REFER,UPDATE,PRACK,BYE,CANCEL,ACK,INVITE

Supported: privacy,precondition,100rel

Content-Length: 0

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

— (9 headers 0 lines) —

Really destroying SIP dialog ‘3e67ed23031f108621fba3670728d552@102.129.36.92:5060’ Method: OPTIONS

Reliably Transmitting (NAT) to 194.28.167.186:5060:

OPTIONS sip:194.28.167.186 SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK6536f1dd;rport

Max-Forwards: 70

From: “asterisk” sip:asterisk@102.129.36.92;tag=as4a252aff

To: sip:194.28.167.186

Contact: sip:asterisk@102.129.36.92:5060

Call-ID: 1933ffc5788bff4b32a949371708afed@102.129.36.92:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:25 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0


Reliably Transmitting (NAT) to 194.28.167.31:5060:

OPTIONS sip:194.28.167.31 SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK73c76c4a;rport

Max-Forwards: 70

From: “asterisk” sip:asterisk@102.129.36.92;tag=as5f685ee4

To: sip:194.28.167.31

Contact: sip:asterisk@102.129.36.92:5060

Call-ID: 0da1ce7002aa7b302f989a0d420e7161@102.129.36.92:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:25 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0


Reliably Transmitting (NAT) to 194.28.167.32:5060:

OPTIONS sip:194.28.167.32 SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK7f229723;rport

Max-Forwards: 70

From: “asterisk” sip:asterisk@102.129.36.92;tag=as6818347f

To: sip:194.28.167.32

Contact: sip:asterisk@102.129.36.92:5060

Call-ID: 668b52770cfd48513553521920c04189@102.129.36.92:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:25 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0


<— SIP read from UDP:194.28.167.186:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK6536f1dd;rport=5060;received=102.129.36.92

From: “asterisk” sip:asterisk@102.129.36.92;tag=as4a252aff

To: sip:194.28.167.186;tag=850384556

Call-ID: 1933ffc5788bff4b32a949371708afed@102.129.36.92:5060

CSeq: 102 OPTIONS

Server: MediaCore/3.0.0

Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO, REGISTER

Content-Length: 0

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

— (9 headers 0 lines) —

Really destroying SIP dialog ‘1933ffc5788bff4b32a949371708afed@102.129.36.92:5060’ Method: OPTIONS

Reliably Transmitting (NAT) to 134.119.204.23:5060:

OPTIONS sip:134.119.204.23 SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK65f2ae03;rport

Max-Forwards: 70

From: “asterisk” sip:asterisk@102.129.36.92;tag=as7516bd6f

To: sip:134.119.204.23

Contact: sip:asterisk@102.129.36.92:5060

Call-ID: 4dba1fa5755165fc4036747472d3073a@102.129.36.92:5060

CSeq: 102 OPTIONS

User-Agent: Asterisk PBX 13.38.3

Date: Sat, 10 Sep 2022 16:14:25 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0


<— SIP read from UDP:194.28.167.31:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK73c76c4a;rport=5060;received=102.129.36.92

From: “asterisk” sip:asterisk@102.129.36.92;tag=as5f685ee4

To: sip:194.28.167.31;tag=214623864

Call-ID: 0da1ce7002aa7b302f989a0d420e7161@102.129.36.92:5060

CSeq: 102 OPTIONS

Server: MediaCore/3.0.0

Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO, REGISTER

Content-Length: 0

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

— (9 headers 0 lines) —

Really destroying SIP dialog ‘0da1ce7002aa7b302f989a0d420e7161@102.129.36.92:5060’ Method: OPTIONS

<— SIP read from UDP:194.28.167.32:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK7f229723;rport=5060;received=102.129.36.92

From: “asterisk” sip:asterisk@102.129.36.92;tag=as6818347f

To: sip:194.28.167.32;tag=1375889022

Call-ID: 668b52770cfd48513553521920c04189@102.129.36.92:5060

CSeq: 102 OPTIONS

Server: MediaCore/3.0.0

Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO, REGISTER

Content-Length: 0

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

— (9 headers 0 lines) —

Really destroying SIP dialog ‘668b52770cfd48513553521920c04189@102.129.36.92:5060’ Method: OPTIONS

<— SIP read from UDP:134.119.204.23:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK65f2ae03;rport=5060;received=102.129.36.92

From: “asterisk” sip:asterisk@102.129.36.92;tag=as7516bd6f

To: sip:134.119.204.23;tag=1255372405

Call-ID: 4dba1fa5755165fc4036747472d3073a@102.129.36.92:5060

CSeq: 102 OPTIONS

Server: MediaCore/3.0.0

Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO, REGISTER

Content-Length: 0

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

— (9 headers 0 lines) —

Really destroying SIP dialog ‘4dba1fa5755165fc4036747472d3073a@102.129.36.92:5060’ Method: OPTIONS

<— SIP read from UDP:197.210.19.91:5060 —>

SIP/2.0 183 Session Progress

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK3ca1351f;rport=5060

Record-Route: sip:197.210.19.91:5060;transport=udp;lr;Hpt=nw_36a_631cc578_1743e11_ex_90f8_216;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=20984

Call-ID: 0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060

From: sip:+447749931908@102.129.36.92;tag=as513b94b1

To: sip:+2347038284899@197.210.19.91;tag=15152977913819

CSeq: 102 INVITE

Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,PRACK,UPDATE

Contact: sip:197.210.19.91:5060;transport=udp;Hpt=nw_36a_631cc578_1743e11_ex_90f8_16;CxtId=3;TRC=ffffffff-ffffffff

Content-Length: 271

Content-Type: application/sdp

v=0

o=- 12396772 12396772 IN IP4 197.210.19.108

s=SBC call

c=IN IP4 197.210.19.108

t=0 0

a=sendrecv

m=audio 56148 RTP/AVP 8 101

c=IN IP4 197.210.19.108

b=RR:3000

b=RS:1000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=maxptime:40

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

— (11 headers 14 lines) —

sip_route_dump: route/path hop: sip:197.210.19.91:5060;transport=udp;lr;Hpt=nw_36a_631cc578_1743e11_ex_90f8_216;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=20984

Got SDP version 12396772 and unique parts [- 12396772 IN IP4 197.210.19.108]

Found RTP audio format 8

Found RTP audio format 101

Found audio description format PCMA for ID 8

Found audio description format telephone-event for ID 101

Capabilities: us - (g729|alaw|ulaw), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)

Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)

0x7ff56400ba50 – Strict RTP learning after remote address set to: 197.210.19.108:56148

Peer audio RTP is at port 197.210.19.108:56148

– SIP/mtn-00000005 is making progress passing it to SIP/5337260406-00000004

Audio is at 14984

Adding codec ulaw to SDP

Adding codec alaw to SDP

Adding codec gsm to SDP

Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 183 Session Progress

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—eeeb5c745b03db34;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

To: sip:2347038284899@102.129.36.92:5060;tag=as7fb89a5c

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 2 INVITE

Server: Asterisk PBX 13.38.3

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Contact: sip:2347038284899@102.129.36.92:5060

Content-Type: application/sdp

Content-Length: 289

v=0

o=root 1359784157 1359784157 IN IP4 102.129.36.92

s=Asterisk PBX 13.38.3

c=IN IP4 102.129.36.92

t=0 0

m=audio 14984 RTP/AVP 0 8 3 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:3 GSM/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=maxptime:150

a=sendrecv

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

<— SIP read from UDP:197.210.19.91:5060 —>

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK3ca1351f;rport=5060

Record-Route: sip:197.210.19.91:5060;transport=udp;lr;Hpt=nw_36a_631cc578_1743e11_ex_90f8_216;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=20984

Call-ID: 0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060

From: sip:+447749931908@102.129.36.92;tag=as513b94b1

To: sip:+2347038284899@197.210.19.91;tag=15152977913819

CSeq: 102 INVITE

Contact: sip:197.210.19.91:5060;transport=udp;Hpt=nw_36a_631cc578_1743e11_ex_90f8_16;CxtId=3;TRC=ffffffff-ffffffff

Content-Length: 0

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

— (9 headers 0 lines) —

sip_route_dump: route/path hop: sip:197.210.19.91:5060;transport=udp;lr;Hpt=nw_36a_631cc578_1743e11_ex_90f8_216;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=20984

– SIP/mtn-00000005 is ringing

0x7ff56400ba50 – Strict RTP switching to RTP target address 197.210.19.108:56148 as source

0x7ff4e800bf50 – Strict RTP qualifying stream type: audio

0x7ff4e800bf50 – Strict RTP switching source address to 197.211.58.14:36703

0x7ff4e800bf50 – Strict RTP learning complete - Locking on source address 197.211.58.14:36703

<— SIP read from UDP:197.211.58.14:37664 —>

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

0x7ff56400ba50 – Strict RTP learning complete - Locking on source address 197.210.19.108:56148

Really destroying SIP dialog ‘0ChtCRH2q9zMUi4zg1ET4Q…’ Method: REGISTER

<— SIP read from UDP:197.210.19.91:5060 —>

SIP/2.0 480 Temporarily Unavailable

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK3ca1351f;rport=5060

Call-ID: 0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060

From: sip:+447749931908@102.129.36.92;tag=as513b94b1

To: sip:+2347038284899@197.210.19.91;tag=15152977913819

CSeq: 102 INVITE

Reason: Q.850;cause=19

Content-Length: 0

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

— (8 headers 0 lines) —

Transmitting (NAT) to 197.210.19.91:5060:

ACK sip:197.210.19.91:5060;transport=udp;Hpt=nw_36a_631cc578_1743e11_ex_90f8_16;CxtId=3;TRC=ffffffff-ffffffff SIP/2.0

Via: SIP/2.0/UDP 102.129.36.92:5060;branch=z9hG4bK3ca1351f;rport

Max-Forwards: 70

From: sip:+447749931908@102.129.36.92;tag=as513b94b1

To: sip:+2347038284899@197.210.19.91;tag=15152977913819

Contact: sip:+447749931908@102.129.36.92:5060

Call-ID: 0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060

CSeq: 102 ACK

User-Agent: Asterisk PBX 13.38.3

Content-Length: 0


– SIP/mtn-00000005 redirecting info has changed, passing it to SIP/5337260406-00000004

<— Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 181 Call is being forwarded

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—eeeb5c745b03db34;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

To: sip:2347038284899@102.129.36.92:5060;tag=as7fb89a5c

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 2 INVITE

Server: Asterisk PBX 13.38.3

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Contact: sip:2347038284899@102.129.36.92:5060

Content-Length: 0

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

– SIP/mtn-00000005 is busy

Scheduling destruction of SIP dialog ‘0ad7b42a0945df613657e58c6375f0b9@102.129.36.92:5060’ in 6400 ms (Method: INVITE)

== Everyone is busy/congested at this time (1:1/0/0)

– AGI Script Executing Application: (Busy) Options: (1)

<— Reliably Transmitting (NAT) to 197.211.58.14:37664 —>

SIP/2.0 486 Busy Here

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—eeeb5c745b03db34;received=197.211.58.14;rport=37664

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

To: sip:2347038284899@102.129.36.92:5060;tag=as7fb89a5c

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 2 INVITE

Server: Asterisk PBX 13.38.3

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

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

– <SIP/5337260406-00000004>AGI Script a2billing.php completed, returning 4

== Spawn extension (a2billing, 2347038284899, 18) exited non-zero on ‘SIP/5337260406-00000004’

<— SIP read from UDP:197.211.58.14:37664 —>

ACK sip:2347038284899@102.129.36.92:5060;transport=UDP SIP/2.0

Via: SIP/2.0/UDP 192.168.0.100:49749;branch=z9hG4bK-524287-1—eeeb5c745b03db34;rport

Max-Forwards: 70

To: sip:2347038284899@102.129.36.92:5060;tag=as7fb89a5c

From: sip:5337260406@102.129.36.92:5060;transport=UDP;tag=29655115

Call-ID: 24mhrqKqSTdrLzGpONTftg…

CSeq: 2 ACK

Content-Length: 0

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

— (8 headers 0 lines) —

Really destroying SIP dialog ‘24mhrqKqSTdrLzGpONTftg…’ Method: ACK

Your provider is giving you a 480 just like you want. Callee didn’t answer so they gave a 480.

Asterisk is sending back a 181 Call is being forwarded to the caller based on getting a 480 from the Dial()'d channel.

Now Asterisk is telling your caller that everything is busy. This is probably the result of the 181 reply and that not being handled. Should that happen? Should there be a 181 reply at this point?

Your provider is giving you the right response, Asterisk is then doing something else based on that reply that causes your caller to get a 486 instead. Not sure what that could be since this is all based on things (Asterisk version, chan_sip, A2Billing) that are basically all EOL and really can’t be supported. Whatever is happening is happening based on the logic being used in Asterisk so far.

where could this 181 call forwarding be set up please?

can disabling NAT help?

I can’t tell you where this is setup. It’s your system and it has A2Billing on it, you’re going to need to look at this account/user and see if they have something setup they shouldn’t or what else is going on. If this is the only user having the problem, then it must be related to the settings for this user.

it affects all other user. I have two different trunks from 2 different providers and this happens when I call through those trunks with different users. I am getting frustrated. I need this fixed asap in anyway.

Does this only happen when they return a 480 or does it happen on other call statuses?

it happens only when they return 480

I’m thinking, could this be SIP ALG issue?

Asterisk is also indicating NO ANSWER, as the hangup cause, which should have been translated to 480.

However the 181 is totally weird. I can’t see that being sent unless the AGI script is doing something weird, My guess is that you’ve got some sort of mixed up status as a result of a failed attempt redirect the call within the script.

I also note that the dialplan Hangup isn’t being executed, which means that the AGI script has already hung up the channel.

At the moment, I would say this should be treated as an a2billing problem not an Asterisk one.

(Does a2billing possibly use a customised Asterisk?)

Nope. I am going with A2Billing issue as well, as Asterisk is what is generating the 181 on receiving a 480.

a2billing.php appears to be a very large script, spread over 11 files, and which hasn’t been touched in over a decade. I doubt that anyone is going to be able to sensibly address this in a reasonable amount of time unless they are already familiar with its internals.

talking of a2billing.php, I have another link that returns SIP 480, same a2billing and asterisk version is running on both. only difference is that this is connected to provider using E1 (dahdi). now, I want to copy it’s working a2billing.php and see if it works.