ChanSpy: Regular cracks in audio

We have an issue with ChanSpy and the resulting audio
We use G722 as audio codec for the endpoints
When calling the extension 1, the resulting audio often contains cracks in regular intervals
We also “see” these cracks when inspecting the network traffic with wireshark
The timestamps of the cracking package do not fit the actual time the package is sent, in fact it looks like it is exactly one package late
These regularly occur each half a second or so
The audio is only a problem on the spy and not on the spied on channel.
Also the audio on the Spy does not sound like G722 unlike the audio on extension 1 even though it says it is the codec.

This is our extensions.conf

exten => 1,1,NoOp()
    same => n,Set(__CALLERNUM=${CALLERID(num)})
    same => n,Originate(PJSIP/5041,exten,from-internal,spySpeaker,1,10,b(from-internal^initDevice^1(${CALLERID(num)})))
    same => n,Dial(PJSIP/5001)
exten => spySpeaker,1,NoOp()
    same => n,GotoIf($["$CHANNELS(${ARG1})}"=""]?end) ; hangup speaker connection when inital caller already hung up (detect by checking
    ; if list of all channels contains a channel that matches the inital caller)
    same => n,ChanSpy(PJSIP/${CALLERNUM},loqE)
    same => n(end),HangUp()

exten => initDevice,1,NoOp()
    same => n,Set(__CALLERNUM=${ARG1})
    same => n,Set(CALLERID(all)=${ARG1}) ; thus ARG1 will be displayed on the speakers display
    same => n,Return()

Are we using ChanSpy wrong and what can we do to prevent this behaviour?

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