ChanSpy Agent Asterisk 13

Hello everybody,

I installed asterisk 13 and want to do chanspy to users type agent. In asterisk <= 11 it was simple:

exten => _XXX,1,answer
same => n,chanspy(Agent/${EXTEN})

But after asterisk 12, there is no channel type Agent, and i not found a way to do that.

I followed this guide to configure new agents on asterisk 13:

And i have tested in my dialplan code:

;agents is the context to do AgentRequest
exten => _1XXX,1,answer
same => n,chanspy(Local/${EXTEN:1}@agents)

exten => _2XXX,1,answer
same => n,chanspy(Agent/${EXTEN:1}@agents)

exten => _3XXX,1,answer
same => n,chanspy(Agent/${EXTEN:1})

exten => _4XXX,1,answer
same => n,chanspy(Agent::${EXTEN:1})

Neither of these are working.

Have someone encountered the same problem? Have find a solution? Thank you for your attention and sorry for my english!

Assuming your extensions are just numeric you should be able to just prefix the extension with the channel type.

exten => _XXX,1,ChanSpy(SIP/${EXTEN})

Thank you for your help!, but that is not the solution that i am looking for. Doing Spy direct on SIP channels is possible, but is not possible to spy on agent channels in the same way that was for asterisk <=11:

exten => _XXX,1,chanspy(Agent/${EXTEN})

I’m afraid I can’t help any more then, I don’t use Agents and I have the impression the agent channels had been deprecated.

I never have used agentl channel, but based on the above link starting in Asterisk 12, the app_agent_pool application replaced chan_agent. I think what you can do is get the agent channel name using AGENT() function and then spy that channel