Author Topic: QM 1.4 and Trixbox 2.6.1  (Read 31456 times)

Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
QM 1.4 and Trixbox 2.6.1
« on: May 06, 2008, 15:18:03 »
Hi,

I am trying to evaluate QM with Trixbox 2.6.1. I have followed the instructions but dynamic agents do not appear to be able to login or logout using either by dialing 298 (your call cannot be completed as dialed) or through the web page.

Is there a problem with this version of trixbox or do I need updated instructions?

TIA

Nic

Wessel

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #1 on: May 06, 2008, 22:54:59 »
Looks like you did not include the context of the login/logout of the agents in your dial plan

Wessel

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #2 on: May 07, 2008, 10:13:03 »
Yes you're surely missing the implementing logic.

Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #3 on: May 07, 2008, 12:17:32 »
Wessel/QueueMetrics,

Unfortunately I have no idea what you are talking about. I am new to Trixbox and QM.

I have installed TB and QM following the QM_Trixbox_210.pdf from the Loway website.

I have created agents (although I didn't have an agents.conf file in the directory so have created it - maybe this is the issue?)

I have created a queue.

I have added all the lines to the configuration files as detailed:

#include extensions_queuemetrics.conf

[from-internal-custom]
exten => 298,1,AgentCallBackLogin(||@from-internal)

I copied the queuemetrics-extension.conf to the etc\asterisk directory and modified it so @sip reads @from-internal for extension 20.

I've made the changes to the queuemetrics.properties file as detailed.

 but agents cannot login or out through phone or website.

What else do I need to do to add the login/logout of agents to my dial plan - sorry you will have to give 'idiot' steps as I am a newbie and assumed (obviously my error) that the instructions would cover everything I needed.

I have no idea where to go from here so any help gratefully received.

Thanks again

Nic

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #4 on: May 08, 2008, 13:21:46 »
Looks like the correct procedure. Of course it it does not work, something is missing. You should try the following:

1.  Open the Asterisk CLI with high verbosity, eg asterisk -rvvvvvvv
2. Try and run the logoin form QM
3. Post here what happened on the CLI


Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #5 on: May 08, 2008, 13:52:19 »
QM - here is what happened in the CLI:

  == Parsing '/etc/asterisk/manager.conf': Found
  == Parsing '/etc/asterisk/manager_additional.conf': Found
  == Parsing '/etc/asterisk/manager_custom.conf': Found
  == Manager 'admin' logged on from 127.0.0.1
    -- Executing [20@queuemetrics:1] Answer("Local/20@queuemetrics-b2c3,2", "") in new stack
    -- Executing [20@queuemetrics:2] NoOp("Local/20@queuemetrics-b2c3,2", " "QM: Logging on Agent/5000 to extension 100@from-internal" ") in new stack
  == Spawn extension (queuemetrics, 20, 3) exited non-zero on 'Local/20@queuemetrics-b2c3,2'
       > Channel Local/20@queuemetrics-b2c3,1 was answered.
    -- Executing [10@queuemetrics:1] Answer("Local/20@queuemetrics-b2c3,1", "") in new stack
    -- Executing [10@queuemetrics:2] Wait("Local/20@queuemetrics-b2c3,1", "10") in new stack
  == Spawn extension (queuemetrics, 10, 2) exited non-zero on 'Local/20@queuemetrics-b2c3,1'
  == Manager 'admin' logged off from 127.0.0.1

The login page still said 'Agent/5000: Agent status cannot be determined' and dialing into the queue produced the 'no agents' message I had setup.

Thanks again

Nic

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #6 on: May 08, 2008, 18:00:35 »
    -- Executing [20@queuemetrics:2] NoOp("Local/20@queuemetrics-b2c3,2", " "QM: Logging on Agent/5000 to extension 100@from-internal" ") in new stack
  == Spawn extension (queuemetrics, 20, 3) exited non-zero on 'Local/20@queuemetrics-b2c3,2'

I see that it goes to step 3 and logs nothing. Can you post the modified queuemetrics-extension.conf?

Also please post the response of the CLI command show agents.

Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #7 on: May 09, 2008, 10:23:47 »
QM,

Ok ran the asterisk CLI (asterisk -r) and then typed 'show agents' - got the response 'No such command 'show agents'.  Is this what I was supposed to do (sorry as I said I'm a newbie at this).

queuemetrics-extension.conf looks like:

;
; ================================================================
; The following dialplan context is used by QueueMetrics
; through the manager API.
; - $Id: extensions_queuemetrics.conf,v 1.2 2007/07/30 15:43:55 lenz Exp $
;
; You should modify it to fit your system.
;
; To enable this file, copy it to /etc/asterisk
; and add the line:
;   #include extensions_queuemetrics.conf
; at the end of  your extensions.conf file.
; ================================================================
;


[queuemetrics]
; extension 0 is a dummy end point
exten => 10,1,Answer
exten => 10,2,Wait(10)
exten => 10,3,Hangup

; extension 11 makes remote monitoring possible
exten => 11,1,Answer
exten => 11,2,NoOp( "QM_AGENT_CODE: ${QM_AGENT_CODE}" )
exten => 11,3,NoOp( "QM_EXT_MONITOR: ${QM_EXT_MONITOR}" )
exten => 11,4,NoOp( "QM_AGENT_EXT: ${QM_AGENT_EXT}" )
exten => 11,5,ChanSpy(${QM_AGENT_CODE})
exten => 11,6,Hangup

; extension 12: set call status code
exten => 12,1,Answer
exten => 12,2,NoOp( "QM: Setting call status '${CALLSTATUS}' on call '${CALLID}' for agent '${AGENTCODE}'" )
exten => 12,3,System( echo "${EPOCH}|${CALLID}|NONE|Agent/${AGENTCODE}|CALLSTATUS|${CALLSTATUS}" >> /var/log/asterisk/queue_log )
exten => 12,4,Hangup

; extension 20: agent callback login
;               For this to work, there must be no password on the agent.
exten => 20,1,Answer
exten => 20,2,NoOp( "QM: Logging on Agent/${AGENTCODE} to extension ${AGENT_EXT}@from-internal" )
exten => 20,3,AgentCallBackLogin(${AGENTCODE}||${AGENT_EXT}@from-internal)
exten => 20,4,Hangup

; extension 21: agent callback logoff
exten => 21,1,Answer
exten => 21,2,NoOp( "QM: Logging off Agent/${AGENTCODE}" )
exten => 21,3,System(asterisk -rx "agent logoff Agent/${AGENTCODE}")
exten => 21,4,Hangup

; extension 22: agent pause (with pause code)
exten => 22,1,Answer
exten => 22,2,NoOp( "QM: Pausing Agent/${AGENTCODE} with pause reason '${PAUSEREASON}' " )
exten => 22,3,PauseQueueMember(|Agent/${AGENTCODE})
exten => 22,4,System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/${AGENTCODE}|PAUSEREASON|${PAUSEREASON}" >> /var/log/asterisk/queue_log )
exten => 22,5,Hangup

; extension 23: agent unpause
exten => 23,1,Answer
exten => 23,2,NoOp( "QM: Unpausing Agent/${AGENTCODE} " )
exten => 23,3,UnpauseQueueMember(|Agent/${AGENTCODE})
exten => 23,4,Hangup


; --------------------------------------------------------------------
; $Log: extensions_queuemetrics.conf,v $
; Revision 1.2  2007/07/30 15:43:55  lenz
; Bug #173: default compatibili con TrixBox.
;
; Revision 1.1  2007/06/18 13:30:24  lenz
; Prima versione.
;
;
;


Thanks again

Nic

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #8 on: May 10, 2008, 09:00:28 »
Looks like your system is not default-loading Agent channels, so when it tries to login  Agent/5000 it crashes because it knows not of Agent/... channels.

Try this:

Code: [Select]
module unload chan_agent.so
module load chan_agent.so

and see if after that the commands agent show or show agents work.

Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #9 on: May 12, 2008, 11:34:28 »
I'm assuming you wanted me to do this from the asterisk CLI? If so then:

module unload chan_agent.so
  == Unregistered channel type 'Agent'

module load chan_agent.so
-bash: module: command not found

Nic

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #10 on: May 13, 2008, 10:55:31 »
Ok - can you restart and check if the AgentCallBackLogin command is present?

Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #11 on: May 13, 2008, 12:19:39 »
Ok   - so that seems to have fixed a lot of problems - I should have know to reboot !

So:

Now I can logon / logoff as an agent by dialing 298 and following the prompts.

I can logoff, pause and unpause through the website but I cannot logon?

Almost there ....

Nic

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #12 on: May 15, 2008, 11:15:15 »
Well you're almost there :)
Are you sure that the CONTEXT you specify in order to logon is correct? Try setting max verbose and logging on and post here what is shown on the CLI....

Nic65535

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: QM 1.4 and Trixbox 2.6.1
« Reply #13 on: May 29, 2008, 10:18:18 »
Loway,

Just wanted to report back that the login error was mine - I had not read the 'no password' instruction when creating agents. I have now removed my agent password(s) and it looks as if I have it working !!!!

Thanks for all your help - the magic was to reset Asterisk rather than to rely on the config reload.

Looking forward to getting this trial up and running and seeing how the rest of it pans out.

Thanks again for the help.

Nic

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: QM 1.4 and Trixbox 2.6.1
« Reply #14 on: May 29, 2008, 11:11:47 »
That's good, thanks for letting us know the problems were solved!