Callfile: Forwarding if no answer

Hi all, I am new to Asterisk use and I want execute the forwarding to another phone if not answer the first number.

The my configuration is very easy

File.call

Channel: local/7001@dialout
Application: Playback
Data: ProblemGeneric
MaxRetries: 1
RetryTime: 60
WaitTime: 20

Extention.conf

[dialout]
exten => _X.,1,Dial(SIP/${EXTEN}@SIPtrunkCisco,,g)
same => n,GotoIf($[ "${DIALSTATUS}" != "ANSWER" ]?Dial()SIP/${DEST2}@SIPtrunkCisco,1)
same => n,Hangup

SIp.conf

[SIPtrunkCisco]
type=friend
host=192.168.xx.xxx
context=internal
insecure=invite
allow=all

The problem is that from asterisk log I have the following problem:

 -- SIP/7001-000000**ed is busy**
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [7001@dialinternal:2] GotoIf("Local/7001@dialinternal-0000004a;2", "1?Dial()SIP/0339XXXXXXXX@SIPtrunkCisco,1") in new stack
    -- Goto (dialinternal,Dial()SIP/0339XXXXXXXX@SIPtrunkCisco,1)
[Oct 28 13:49:34] WARNING[58811][C-0000008e]: pbx.c:4416 __ast_pbx_run: Channel 'Local/7001@dialinternal-0000004a;2' sent to invalid extension but no invalid handler: context,exten,priority=dialinternal,Dial()SIP/0339XXXXXXXX@SIPtrunkCisco,1
[Oct 28 13:49:34] NOTICE[58810]: pbx_spool.c:447 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[Oct 28 13:49:34] WARNING[58810]: pbx_spool.c:350 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/phone.call: Operation not permitted
Really destroying SIP dialog '1e068e893b3930252449fefe0542c397@192.168.141.26:5060' Method: INVITE

in conclusion, the DEST2 telephone is not called, while the number 7001 is always called back

Should be

same => n,GotoIf($[ “${DIALSTATUS}” != “ANSWER”
]?Dial(SIP/${DEST2}@SIPtrunkCisco,1))

I think you meant to use ExecIf, but there are still mis-matched parentheses.

This is a security vulnerability; user peer.

This does nothing without a secret.

This can cause excessively long INVITE requests, and breaks some versions of Asterisk. You should only specify the codecs you intend to use, and start wtil disallow=all

chan_sip is deprecated and will be removed in the next version of Asteirsk.

unfortunately I have the same problem

Not possible. Please provide the logs for your new problem.

Thanks for your suggestions, However With ExecIf, call always first number and when I answer, ring too the second phone, but the playback on file is on first phone

Please provide the logging, and also add code to display the value of DIALSTATUS.

Why are you using the g option, when you hangup, anyway, if the call is answered?

i am new to asterisk and am not familiar with all the options.

What does the “g” option mean?

this is my log.

    -- Called 7001@dialout
    -- Executing [7001@dialout:1] Dial("Local/7001@dialout-00000088;2", "SIP/7001") in new stack
  == Using SIP RTP CoS mark 5
We think we can do text
Audio is at 12208
Adding codec slin to SDP
Adding codec ulaw to SDP
Adding codec amr to SDP
Adding codec amrwb to SDP
Adding codec g723 to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding codec g726 to SDP
Adding codec g726aal2 to SDP
Adding codec adpcm to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec lpc10 to SDP
Adding codec g729 to SDP
Adding codec speex to SDP
Adding codec speex to SDP
Adding codec speex to SDP
Adding codec ilbc to SDP
Adding codec g722 to SDP
Adding codec siren7 to SDP
Adding codec siren14 to SDP
Adding codec testlaw to SDP
Adding codec g719 to SDP
Adding codec opus to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 172.31.XX.XX:65271:
INVITE sip:7001@172.31.XX.XX:65271;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK3d8e504e;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as574d3885
To: <sip:7001@172.31.XX.XX:65271;ob>
Contact: <sip:anonymous@192.168.141.26:5060>
Call-ID: 198f43a27bb87be76dce0a661ca4cd3a@192.168.141.26:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Date: Fri, 28 Oct 2022 15:20:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Type: application/sdp
Content-Length: 955

v=0
o=root 569559504 569559504 IN IP4 192.168.141.26
s=Asterisk PBX 13.18.3~dfsg-1ubuntu4
c=IN IP4 192.168.141.26
t=0 0
m=audio 12208 RTP/AVP 10 0 108 109 4 8 3 111 112 5 118 7 18 110 117 119 97 9 102 115 116 107 101
a=rtpmap:10 L16/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:108 AMR/8000
a=rtpmap:109 AMR-WB/16000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:118 L16/16000
a=rtpmap:7 LPC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:117 speex/16000
a=rtpmap:119 speex/32000
a=rtpmap:97 iLBC/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 G7221/16000
a=fmtp:102 bitrate=32000
a=rtpmap:115 G7221/32000
a=fmtp:115 bitrate=48000
a=rtpmap:116 G719/48000
a=fmtp:116 bitrate=64000
a=rtpmap:107 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:20
a=sendrecv

---
    -- Called SIP/7001

<--- SIP read from UDP:172.31.XX.XX:65271 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.141.26:5060;rport=5060;received=192.168.141.26;branch=z9hG4bK3d8e504e
Call-ID: 198f43a27bb87be76dce0a661ca4cd3a@192.168.141.26:5060
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as574d3885
To: <sip:7001@172.31.XX.XX;ob>
CSeq: 102 INVITE
Content-Length: 0

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

<--- SIP read from UDP:172.31.XX.XX:65271 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.141.26:5060;rport=5060;received=192.168.141.26;branch=z9hG4bK3d8e504e
Call-ID: 198f43a27bb87be76dce0a661ca4cd3a@192.168.141.26:5060
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as574d3885
To: <sip:7001@172.31.XX.XX;ob>;tag=31bed0191ac74ce8a14aa9e33b8bb6e2
CSeq: 102 INVITE
Contact: <sip:7001@172.31.XX.XX:65271;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
sip_route_dump: route/path hop: <sip:7001@172.31.XX.XX:65271;ob>
    -- SIP/7001-0000013f is ringing
    -- Local/7001@dialout-00000088;1 is ringing

<--- SIP read from UDP:172.31.XX.XX:65271 --->
SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP 192.168.141.26:5060;rport=5060;received=192.168.141.26;branch=z9hG4bK3d8e504e
Call-ID: 198f43a27bb87be76dce0a661ca4cd3a@192.168.141.26:5060
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as574d3885
To: <sip:7001@172.31.XX.XX;ob>;tag=31bed0191ac74ce8a14aa9e33b8bb6e2
CSeq: 102 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
    -- Got SIP response 486 "Busy Here" back from 172.31.XX.XX:65271
Transmitting (NAT) to 172.31.XX.XX:65271:
ACK sip:7001@172.31.XX.XX:65271;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK3d8e504e;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as574d3885
To: <sip:7001@172.31.XX.XX:65271;ob>;tag=31bed0191ac74ce8a14aa9e33b8bb6e2
Contact: <sip:anonymous@192.168.141.26:5060>
Call-ID: 198f43a27bb87be76dce0a661ca4cd3a@192.168.141.26:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Content-Length: 0


---
    -- SIP/7001-0000013f is busy
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [7001@dialout:2] GotoIf("Local/7001@dialout-00000088;2", "1?Dial(SIP/0339XXXXXXXX@SIPtrunkCisco,1)") in new stack
    -- Goto (dialout,Dial(SIP/0339XXXXXXXX@SIPtrunkCisco,1)
[Oct 28 15:20:22] WARNING[59496][C-000000ce]: pbx.c:4416 __ast_pbx_run: Channel 'Local/7001@dialout-00000088;2' sent to invalid extension but no invalid handler: context,exten,priority=dialout,Dial(SIP/0339XXXXXXXX@SIPtrunkCisco,1
[Oct 28 15:20:22] NOTICE[59495]: pbx_spool.c:447 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[Oct 28 15:20:22] WARNING[59495]: pbx_spool.c:350 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/phone.call: Operation not permitted
Really destroying SIP dialog '198f43a27bb87be76dce0a661ca4cd3a@192.168.141.26:5060' Method: INVITE
zabbix-asterisk*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

Doesn’t look like ExecIf to me. Also, not consistent with the scenario you described of 7001 answering, but the fallback number also being called.

Call file ownership is wrong. It needs to be owned by the user running Asterisk, unless they are root. Without this, the retry scheduling won’t work.

I have modify del dialplan:

exten => _X.,1,Dial(SIP/${EXTEN}@SIPtrunkCisco)
same => n,ExecIf($["${DIALSTATUS}" != "ANSWER"]?Dial(SIP/${DEST2}@SIPtrunkCisco,1))
same => n,Hangup

and too the privilege of file call.

but I have always the same problem. ring first 7001, reject the call and not ringing DEST2 but always 7001.
This is log file:

zabbix-asterisk*CLI>
zabbix-asterisk*CLI>

<--- SIP read from UDP:172.31.XX.XX:65271 --->

<------------->
[Oct 28 15:55:47] WARNING[19948]: pbx_spool.c:350 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/phone.call: Operation not permitted
    -- Attempting call on local/7001@dialout for application Playback(ProblemGeneric) (Retry 1)
    -- Called 7001@dialout
    -- Executing [7001@dialout:1] Dial("Local/7001@dialout-00000094;2", "SIP/7001") in new stack
  == Using SIP RTP CoS mark 5
We think we can do text
Audio is at 12772
Adding codec slin to SDP
Adding codec ulaw to SDP
Adding codec amr to SDP
Adding codec amrwb to SDP
Adding codec g723 to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding codec g726 to SDP
Adding codec g726aal2 to SDP
Adding codec adpcm to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec lpc10 to SDP
Adding codec g729 to SDP
Adding codec speex to SDP
Adding codec speex to SDP
Adding codec speex to SDP
Adding codec ilbc to SDP
Adding codec g722 to SDP
Adding codec siren7 to SDP
Adding codec siren14 to SDP
Adding codec testlaw to SDP
Adding codec g719 to SDP
Adding codec opus to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 172.31.XX.XX:65271:
INVITE sip:7001@172.31.XX.XX:65271;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK4566dad8;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as31578ec1
To: <sip:7001@172.31.XX.XX:65271;ob>
Contact: <sip:anonymous@192.168.141.26:5060>
Call-ID: 03f3e42c394f9933645e1fbf732205d1@192.168.141.26:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Date: Fri, 28 Oct 2022 15:55:47 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Type: application/sdp
Content-Length: 955

v=0
o=root 937195690 937195690 IN IP4 192.168.141.26
s=Asterisk PBX 13.18.3~dfsg-1ubuntu4
c=IN IP4 192.168.141.26
t=0 0
m=audio 12772 RTP/AVP 10 0 108 109 4 8 3 111 112 5 118 7 18 110 117 119 97 9 102 115 116 107 101
a=rtpmap:10 L16/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:108 AMR/8000
a=rtpmap:109 AMR-WB/16000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:118 L16/16000
a=rtpmap:7 LPC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:117 speex/16000
a=rtpmap:119 speex/32000
a=rtpmap:97 iLBC/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 G7221/16000
a=fmtp:102 bitrate=32000
a=rtpmap:115 G7221/32000
a=fmtp:115 bitrate=48000
a=rtpmap:116 G719/48000
a=fmtp:116 bitrate=64000
a=rtpmap:107 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:20
a=sendrecv

---
    -- Called SIP/7001

<--- SIP read from UDP:172.31.XX.XX:65271 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.141.26:5060;rport=5060;received=192.168.141.26;branch=z9hG4bK4566dad8
Call-ID: 03f3e42c394f9933645e1fbf732205d1@192.168.141.26:5060
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as31578ec1
To: <sip:7001@172.31.XX.XX;ob>
CSeq: 102 INVITE
Content-Length: 0

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

<--- SIP read from UDP:172.31.XX.XX:65271 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.141.26:5060;rport=5060;received=192.168.141.26;branch=z9hG4bK4566dad8
Call-ID: 03f3e42c394f9933645e1fbf732205d1@192.168.141.26:5060
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as31578ec1
To: <sip:7001@172.31.XX.XX;ob>;tag=f14c32e23ee142cda8edc49bad2fcd34
CSeq: 102 INVITE
Contact: <sip:7001@172.31.XX.XX:65271;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
sip_route_dump: route/path hop: <sip:7001@172.31.XX.XX:65271;ob>
    -- SIP/7001-0000014e is ringing
    -- Local/7001@dialout-00000094;1 is ringing

<--- SIP read from UDP:172.31.XX.XX:65271 --->
SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP 192.168.141.26:5060;rport=5060;received=192.168.141.26;branch=z9hG4bK4566dad8
Call-ID: 03f3e42c394f9933645e1fbf732205d1@192.168.141.26:5060
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as31578ec1
To: <sip:7001@172.31.XX.XX;ob>;tag=f14c32e23ee142cda8edc49bad2fcd34
CSeq: 102 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
    -- Got SIP response 486 "Busy Here" back from 172.31.XX.XX:65271
Transmitting (NAT) to 172.31.XX.XX:65271:
ACK sip:7001@172.31.XX.XX:65271;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK4566dad8;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as31578ec1
To: <sip:7001@172.31.XX.XX:65271;ob>;tag=f14c32e23ee142cda8edc49bad2fcd34
Contact: <sip:anonymous@192.168.141.26:5060>
Call-ID: 03f3e42c394f9933645e1fbf732205d1@192.168.141.26:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Content-Length: 0


---
    -- SIP/7001-0000014e is busy
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [7001@dialout:2] ExecIf("Local/7001@dialout-00000094;2", "1?Dial(SIP/0339XXXXXXXX@SIPtrunkCisco,1)") in new stack
  == Using SIP RTP CoS mark 5
Really destroying SIP dialog '03f3e42c394f9933645e1fbf732205d1@192.168.141.26:5060' Method: INVITE
We think we can do text
Audio is at 15068
Adding codec slin to SDP
Adding codec ulaw to SDP
Adding codec amr to SDP
Adding codec amrwb to SDP
Adding codec g723 to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding codec g726 to SDP
Adding codec g726aal2 to SDP
Adding codec adpcm to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec slin to SDP
Adding codec lpc10 to SDP
Adding codec g729 to SDP
Adding codec speex to SDP
Adding codec speex to SDP
Adding codec speex to SDP
Adding codec ilbc to SDP
Adding codec g722 to SDP
Adding codec siren7 to SDP
Adding codec siren14 to SDP
Adding codec testlaw to SDP
Adding codec g719 to SDP
Adding codec opus to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding codec silk to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 192.168.71.252:5060:
INVITE sip:0339XXXXXXXX@192.168.71.252 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK50059e51;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as76f018f5
To: <sip:0339XXXXXXXX@192.168.71.252>
Contact: <sip:anonymous@192.168.141.26:5060>
Call-ID: 4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Date: Fri, 28 Oct 2022 15:55:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Type: application/sdp
Content-Length: 957

v=0
o=root 1203475287 1203475287 IN IP4 192.168.141.26
s=Asterisk PBX 13.18.3~dfsg-1ubuntu4
c=IN IP4 192.168.141.26
t=0 0
m=audio 15068 RTP/AVP 10 0 108 109 4 8 3 111 112 5 118 7 18 110 117 119 97 9 102 115 116 107 101
a=rtpmap:10 L16/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:108 AMR/8000
a=rtpmap:109 AMR-WB/16000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:118 L16/16000
a=rtpmap:7 LPC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:117 speex/16000
a=rtpmap:119 speex/32000
a=rtpmap:97 iLBC/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 G7221/16000
a=fmtp:102 bitrate=32000
a=rtpmap:115 G7221/32000
a=fmtp:115 bitrate=48000
a=rtpmap:116 G719/48000
a=fmtp:116 bitrate=64000
a=rtpmap:107 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:20
a=sendrecv

---
    -- Called SIP/0339XXXXXXXX@SIPtrunkCisco

<--- SIP read from UDP:192.168.71.252:55938 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK50059e51;rport
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as76f018f5
To: <sip:0339XXXXXXXX@192.168.71.252>
Date: Fri, 28 Oct 2022 15:55:50 GMT
Call-ID: 4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060
CSeq: 102 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-15.4.3.M5
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
    -- Nobody picked up in 1000 ms
Scheduling destruction of SIP dialog '4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060' in 32000 ms (Method: INVITE)
Reliably Transmitting (NAT) to 192.168.71.252:55938:
CANCEL sip:0339XXXXXXXX@192.168.71.252 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK50059e51;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as76f018f5
To: <sip:0339XXXXXXXX@192.168.71.252>
Call-ID: 4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Content-Length: 0


---
Scheduling destruction of SIP dialog '4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060' in 32000 ms (Method: INVITE)
    -- Executing [7001@dialout:3] Hangup("Local/7001@dialout-00000094;2", "") in new stack
  == Spawn extension (dialout, 7001, 3) exited non-zero on 'Local/7001@dialout-00000094;2'
[Oct 28 15:55:51] NOTICE[59680]: pbx_spool.c:447 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)

<--- SIP read from UDP:192.168.71.252:55938 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK50059e51;rport
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as76f018f5
To: <sip:0339XXXXXXXX@192.168.71.252>
Date: Fri, 28 Oct 2022 15:55:51 GMT
Call-ID: 4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060
CSeq: 102 CANCEL
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:192.168.71.252:55938 --->
SIP/2.0 487 Request Cancelled
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK50059e51;rport
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as76f018f5
To: <sip:0339XXXXXXXX@192.168.71.252>;tag=F3D320C4-1913
Date: Fri, 28 Oct 2022 15:55:51 GMT
Call-ID: 4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060
CSeq: 102 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-15.4.3.M5
Reason: Q.850;cause=16
Content-Length: 0

<------------->
--- (11 headers 0 lines) ---
Transmitting (NAT) to 192.168.71.252:55938:
ACK sip:0339XXXXXXXX@192.168.71.252 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.26:5060;branch=z9hG4bK50059e51;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as76f018f5
To: <sip:0339XXXXXXXX@192.168.71.252>;tag=F3D320C4-1913
Contact: <sip:anonymous@192.168.141.26:5060>
Call-ID: 4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Content-Length: 0


---
Scheduling destruction of SIP dialog '4d04741641c6221f0e0cd2ea56756e59@192.168.141.26:5060' in 32000 ms (Method: INVITE)

<--- SIP read from UDP:172.31.XX.XX:65271 --->

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

However, I see that Asterisk after INVITE to DEST2 , send to cancel. Thisis visible too tcpdump:

16:16:24.227124 IP 172.31.XX.XX.65271 > asterisk.sip: SIP: SIP/2.0 100 Trying
16:16:24.227163 IP 172.31.XX.XX.65271 > asterisk.sip: SIP: SIP/2.0 180 Ringing
16:16:27.200552 IP 172.31.XX.XX.65271 > asterisk.sip: SIP: SIP/2.0 486 Busy Here
16:16:27.201065 IP asterisk.sip > 172.31.XX.XX.65271: SIP: ACK sip:7001@172.31.XX.XX:65271;ob SIP/2.0
16:16:27.204072 IP asterisk.sip > 192.168.71.252.sip: SIP: INVITE sip:0339XXXXXXXX@192.168.71.252 SIP/2.0
16:16:27.226634 IP 192.168.71.252.55938 > asterisk.sip: SIP: SIP/2.0 100 Trying
16:16:28.206252 IP asterisk.sip > 192.168.71.252.55938: SIP: CANCEL sip:0339XXXXXXXX@192.168.71.252 SIP/2.0
16:16:28.215007 IP 192.168.71.252.55938 > asterisk.sip: SIP: SIP/2.0 200 OK
16:16:28.215061 IP 192.168.71.252.55938 > asterisk.sip: SIP: SIP/2.0 487 Request Cancelled
16:16:28.215372 IP asterisk.sip > 192.168.71.252.55938: SIP: ACK sip:0339XXXXXXXX@192.168.71.252 SIP/2.0
16:16:32.771045 IP 172.31.XX.XX.65271 > asterisk.sip: SIP

That’s because you told it to time out the call after one second.

Thank you for your support, I have cancel the last “1” and now work .

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