[Asterisk-Users] Realtime queues with Firebird SQL through unixodbc

Eric Piros eric at optimum-source.com
Wed Feb 22 05:14:18 MST 2006


Hello,

I have a partially working Realtime Queue using unixODBC and Firebird. I 
followed the steps on asterisk-guru and the voip-info asterisk message 
boards but have been having no success.

I say that my queue is partially working because callers can join the 
queue. However the calls do not go to the agents even if the agent is 
not tied up and is available for calls. So the caller is stuck in the 
queue forever.

Here is some information about my setup:
Computer - Dell Poweredge 1400 (2 X P3 @ 866MHz with 1GB RAM)
Linux Distro - CentOS 4.2
Kernel - 2.6.9-22.0.1.ELsmp
Asterisk Version - 1.2.4
unixODBC version - 2.2.9-1
Firebird Super Server version - 1.5.3
Firebird ODBC driver version - 1.2.0.69

Here is my CLI output during the call:
-- Executing Answer("IAX2/117-14", "") in new stack
-- Executing Queue("IAX2/117-14", "tsupport|hH") in new stack
-- Started music on hold, class 'default', on channel 'IAX2/117-14'
Feb 9 18:15:44 WARNING[32567]: channel.c:2535 ast_request: No channel 
type registered for ''
-- Stopped music on hold on IAX2/117-14
-- Playing 'queue-youarenext' (language 'en')
-- Registered IAX2 '123' (AUTHENTICATED) at 192.168.0.111:4569
-- Told IAX2/117-14 in tsupport their queue position (which was 1)
-- Playing 'queue-thankyou' (language 'en')
-- Started music on hold, class 'default', on channel 'IAX2/117-14'

-Nothing wrong here aside from getting a warning (which should not be 
there in the first place).

I check if realtime is loading properly so I do a realtime load:
 > realtime load queues name tsupport
Column Name Column Value
-------------------- --------------------
NAME tsupport
MUSICONHOLD default
ANNOUNCE technical-support
TIMEOUT 5
MONITOR_JOIN 1
MONITOR_FORMAT gsm
ANNOUNCE_FREQUENCY 60
ANNOUNCE_ROUND_SECONDS 0
ANNOUNCE_HOLDTIME once
RETRY 2
WRAPUPTIME 0
SERVICELEVEL 30
STRATEGY random
JOINEMPTY strict
LEAVEWHENEMPTY no
EVENTMEMBERSTATUS 1
EVENTWHENCALLED 1
REPORTHOLDTIME 1
MEMBERDELAY 2

I check my members:
 > realtime load queue_members queue_name tsupport
Column Name Column Value
-------------------- --------------------
QUEUE_NAME tsupport
INTERFACE Agent/1000

I check the queues:
 > show queues
tsupport has 0 calls (max unlimited) in 'random' strategy (0s holdtime), 
W:0, C:0, A:4, SL:0.0% within 30s
Members:
(Invalid) has taken no calls yet
No Callers

-this shows that I have invalid members despite having agent 1000 logged 
on (using AgentLogin app).

I think this has something to do with how I setup the datatypes for my 
queus and queue member tables as I have no problems having asterisk save 
my CDR through unixODBC with firebird nor does my iax peers/users table 
have any problems either.

Below is how I set up my queues_table and queue_member_table:
CREATE TABLE queue_table (
name VARCHAR(128) NOT NULL PRIMARY KEY,
musiconhold VARCHAR(128),
announce VARCHAR(128),
context VARCHAR(128),
timeout NUMERIC(11,0),
monitor_join SMALLINT,
monitor_format VARCHAR(128),
queue_youarenext VARCHAR(128),
queue_thereare VARCHAR(128),
queue_callswaiting VARCHAR(128),
queue_holdtime VARCHAR(128),
queue_minutes VARCHAR(128),
queue_seconds VARCHAR(128),
queue_lessthan VARCHAR(128),
queue_thankyou VARCHAR(128),
queue_reporthold VARCHAR(128),
announce_frequency NUMERIC(11,0),
announce_round_seconds NUMERIC(11,0),
announce_holdtime VARCHAR(128),
retry NUMERIC(11,0),
wrapuptime NUMERIC(11,0),
maxlen NUMERIC(11,0),
servicelevel NUMERIC(11,0),
strategy VARCHAR(128),
joinempty VARCHAR(128),
leavewhenempty VARCHAR(128),
eventmemberstatus SMALLINT,
eventwhencalled SMALLINT,
reportholdtime SMALLINT,
memberdelay NUMERIC(11,0),
weight NUMERIC(11,0),
timeoutrestart SMALLINT
);

CREATE TABLE queue_member_table (
queue_name varchar(100) NOT NULL,
interface varchar(100) NOT NULL,
penalty NUMERIC(11,0),
PRIMARY KEY (queue_name, interface)
);

I am having problems with creating the queue_member_table. Using 
varchar(128) as listed on both the asteriskguru and voip-info websites 
results with firebird telling me a 'key size too big for index' error. 
setting the size to 100 eliminates this problem and creates the table 
properly.

-- 
Best Regards,
Eric Piros
Optimum Source Inc.
e-mail: eric at optimum-source.com
msn: ericpiros at hotmail.com
ym: ericpiros
aol: ericpiros
icq: 273509181
ph: +63(2)-9149999 ext 109





More information about the asterisk-users mailing list