I gang

Queue Agent Timer Reset When Call Seized

We had a custom AGI script written by a freelancer here which needs a "fix... Via a Asterisk AGI Python script initiated from a web page button, a queue agent can "transfer a caller" into a custom extension. The script works by seizing the active channel from the agent, sending the caller to the custom extension script, and releasing the agent to take another call.

The problem is that when this is done, the queue agent typically gets the "next possible call" in their queue, instead of being placed into the last in line position which would be appropriate under our "leastrecent" ring strategy. After some investigation, we believe that the problem is that the agent's "idle time" timer is not being reset during the call-seizure-and-transfer script, thus Asterisk believes that agent to be idle far longer then is true.

We are running the FreePBX [url removed, login to view] distro with Asterisk 11.4.0.

The contents of the Python script (/var/www/cgi-bin/[url removed, login to view]) used to seize the call is:

==========================================

#!/usr/bin/python

import cgi

import sys

import re

import telnetlib

MANAGER_HOST="127.0.0.1"

MANAGER_PORT="5038"

MANAGER_USER="xxxREDACTEDxxx"

MANAGER_PASSWORD="xxxREDACTEDxxx"

form = [url removed, login to view]()

print "Content-Type: text/plain\n\n"

if "callID" not in form:

print "There is no callid"

[url removed, login to view]()

if "ptID" not in form:

print "There is no ptid"

[url removed, login to view]()

if "agentID" not in form:

print "There is no agentid"

[url removed, login to view]()

callid = [url removed, login to view]("callID")

ptid = [url removed, login to view]("ptID")

agentid = [url removed, login to view]("agentID")

print "Parse the request"

line = agentid

manager = [url removed, login to view]()

[url removed, login to view](MANAGER_HOST, MANAGER_PORT)

[url removed, login to view]("Action: login\n")

[url removed, login to view]("Username: %(MANAGER_USER)s\n" %vars())

[url removed, login to view]("Secret: %(MANAGER_PASSWORD)s\n" %vars())

[url removed, login to view]("Events: off\n\n")

[url removed, login to view]("Action: coreshowchannels\n\n")

events = manager.read_until("CoreShowChannelsComplete").split("Event")

data = 0

for i in events:

if [url removed, login to view]("ConnectedLineNum: %(line)s" %vars(), i):

data = i

if data == 0:

print "No channel up."

[url removed, login to view]()

result = [url removed, login to view]("Channel: (.*)", data)

channel = [url removed, login to view](1)

print channel

[url removed, login to view]("\n")

[url removed, login to view]("Action: redirect\n")

[url removed, login to view]("Channel: %(channel)s\n" %vars())

[url removed, login to view]("Context: ivr\n")

[url removed, login to view]("Exten: s\n")

[url removed, login to view]("Priority: 1\n\n")

[url removed, login to view]("Action: setvar\n")

[url removed, login to view]("Channel: %(channel)s\n" %vars())

[url removed, login to view]("Variable: callid\n")

[url removed, login to view]("Value: %(callid)s\n\n" %vars())

[url removed, login to view]("Action: setvar\n")

[url removed, login to view]("Channel: %(channel)s\n" %vars())

[url removed, login to view]("Variable: agentid\n")

[url removed, login to view]("Value: %(agentid)s\n\n" %vars())

[url removed, login to view]("Action: setvar\n")

[url removed, login to view]("Channel: %(channel)s\n" %vars())

[url removed, login to view]("Variable: ptid\n")

[url removed, login to view]("Value: %(ptid)s\n\n" %vars())

===============================================

There are 2 other files/scripts used for this system (but they are for handling the call after "transfer"):

/etc/asterisk/[url removed, login to view]

/var/lib/asterisk/agi-bin/[url removed, login to view]

We will provide access to copies of our other scripts as needed, but will cannot provide direct access to our PBX due to U.S. Federal privacy regulations. We have competent PBX administrators available to provide support and answer questions about our system as well.

Færdigheder: Asterisk PBX, Python

Se mere: connectedlinenum, web python freelancer, type freelancer username, search freelancer ivr, python web freelancer, python script freelancer, investigation freelancer, freelancer timer, freelancer support form, freelancer secret, freelancer reset, freelancer privacy, freelancer needed event, freelancer login reset, freelancer login problem, freelancer ivr, freelancer event manager, freelancer cgi, freelancer call manager, freelancer call, content manager freelancer, cannot login freelancer, open pbx, freelancer username search, freelancer agent

Om arbejdsgiveren:
( 26 bedømmelser ) Ashland, United States

Projekt-ID: #5999569

Tildelt til:

nttranbao

Hi, I came across your project, and it is really interesting. I also got a link saying similar issue, maybe it's you or others: http://www.freepbx.org/forum/general-help/resetting-queue-agent-idle-time Based on Mere

$350 USD in 5 dage
(34 bedømmelser)
5.4

8 freelancere byder i gennemsnit $568 for dette job

meral

hi this is for sure fixable via queue patching. but for debug need more info like " queue show" output before answer call, on answer, after transfer.

$631 USD in 10 dage
(111 bedømmelser)
7.9
aneelmahmood

Hi, I can understand that you cannot provide access to your production server but can you provide any test server so that I can regenerate the said issue? I have 8 years of voip development experience. I can try Mere

$580 USD in 7 dage
(24 bedømmelser)
6.5
NTechcorporate

Our Python Case Studies: http://pythondevelopmentcompany.com/case_study.html Dear Client I hope you are doing well! We have gone through your requirement and we understand that you are looking for highly sk Mere

$721 USD in 5 dage
(15 bedømmelser)
5.9
EmanuelPeralta

Hello, the best approach to keep updated the last call property of an agent is to directly update Asterisk's internal information. This can be done seamlessly by applying a patch to the code and installing the patched Mere

$550 USD in 4 dage
(7 bedømmelser)
5.0
MikeRRR

Hello, a few words about me: I am a voip/network admin and for sure I can help you. I manage over 300 servers with different purposes: web servers, sql servers, voip servers, filesharing servers, email servers a Mere

$111 USD in 3 dage
(12 bedømmelser)
3.8
dcnoye

A proposal has not yet been provided

$600 USD in 10 dage
(0 bedømmelser)
0.0
krishcompusoft11

Hi this is Deval from KCSPL IT Software Consulting Company". As glad to share further information about our Technological Capabilities, kindly have a look on our Website: http://www.kcspl.co.in We have developed Mere

$1000 USD in 6 dage
(0 bedømmelser)
0.0