I feel like this is going to be a simple answer, but I’ve been scouring Google and I can’t seem to track it down so I’m hoping that you good folks might be able to kick me in the right direction!
I’m playing around with the Asterisk Manager Interface, attempting to track the making of a call as early as possible. Watching the output, I can see that the BRIDGE event would be a good one to use if I were willing to wait until the call was answered to determine between which parties it had been established. Unfortunately, I need to know as soon as possible (preferably as soon as the call is initiated) who the call is being made from and to. The events I’m seeing are those such as Newstate and Newchannel but these do not seem to link together in any way to allow me to get identities of BOTH sides of the call.
For this, I believe I need the DIAL event, but there is no sign of this in the AMI output. I know I’ve seen it when using previous Asterisk versions. Has it been removed in Asterisk 1.6 or do I need to enable it somewhere?
For the sake of complete information, I’m using the latest Trixbox build (trixbox CE 2.8.0.4).
Unfortunately, 1.6.0.22 is the latest version in the trixbox repository and I’m reluctant to venture outside of that repository as it has caused me problems in the past to do this.
From what I can see, the Dial event should be there though, as you say, so the question is - why is it not?
I’ve made progress on this. I can see the Dial event but ONLY if I set the read permission in manager.conf to “all”. This is in addition to setting Event Masking to all when I logon to Asterisk Manager Interface.
It seems like setting “call” permission is not enough, even though when the event appears, it seems to signify that a call permission would be sufficient.
I’m not yet sure whether this is a bug in Asterisk, a bug in Trixbox or a misunderstanding on my part…
To recap:
Using this login on the Asterisk Manager Interface in both cases:
Action: login
Username: user
Secret: password
Events: all
The following entry in manager.conf yields Dial events:
[user]
secret = password
deny = 0.0.0.0/0.0.0.0
permit = 192.168.0.0/255.255.0.0
read = all
The following entry in manager.conf DOES NOT yield Dial events:
[user]
secret = password
deny = 0.0.0.0/0.0.0.0
permit = 192.168.0.0/255.255.0.0
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan,originate
If anyone has any idea why this might not be behaving as expected, your input would be appreciated. I’'ll try and look into this myself as soon as I’ve finished the task that I needed this for in the first place!
Thanks Mark for posting your solution. I had the exact same issue (same versions of asterisk and trixbox as well). Changing the permissions to all allowed me to see the Dial event.