I am trying to make vtiger work with asterisk 1.6 (freepbx server). I have managed to get to the point where I can connect to the asterisk manager interface (AMI) and write to it. But for some weird reason, the originate would not work. I am using -
Action: Originate
Channel: SIP/2000
Exten: 1000
Context: from-internal
Priority: 1
Callerid: 2000
Async: yes
I tried reading the responses from AMI after making a direct call and it always had a random number after the channel. For example -
Event: Dial
Privilege: call,all
SubEvent: Begin
Channel: SIP/1000-0000000c
Destination: SIP/2000-0000000d
CallerIDNum: 1000
CallerIDName: 1000
UniqueID: 1359790601.12
DestUniqueID: 1359790601.13
Dialstring: 2000
Can this be an issue or am I missing anything here? Any pointers would be most helpful. Would be happy to provide any details.
I managed to fix the issue, so here is how the debugging went -
channel originate SIP/1000 extension 2000@from-internal
changed the manager extension to 2000 in manager.conf and tried making the call using
channel originate SIP/2000 extension 1000@from-internal
step 5 worked, but calls from PHP still failed. added debugging to find that the AMI was returning a permission denied
Now it works perfectly fine. Hope this helps someone, though I think this case might be a very personalized issue.