Author Topic: Monitoring non-local calls  (Read 4574 times)

dskinner

  • Newbie
  • *
  • Posts: 9
  • Karma: 2
    • View Profile
    • Email
Monitoring non-local calls
« on: July 02, 2007, 22:41:08 »
So I don't keep stealing the Barge thread, I started a new one.

I want to monitor calls that are not terminated on the local end.  At certain times of the day we are rerouting some of our calls to an outsourced call center.  The boss wants to track, record, and monitor these calls.  I copied your agi script for outbound calls and basically stripped out the pause/unpause so that it fakes a queue call using a fake agent (an Agent in QM, but not in Aterisk).

Recording and call reporting seems to work, but not monitoring.  I think the only way to make this work is to make QM aware of the Zap channel that the call is on and have it send that to ChanSpy.  I think I should be able to do a ChanIsAvail to find an open line and then pass that to the agi as part of the dial string *and* as an extra value for the channel to monitor.  The trick will be altering QM itself to take the extra monitor string and put that where it needs to be.  I'm not all that familiar with java.

Am I heading in the right direction with this?

Thanks!

-Dennis

dskinner

  • Newbie
  • *
  • Posts: 9
  • Karma: 2
    • View Profile
    • Email
Re: Monitoring non-local calls
« Reply #1 on: July 03, 2007, 17:04:46 »
Leo,

Thanks!  That does help.  I did some testing to confirm that the QM_AGENT_EXT comes from the current_terminal field of that table.  I think I should be able to use ChanIsAvail to select an open Zap channel and then pass that to the agi script along with the rest of the info and then do a mysql call to update the table, Dial, then change the table back.

I'll post my results.

Thanks!

-Dennis

dskinner

  • Newbie
  • *
  • Posts: 9
  • Karma: 2
    • View Profile
    • Email
Re: Monitoring non-local calls
« Reply #2 on: July 06, 2007, 17:11:09 »
After some more testing, I'm a bit stumped.  It seems like QM may be caching the current_terminal so it doesn't have to look it up each time. 

If I set a Zap channel in the agent's current terminal from within QM, it shows up in the agenti_noti table and when I monitor the call, it is in the QM_AGENT_EXT asterisk variable.  However, if I alter the table directly via the SQL cli client, or update it via the agi script, it does not see the change.

I just tested again.  I set the value in the table via the SQL cli and tested it.  Does not see the change.  Waited several minutes, tried again.  No change.  Several more mins, tried again.  No change.  I then went to the config agents page in QM and did not touch anything.  Went back to realtime and tried monitoring another call and it saw the change.

QM is definitely caching the agent table.  Any way to make it not do that?

I did find this in the config file:

# DO NOT CHANGE
realtime.use_sql_now=false

Now I am curious :)

-Dennis