extenSpy listen-in script sometimes heavily distorted

We have a Pascom script for listening-in to calls:

exten => _*23X.,1,Set(TMP_EXTEN=${EXTEN:3})
same => n,Authenticate(<STATIC PIN>)
same => n,ExtenSpy(,qg(${TMP_EXTEN}))
same => n,Hangup()

I am told that since January/February, the script has ended up showing issues. Sometimes when a user tries to listen in to an outbound call, the voice ends up heavily distorted and completely incomprehensible. Disconnecting from and reconnecting to the call can fix it. More than just that one user are affected.

In my own personal tests, I have called my personal phone multiple times before listening in with a second account. I never could trigger the issue.

Has anyone encountered a similar problem before? Any idea on what we could try, incl. alternative ways of setting this up?

Additionally, is there a way for Asterisk to save its logs somewhere for me to access later in Pascom Cloud? As we don’t use the listen-in feature too often and my own tests can’t trigger it, it can be difficult to be online at the right time to catch these in case there was something that could help.

Hi @bpo ,

first of all, I’d been completly unaware of the issue (up to now). I could assume that some "different codec already established call and ‘spy call’ " could be an issue here. Which devices and trunk products are involved here?
In case you have access to the web CLI a “pjsip show channelstats” while this distortion is currently happening would be nice (peer names of involved users would be also great in case a lot of calls are ongoing).
In case you can get that information you could send it to me via pm.

Best regards,
Steve

Hi @Steve,
In this case our guys are using the Pascom softphone on Windows 10 while making outbound calls to customer mobile phones. We use Sipgate trunking.
Let me know if you were looking for any other information!

Thanks for the pjsip command – I’ll try and get that.