Author Topic: Barge function.  (Read 7029 times)

AndyS

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
    • View Profile
Barge function.
« on: April 30, 2007, 16:15:57 »
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.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Barge function.
« Reply #1 on: May 04, 2007, 17:22:44 »
Hello Andy,
not sure i get this correctly: are you trying to listen to records calls or to listen to live calls while they're ongoing?

AndyS

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Barge function.
« Reply #2 on: May 04, 2007, 17:32:29 »
Hi.

I'm trying to listen to ongoing live calls.

As I said, I got it going, but I'm worried about the hard-coded "SIP/" in the ChanSpy command.

Andy.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Barge function.
« Reply #3 on: May 04, 2007, 18:12:57 »
Hello,
you can - and should - change the dialplan to suit your needs. QueueMetrics is built to be maximally flexible, but I know this sometimes means it does not have One Simple Way to do things  :D

One thisng - I am not sure but maybe it's worth trying - would be to handle all agents through Local/XXX channels and go monitor those through ChanSpy....

dskinner

  • Newbie
  • *
  • Posts: 9
  • Karma: 2
    • View Profile
    • Email
Re: Barge function.
« Reply #4 on: June 20, 2007, 22:11:19 »
I think this is the same issue I am looking at now.  I am trying to Monitor Live calls on an "outbound queue".  It works fine for inbound calls, but not outbound ones.  I assume this is because it is trying to monitor agent/123 and the "agent" is not making the call on an outbound call.

I will give the Local/123 a try tomorrow.  Where should I be looking to make that change?

Thanks!

-Dennis

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Barge function.
« Reply #5 on: June 21, 2007, 08:27:01 »
If you look at the dialplan, you should be able to see where the "Agent/XXX" is received; just rewrite that to Local/XXX@ext. It's true that there is a problem with outgoinbg calls, I think we will adrdress it after 1.4.1.

dskinner

  • Newbie
  • *
  • Posts: 9
  • Karma: 2
    • View Profile
    • Email
Re: Barge function.
« Reply #6 on: June 21, 2007, 19:57:03 »
I see.  Roughly like this:

exten => 11,n,Set(QM_AGENT_CODE=${CUT(QM_AGENT_CODE,/,2)})
exten => 11,n,Set(QM_AGENT_CODE=Local/${QM_AGENT_CODE})

I'll have to test it later as something else needs my attention.  Thanks!

-Dennis

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Barge function.
« Reply #7 on: June 22, 2007, 08:34:20 »
Yes, kind of - I believe that must be Local/${AGENTCODE}@somecontext, but you get the idea.