Audio Recording Sync Issues on Outgoing Calls in Asterisk

Hello Asterisk Community,

I’m facing a challenge with audio recordings being out of sync on outgoing calls from one of my dialers (Dialer A). The recording on Dialer A are completely out of sync for the below dialplan. All other calls are recording fine.

I have also setup recording on Dailer B. The issue does not occur in dialer (Dialer B) that receives these calls and records them perfectly.

Dialplan Entry:

exten => _100001,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _100001,n,AGI(agi-set_variables.agi)
exten => _100001,n,Dial(${SIPTRUNK}/100003,To)
exten => _100001,n,Hangup()

There are no issues on the receiving end (Dialer B), which suggests that the problem might be specific to the setup or configuration of Dialer A. I am looking for suggestions on what might cause these sync issues and how to potentially resolve them.

Based on your dialplan and the term “dialer,” it appears that you are using VICIDIAL. However, you haven’t provided any logs that would indicate whether you are using MixMonitor or Monitor. If you are using Monitor, please be aware that this application has been deprecated, so you should consider moving to MixMonitor. Additionally, it would be helpful to know the version of Asterisk you are using because I recall an old bug with MixMonitor where audio recordings could be out of sync. ASTERISK-16578: Record audio channels gets out of sync

I am fairly new to the vicidial domain apologies in advance for not sharing the version of the Asterisk used.

Dialer A (the one with the out of sync sound in recording)
2.14b0.5
13.38.2-vici

Dialer B - Asterisk 21.2.0
Below is a partial Dialplan

exten => 100003,1,Answer
    ;=======================================
    ; Use both CALL_ID and LEAD_ID in the recording filename
    same => n,MixMonitor(R${CALL_ID}-${LEAD_ID}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.wav)
    ;=======================================
    ; set talk flag and denoise on
    same => n, Set(DENOISE(rx)=on)
    same => n, Set(TALK_DETECT(set)=500)

    ;=======================================
    ; calling the AGI script of dial plan
    same => n,EAGI(u_dial_01.py,${LEAD_ID},${CALL_ID})

    ;=======================================
    same => n,StopMixMonitor()
    same => n,Hangup()

If i pull up the recording on Dialer B = I am not seeing any issues.

If i pull up the recording on Dialer A i am hearing the sound to be out of sync.

Let me know if you require any more information.

Asterisk 13 reached its end-of-life (EOL) on October 24, 2021. Start by upgrading the Asterisk version, as if the issue has been caused by a bug, it will likely be fixed in the latest version.

Also, the vici suffix suggest that its source code has been modified. You need to get your support from the Vicidial community, not the Asterisk one, not that the Asterisk community will support Asterisk 13.

Also, any Asterisk 13 almost certainly has known security vulnerabilities.

I have setup a new dialer (Dialer C) with default settings, only added the carriers details and still facing the same issue.

VERSION: 2.14-916a
16.30.0-vici

Is there a way of troubleshooting what could be wrong?

What do you mean by out of sync? If you are using monitor, I think periods of silence (total lack of RTP) will mean post processing to mix the directions won’t work.

What i mean by out of sync is the audio are overlapping most of the time. Its not a structured conversation.

Dailer C
VERSION: 2.14-916a
16.30.0-vici

exten => _100001,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _100001,n,AGI(agi-set_variables.agi)
exten => _100001,n,Dial(${SIPTRUNK}/100003,To)
exten => _100001,n,Hangup()

For Example.
Dailer C Is setup with default settings. It initiates an outgoing call (dialplan above) once connected it sends the call to Diabler B which has a smart AMD detection AGI script (which uses backend services to detect AM)

Dialer B - Asterisk 21.2.0

exten => 100003,1,Answer
    ;=======================================
    ; Use both CALL_ID and LEAD_ID in the recording filename
    same => n,MixMonitor(R${CALL_ID}-${LEAD_ID}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.wav)
    ;=======================================
    ; set talk flag and denoise on
    same => n, Set(DENOISE(rx)=on)
    same => n, Set(TALK_DETECT(set)=500)

    ;=======================================
    ; calling the AGI script of dial plan
    same => n,EAGI(u_dial_01.py,${LEAD_ID},${CALL_ID})

    ;=======================================
    same => n,StopMixMonitor()
    same => n,Hangup()

Now if i pickup the recording on Dialer C the recording are out of sync and overlapping. as if they are mixed properly.

Start by isolating your Asterisk dialers to verify if the issue occurs during the call transfer process, AGI script execution, or any other internal process. Once you identify the source of the issue, if it is determined to be caused by an Asterisk bug, ensure that you are using the latest release. If the issue persists, generate a backtrace report for further investigation.

it appeared to be a issue with the VOIP provider.