FreePBX | Register | Issues | Wiki | Portal | Support

AMI Asterisk Manager Class ParkedCalls Problem

Tags: #<Tag:0x00007f74a2957ae0>

(Jerry Riggin) #1

I am trying to get a list of parked calls using AMI, but all that is returned is “Parked calls will follow” but they never do. Here is my simplified test code:

if(!($astman->connected())) {
	logit("CCTL ERROR: Could not connect to asterisk manager!");

The result of this is:

array(3) {
  string(7) "Success"
  string(5) "start"
  string(24) "Parked calls will follow"

There was a parked call at the time:

root@pbx # asterisk -rx 'parking show default'

Parking Lot: default
Parking Extension   :  70
Parking Context     :  parkedcalls
Parking Spaces      :  71-78
Parking Time        :  45 sec
Comeback to Origin  :  no
Comeback Context    :  parkedcallstimeout
Comeback Dial Time  :  30 sec
MusicOnHold Class   :  default
Enabled             :  yes
Dynamic             :  no

Parked Calls
  Space               :  71
  Channel             :  Local/70@from-internal-xfer-0000006e;2
  Parker Dial String  :  SIP/1005

So what am I missing here?

(Andrew Nagy) #2

This function is asynchronous and will not work as you are intending. If you want it fixed best advice is to open a bug about it.