Author Topic: Outbound with Asterisk 1.6  (Read 24184 times)

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #15 on: March 05, 2010, 11:41:22 »
Do we have to list you as "Non-continnetal support team"?  ;D

But then I would have to answer the hard questions as well ;-)

Wannabe Hero?

-Barry

viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #16 on: March 05, 2010, 15:00:54 »
the real problem is that when the agent logs off, he still is listed as logged in on the wallboard. Here's a few entries on my queue_log:

1267634130|1267634122.11|NONE|Local/101@xagents|AGENTCALLBACKLOGIN|201
1267634130|1267634122.11|q-001|Local/101@xagents|ADDMEMBER|
1267634228|1267634228.12|q-001|Agent/101|ENTERQUEUE|-|21047051|
1267634234|1267634228.12|q-001|Agent/101|CONNECT|6||
1267634247|1267634228.12|q-001|Agent/101|COMPLETECALLER|6|13|
1267634266|1267634260.16|q-001|Local/101@xagents|REMOVEMEMBER|
1267634266|1267634260.16|NONE|Local/101@xagents|AGENTCALLBACKLOGOFF|

Even after that, the agent is still listed as logged in. Any ideas on solving this?

Hi,

The problem is that you are alternating between referring to your aghents as Agent/101 and as Local/101
Queuemetrics by default expects to see Agent/ - that's why it is seeing the agent once they are on a call, but not the login/logoff part.

If you edit configuration.properties and change:
# Rewrites Local/XXX@ext channels in the format Agent/XXX
default.rewriteLocalChannels=false

to
# Rewrites Local/XXX@ext channels in the format Agent/XXX
default.rewriteLocalChannels=true

...you should be good.

Hope this helps.

-Barry


That did the trick. Thanks!

Now my customer wants the agents to log in using the agent's page, in order to enter call outcomes and etc. I also agree that's much easier this way, but that's what happens on the Asterisk CLI when I log in as an Agent and click the Log on button:

 
Code: [Select]
== Manager 'queuemetrics' logged on from 127.0.0.1
    -- Executing [20@queuemetrics:1] Answer("Local/20@queuemetrics-4816;2", "") in new stack
    -- Executing [20@queuemetrics:2] NoOp("Local/20@queuemetrics-4816;2", " "QM: AddQueueMember (asterisk v1.4+) Agent/101 on queue  made by 'Agent/101'" ") in new stack
    -- Executing [20@queuemetrics:3] AddQueueMember("Local/20@queuemetrics-4816;2", ",Local/101@interno") in new stack
[Mar  5 10:52:49] WARNING[4830]: app_queue.c:4739 aqm_exec: Unable to add interface to queue '': No such queue
    -- Executing [20@queuemetrics:4] Hangup("Local/20@queuemetrics-4816;2", "") in new stack
  == Spawn extension (queuemetrics, 20, 4) exited non-zero on 'Local/20@queuemetrics-4816;2'

I used the dialplan provided by Loway. Here's the extension 20 on the context queuemetrics:

Code: [Select]
; extension 20: agent addqueuemember (for asterisk v1.4+)
exten => 20,1,Answer
exten => 20,n,NoOp( "QM: AddQueueMember (asterisk v1.4+) Agent/${AGENTCODE} on queue ${QUEUENAME} made by '${QM_LOGIN}'" )
exten => 20,n,AddQueueMember(${QUEUENAME},Local/${AGENTCODE}@interno)
exten => 20,n,Hangup

Looks like the variable QUEUENAME is not being set. Also, I have specified the agent's extension as 201, and I can't see where that info is used.

Guess I'm doing something very wrong here. Any suggestions?

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #17 on: March 05, 2010, 15:33:27 »

I used the dialplan provided by Loway. Here's the extension 20 on the context queuemetrics:

Code: [Select]
; extension 20: agent addqueuemember (for asterisk v1.4+)
exten => 20,1,Answer
exten => 20,n,NoOp( "QM: AddQueueMember (asterisk v1.4+) Agent/${AGENTCODE} on queue ${QUEUENAME} made by '${QM_LOGIN}'" )
exten => 20,n,AddQueueMember(${QUEUENAME},Local/${AGENTCODE}@interno)
exten => 20,n,Hangup

Looks like the variable QUEUENAME is not being set. Also, I have specified the agent's extension as 201, and I can't see where that info is used.

Guess I'm doing something very wrong here. Any suggestions?


Hi,

Extension 20 is for agent login (at least in the example extensions_queuemetrics.conf supplied) , whereas you appear to be calling the AddMember extension. For agent login $QUEUENAME would not be required, only the following are needed: AGENTCODE and AGENT_EXT and they both get set in my test.

-Barry

viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #18 on: March 05, 2010, 18:22:49 »
You're right. But in the supplied extensions_queuemetrics.conf the original extension 20 is this one:

Code: [Select]
; 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 made by '${QM_LOGIN}'" )
exten => 20,3,AgentCallBackLogin(${AGENTCODE},,${AGENT_EXT}@from-internal)
exten => 20,4,Hangup

And it uses AgentCallBackLogin, which is no longer available on Asterisk 1.6.1.  :( So you're using outbound with Asterisk 1.6 but not logging the agents via their page on QM, is that right?

EDIT: Forgot to add this. So, considering that Asterisk 1.6 has no longer the app AgentCallBackLogin and it appears that QM doesn't set the required variables in order to add dynamically the channel to the queue... all indicates that 1.6 isn't the best choice in this case. As this is my first QM implementation, I hope I'm dead wrong about this.  :)
« Last Edit: March 05, 2010, 18:31:15 by viniciusfontes »

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #19 on: March 05, 2010, 19:14:39 »
You're right. But in the supplied extensions_queuemetrics.conf the original extension 20 is this one:

Code: [Select]
; 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 made by '${QM_LOGIN}'" )
exten => 20,3,AgentCallBackLogin(${AGENTCODE},,${AGENT_EXT}@from-internal)
exten => 20,4,Hangup

And it uses AgentCallBackLogin, which is no longer available on Asterisk 1.6.1.  :( So you're using outbound with Asterisk 1.6 but not logging the agents via their page on QM, is that right?

Yeah that's correct, I am not using the QM agents page presently. It is something I will be adding at some stage. However, I have done my own thing to implement AgentCallBackLogin style functionality using realtime members, and only having the AGENTCODE and AGENT_EXT would suffice.

Can you post your dialplan which agents use to log in? I am sure there is a way to make it work.

Quote
EDIT: Forgot to add this. So, considering that Asterisk 1.6 has no longer the app AgentCallBackLogin and it appears that QM doesn't set the required variables in order to add dynamically the channel to the queue... all indicates that 1.6 isn't the best choice in this case. As this is my first QM implementation, I hope I'm dead wrong about this.  :)

It can be done. I admit the changes in 1.6 caused a lot of headaches to a lot of people. In my case, however, the pain turned out to be worth it because my system now is totally realtime and very efficient.

I intend to document it and make it available, but finding the time is a challenge!

-Barry

viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #20 on: March 05, 2010, 19:21:48 »
Quote
Yeah that's correct, I am not using the QM agents page presently. It is something I will be adding at some stage. However, I have done my own thing to implement AgentCallBackLogin style functionality using realtime members, and only having the AGENTCODE and AGENT_EXT would suffice.

Can you post your dialplan which agents use to log in? I am sure there is a way to make it work.

Well actually this system isn't in production yet. We're installing QM and doing all the testing while the telco doesn't install the DID for the customer. I guess it will take about 15 more days -- that's why I'm considering downgrading to 1.4, as this is a clean install. However, if there's a way to implement that on 1.6 it would be much better, because I'm sure some point in time I'll need to upgrade to an Asterisk version that will no longer have the AgentCallBackLogin app anymore. So it's better to have all the headache while the system isn't in production yet.

I'm using the dialplan written by Loway, available on this topic: http://forum.queuemetrics.com/index.php?topic=728.0

« Last Edit: March 05, 2010, 19:26:25 by viniciusfontes »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Outbound with Asterisk 1.6
« Reply #21 on: March 06, 2010, 08:59:51 »

EDIT: Forgot to add this. So, considering that Asterisk 1.6 has no longer the app AgentCallBackLogin and it appears that QM doesn't set the required variables in order to add dynamically the channel to the queue... all indicates that 1.6 isn't the best choice in this case. As this is my first QM implementation, I hope I'm dead wrong about this.  :)

For 1.6, you would NOT be using AgentcallbackLogin but ADDMEMBER intead.

viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #22 on: March 06, 2010, 21:08:57 »

EDIT: Forgot to add this. So, considering that Asterisk 1.6 has no longer the app AgentCallBackLogin and it appears that QM doesn't set the required variables in order to add dynamically the channel to the queue... all indicates that 1.6 isn't the best choice in this case. As this is my first QM implementation, I hope I'm dead wrong about this.  :)

For 1.6, you would NOT be using AgentcallbackLogin but ADDMEMBER intead.
I know that. That's why I made this post in this same topic: http://forum.queuemetrics.com/index.php?topic=782.msg3324#msg3324. Here I explain that probably some required variables for this to work correcty aren't being set.

If I need to downgrade to 1.4 that's fine, althought I really would like to use 1.6 on my first implementation of QM. All I'm asking for is advice on the best way to accomplish this.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Outbound with Asterisk 1.6
« Reply #23 on: March 08, 2010, 09:48:51 »
No you do not need to downgrade. Just use that.

viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #24 on: March 08, 2010, 17:31:51 »
No you do not need to downgrade. Just use that.

That what?

I have Asterisk 1.6, and it doesn't have AgentCallBackLogin. I want to log on and off the agents using their page on QM. How would I do that?

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Outbound with Asterisk 1.6
« Reply #25 on: March 09, 2010, 09:22:44 »
Simple: you use the ADDMEMBER / REMOVEMEMBER buttons.

You cannot do an AgentCallbackLogin because - of course - it does not exist in Asterisk 1.6.

But the ADDMEMBER  / REMOVEMEMBER option are easier to use than the Asterisk counterparts because they can log you in and out of all queues at once.



viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #26 on: March 09, 2010, 13:07:56 »
EDIT: I tought it was working, but QM is adding Local/[agentnumber]@interno to the queue. [agentnumber] is an invalid extension, the extension the agent currently is at is completely ignored. That makes sense because the agent never logged in, so there's no way to bind an agent number to an extension number. At least, not that I know of.

Also, I can't pause and unpause agents because the commands use the Agent channel, like this:

Code: [Select]
; extension 22: agent pause (with pause code)
exten => 22,1,Answer
exten => 22,2,NoOp( "QM: Pausing Agent/${AGENTCODE} with pause reason '${PAUSEREASON}' made by '${QM_LOGIN}' " )
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} made by '${QM_LOGIN}' " )
exten => 23,3,UnpauseQueueMember(,Agent/${AGENTCODE})
exten => 23,4,Hangup

Any workaround for that?
« Last Edit: March 09, 2010, 13:14:02 by viniciusfontes »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Outbound with Asterisk 1.6
« Reply #27 on: March 10, 2010, 13:00:25 »
Just modify the dialplan supplied so that it works consistently.

 Change PauseQueueMember(,Agent/${AGENTCODE}) to PauseQueueMember(,Local/${AGENTCODE}@interno)

Also on recent systems the System line is not necessary.

viniciusfontes

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Outbound with Asterisk 1.6
« Reply #28 on: March 16, 2010, 15:50:08 »
I gave up with using 1.6. Too much hacking needed and I don't have enough time for that.

Downgraded to 1.4. I want to use the feature where only logged on agents can dial out, but this is happening on the CLI:

Code: [Select]
    -- Executing [021047051@callcenter:1] Goto("SIP/201-00000001", "queuedial-loggedon|00121047051|1") in new stack
    -- Goto (queuedial-loggedon,00121047051,1)
    -- Executing [00121047051@queuedial-loggedon:1] Set("SIP/201-00000001", "QDIALER_QUEUE=q-001") in new stack
    -- Executing [00121047051@queuedial-loggedon:2] Set("SIP/201-00000001", "QDIALER_NUMBER=21047051") in new stack
    -- Executing [00121047051@queuedial-loggedon:3] Set("SIP/201-00000001", "QDIALER_AGENT=Agent/") in new stack
    -- Executing [00121047051@queuedial-loggedon:4] Set("SIP/201-00000001", "QDIALER_CHANNEL=SIP/21047051") in new stack
    -- Executing [00121047051@queuedial-loggedon:5] Set("SIP/201-00000001", "QueueName=q-001") in new stack
    -- Executing [00121047051@queuedial-loggedon:6] MixMonitor("SIP/201-00000001", "Q-q-001-1268750945.1.WAV|b|") in new stack
  == Begin MixMonitor Recording SIP/201-00000001
    -- Executing [00121047051@queuedial-loggedon:7] GotoIf("SIP/201-00000001", "0?qm-queuedial|s|1") in new stack
    -- Executing [00121047051@queuedial-loggedon:8] NoOp("SIP/201-00000001", "Extension 201 is not logged on as agent.") in new stack
    -- Executing [00121047051@queuedial-loggedon:9] Playback("SIP/201-00000001", "agent-loggedoff") in new stack
    -- <SIP/201-00000001> Playing 'agent-loggedoff' (language 'pt_BR')
    -- Executing [00121047051@queuedial-loggedon:10] Congestion("SIP/201-00000001", "") in new stack
  == Spawn extension (queuedial-loggedon, 00121047051, 10) exited non-zero on 'SIP/201-00000001'
  == End MixMonitor Recording SIP/201-00000001


As far as I can tell, it looks like the variable ${AGENTBYCALLERID_${CALLERID(num)}} is null. Was it deprecated, removed from the code or something?

The agent number in this case is 101 and the extension is 201.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Outbound with Asterisk 1.6
« Reply #29 on: March 16, 2010, 18:06:45 »
Why don't you simply change that to ${CALLERID(num), so you'll see calls being made from AGENT/XXX where XXX is the local extension?
Every version of Asterisk is slightly different :-(