FreePBX | Register | Issues | Wiki | Portal | Support

CHANNEL(peername) empty when calling queue


(Brandon Brown) #1

I am creating a module that will pause and unpause queue members after hangup. I have this working for the most part when calling extension to extension but when I call into the queue from the outside through the IVR the variable ${CHANNEL(peername)} is blank. When calling extension to extension this variable is populated properly the extension number that made the call. Is there another variable I need to look at when calling into a queue from the IVR?


(Tom Ray) #2

You mean something that does something different than the Wrap-Up Time for an agent, which does exactly this?


(Dave Burgess) #3

There was a huge kerfuffle on here about six months ago about this that I’m not sure ever really got nailed down.

IIRC, the problem there was that wrap-up time was only being honored by the queue that set it, this left agents open to immediate calls during their “cool-down” period.

Notwithstanding, the original question (“What can I query instead of CHANNEL(peername)?”) stands. Have you looked at the other members of the CHANNEL object? Both “src” and “dst” (as well as many other object elements) are available in the CHANNEL() structure. There are also other stuctures that might be conducive to your needs.


(Brandon Brown) #4

Wrap-Up time does not technically pause an Agent, it just won’t let them receive calls. I need them to be paused as if they manually dialed the feature code to pause themselves.


(Brandon Brown) #5

Thanks for the reply. I found out that DEXTEN has what I need in this case so I just made a ternary
${IF($["${CHANNEL(peername)}"=""]?${DEXTEN}:${CHANNEL(peername)})}


(system) closed #6

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