i am calling a mobile number… so can’t ask telecom operator to do that…
i have tried on multiple operators both at outbound(PSTN) and inbound(mobile)
another solution i can tried is to transfer the call to IVR-extension, but i am still getting the same issue… asterisk start playing the recorded message immediately.
call_file="${outbound_folder}callfile_$phone_number.call"
echo "Channel: SIP/matrix_setu/$phone_number@from-internal" > "$call_file"
# echo "Application: Playback" >> "$call_file"
# echo "Data: silence/5&$audio_file" >> "$call_file"
# echo "Application: Extension" >> "$call_file"
# echo "Context: from-internal" >> "$call_file"
echo "Extension:988" >> "$call_file"
echo "Priority: 1" >> "$call_file"
echo "MaxRetries: 2" >> "$call_file"
echo "RetryTime: 60" >> "$call_file"
echo "WaitTime: 180" >> "$call_file"
echo "Archive: yes" >> "$call_file"
echo "" >> "$call_file" # Add an empty line
echo "Call file created: $call_file"
done < "$input_file"
asterisk log
-- Attempting call on SIP/matrix_setu/XXXXX@from-internal for 988@from-internal:1 (Retry 1)
== Using SIP VIDEO TOS bits 136
== Using SIP VIDEO CoS mark 6
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called matrix_setu/XXXXX@from-internal
-- SIP/matrix_setu-0000116c is making progress
-- SIP/matrix_setu-0000116c answered
-- Executing [988@from-internal:1] NoOp("SIP/matrix_setu-0000116c", "Running miscapp 2: diverting gp outgoing calls to IVR recorded messag") in new stack
-- Executing [988@from-internal:2] Macro("SIP/matrix_setu-0000116c", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/matrix_setu-0000116c", "TOUCH_MONITOR=1706109721.8046") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/matrix_setu-0000116c", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Progress("SIP/matrix_setu-0000116c", "") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/matrix_setu-0000116c", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/matrix_setu-0000116c", "CHANEXTENCONTEXT=matrix_setu-0000116c") in new stack
-- Executing [s@macro-user-callerid:6] Set("SIP/matrix_setu-0000116c", "CHANEXTEN=matrix_setu-0000116c") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/matrix_setu-0000116c", "CALLERID(number)=") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/matrix_setu-0000116c", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/matrix_setu-0000116c", "HOTDESCKCHAN=matrix_setu-0000116c") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/matrix_setu-0000116c", "HOTDESKEXTEN=matrix_setu") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/matrix_setu-0000116c", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("SIP/matrix_setu-0000116c", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("SIP/matrix_setu-0000116c", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:14] GotoIf("SIP/matrix_setu-0000116c", "0?report") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("SIP/matrix_setu-0000116c", "1?Set(REALCALLERIDNUM=)") in new stack
-- Executing [s@macro-user-callerid:16] Set("SIP/matrix_setu-0000116c", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("SIP/matrix_setu-0000116c", "0?limit") in new stack
-- Executing [s@macro-user-callerid:18] Set("SIP/matrix_setu-0000116c", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:19] ExecIf("SIP/matrix_setu-0000116c", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:20] GotoIf("SIP/matrix_setu-0000116c", "1?report") in new stack
-- Goto (macro-user-callerid,s,29)
-- Executing [s@macro-user-callerid:29] NoOp("SIP/matrix_setu-0000116c", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:30] GotoIf("SIP/matrix_setu-0000116c", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,31)
-- Executing [s@macro-user-callerid:31] GotoIf("SIP/matrix_setu-0000116c", "0?continue") in new stack
-- Executing [s@macro-user-callerid:32] ExecIf("SIP/matrix_setu-0000116c", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
-- Executing [s@macro-user-callerid:33] Set("SIP/matrix_setu-0000116c", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:34] GotoIf("SIP/matrix_setu-0000116c", "1?continue") in new stack
-- Goto (macro-user-callerid,s,50)
-- Executing [s@macro-user-callerid:50] Set("SIP/matrix_setu-0000116c", "CALLERID(number)=") in new stack
-- Executing [s@macro-user-callerid:51] Set("SIP/matrix_setu-0000116c", "CALLERID(name)=") in new stack
-- Executing [s@macro-user-callerid:52] GotoIf("SIP/matrix_setu-0000116c", "1?cnum") in new stack
-- Goto (macro-user-callerid,s,54)
-- Executing [s@macro-user-callerid:54] Set("SIP/matrix_setu-0000116c", "CDR(cnum)=") in new stack
-- Executing [s@macro-user-callerid:55] Set("SIP/matrix_setu-0000116c", "CHANNEL(language)=en") in new stack
-- Executing [988@from-internal:3] Goto("SIP/matrix_setu-0000116c", "play-system-recording,4,1") in new stack
-- Goto (play-system-recording,4,1)
-- Executing [4@play-system-recording:1] Answer("SIP/matrix_setu-0000116c", "") in new stack
-- Executing [4@play-system-recording:2] Playback("SIP/matrix_setu-0000116c", "custom/GP_call") in new stack
-- <SIP/matrix_setu-0000116c> Playing 'custom/GP_call.alaw' (language 'en')
-- Executing [4@play-system-recording:3] Hangup("SIP/matrix_setu-0000116c", "") in new stack
== Spawn extension (play-system-recording, 4, 3) exited non-zero on 'SIP/matrix_setu-0000116c'
[2024-01-24 20:52:45] NOTICE[6725][C-00000a50]: pbx_spool.c:463 attempt_thread: Call completed to SIP/matrix_setu/XXXXX@from-internal