I configured ChanSpy function at a new customer and there´s no audio durint the conversation. All the outgoing calls have Mixmonitor.

I tried use AUDIOHOOKS but didn´t work.

Is there any way to solve this issue.

Asterisk 1.8.32.

It seems that your problem is not Chanspy, it sounds like a Nat issue, please be more specific because you are mixing concepts

Note you re using deprecated version of Asterisk ( 1.8 0 END OF LIFE 2015-10-21)

There´s no NAT.

My Asterisk is connected directly to the WAN interface.

Some foruns, I saw that ChanSpy doesn´t work in recorded channels. So the solution was in AUDIOHOOK configuration, but I didn´t understand well.

I Just want spy a especific channel.

exten =>*1023XX,1,ChanSpy(${EXTEN:3},b)
exten =>
exten =>*1023XX,n,Set(VOLUME(rx)=4)
exten =>

But there´s no sound.


The function is AUDIOHOOK_INHERIT() , is used to set whether an audiohook may be inherited to another channel. By enabling audiohook inheritance on the channel, you are giving permission for an audiohook to be inherited by a descendent channel. Inheritance may be be disabled at any point as well.

on recent version of Asterisk this funtion is deprecated. Related to your issue with chanspy I would suggest upgrade your Asterisk version if you have the link for the forum posting the solution please share and I will take a look to see how can I help you

Hi Arthur,
I think you forgot to define the technology when invoke the command; ChanSpy needs tech/channel-id, so in case of SIP channel :

exten => _*1023XX,1,ChanSpy(SIP/${EXTEN:3},b)


1 Like

try using this configuration

exten => _*222x.#,n,Answer
exten => _*222x.#,n,Wait(1)
exten => _*222x.#,n,ChanSpy(sip/${EXTEN:4},q)
exten => _*222x.#,n,Hangup

exten => _*223x.#,n,Answer
exten => _*223x.#,n,Wait(1)
exten => _*223x.#,n,ChanSpy(sip/${EXTEN:4},qw)
exten => _*223x.#,n,Hangup

exten => _*224x.#,n,Answer
exten => _*224x.#,n,Wait(1)
exten => _*224x.#,n,ChanSpy(SIP/${EXTEN:4},qB)
exten => _*224x.#,n,Hangup