I had some trouble getting Barge to run because of permissions on the call-file.
- Because tomcat is running as root the file was created with 644 and root/root.
- I did some research and apparently Asterisk doesn't like files to be created or copied into spool/asterisk/outgoing because it could pick up the file while it's being written to. I saw a number of posts that said you should create it elsewhere and move it in.
Both these issues are reported to generate the "Permission denied, deleting" error that I was seeing from Asterisk.
The full error message is: "[chan_phone.so]<date> WARNING[2471] pbx_spool.c:Unable to open /var/spool/asterisk/outgoing/QM-1234567890.call: Permission denied, deleting"
I ended up using the Monitor URI (using the QM userid/password) instead and then I was able to generate calls, but there was no audio.
I did some more research and found that it couldn't see the extensions - the 'sip' context defined in the callfile.monitoring.channel property doesn't exist. I'm running TrixBox 2 and so I changed the context to 'ext-internal'.
I still couldn't hear audio. I noticed that QM_AGENT_CODE was being rewritten as Agent/<ext> (I had to do the mod to allow the rewrite to take place so that the dynamic agents would appear in QM) which doesn't really exist. I changed the ChanSpy command to use QM_AGENT_EXT instead of QM_AGENT_CODE and prepended it with "SIP/" and now I can hear audio and everything works just fine.
The only real issue now is that this won't work for non-iax agent extensions (our softphones connect via IAX because of firewall issues). It would be great to get a more robust fix for this at some point
.
Thanks for the great product.
Andy.