Page 1 of 1

caller ID with FXO

PostPosted: Tue Sep 05, 2006 1:34 pm
by mtancoff
I´m using vici 2.0 now, still having problems with callerID.

Im using agiVDADcloser_inboundCIDlookup.agi

I´ve got vicidial with one port FXO, connected to one port FXS in a trixbox platform.

When I dial "1000" (The extension connected to vici) in an extension of Trixbox, the call enters to vici, and then is transferred to an agent.

The problem is that agents doesn´t receive caller ID neither any other data.

I´ve added this line in vici extensions to verify that asterisk is receiving the callerID:

exten => s,2,verbose(1,Accepting call from \'${CALLERIDNUM}\')

In asterisk console, I can see that asterisk is receiving the callerID sent by Ip-phones connected to trixbox. I´ve tried with callerID 4 digits long and 10 digits long, changing the callerid of my trixbox extension, but it doens´t seem to work.

Thanx!

PostPosted: Tue Sep 05, 2006 2:04 pm
by mflorell
That script expects to see this formatting of the CallerID string:
"callerID name" <3125551212>

How exactly is your callerID variable being formatted?

PostPosted: Tue Sep 05, 2006 2:54 pm
by mtancoff
I´m making a lot of test about this.

I´m kind of confused right now.

If I use agivdad_closerinboundCID the callerID is displayer, the record is inserted in vicidial_list, everithing just fine.

But if I use agivdad_closerinboundCIDlookup, the record is inserted, with a blank phone_number, and (Obviously), the callerID is never shown.

I´ve changed my trixbox extensions callerID to send the format you specified:

3125551212

Post you the output:

-- Executing Ringing("Zap/1-1", "") in new stack
-- Executing Verbose("Zap/1-1", "1|Accepting call from '3125551212'") in new stack
Accepting call from '3125551212'
-- Executing Wait("Zap/1-1", "2") in new stack
== Parsing '/etc/asterisk/manager.conf': Found
Sep 5 16:06:53 NOTICE[11883]: manager.c:575 authenticate: 127.0.0.1 tried to authenticate with nonexistent user 'remote_mgr'
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing AGI("Zap/1-1", "agi-VDADcloser_inboundCIDlookup.agi|CL_ENTRANTES-----7275555134-----Closer-----park----------999-----1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDADcloser_inboundCIDlookup.agi

PostPosted: Tue Sep 05, 2006 2:59 pm
by mflorell
in the servers section of astguiclient/admin.php have your AGI output go to STDERR or BOTH so that you can see the variables as they are defined when the lookup agi script gets the call.

PostPosted: Tue Sep 05, 2006 3:33 pm
by mtancoff
Ok thanx for the tip.

When i use inboundCID get this:
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi|Perl Environment Dump:
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi|0|CL_ENTRANTES-----7275555134-----Closer-----park----------999-----1
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- accountcode =
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- callerid = 3125551212
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- calleridname = 3125551212
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- callingani2 = 0
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- callingpres = 0
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- callingtns = 0
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- callington = 0
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- channel = Zap/1-1
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- context = default
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- dnid = unknown
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- enhanced = 0.0
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- extension = s
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- language = en
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- priority = 5
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- rdnis = unknown
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- request = agi-VDADcloser_inboundCID.agi
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- type = Zap
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi| -- uniqueid = 1157488080.2
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi|AGI Variables: |1157488080.2|Zap/1-1|s|Zap|3125551212|
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi|+++++ INBOUND CALL VDCL STARTED : |CL_ENTRANTES|3125551212-7275555134|2006-09-05 16:28:05
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi||select LAST_INSERT_ID() LIMIT 1;|36|
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi|callerID changed: Y0905162805000000036
2006-09-05 16:28:05|agi-VDADcloser_inboundCID.agi||INSERT INTO vicidial_auto_calls values('','127.0.0.1','CL_ENTRANTES','LIVE','36','1157488080.2','Y0905162805000000036','Zap/1-1','1','3125551212','2006-09-05 16:28:05','IN')|


When use inboundCIDlookup I get:


Executing AGI("Zap/1-1", "agi-VDADcloser_inboundCIDlookup.agi|CL_ENTRANTES-----7275555134-----Closer-----park----------999-----1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDADcloser_inboundCIDlookup.agi
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi|Perl Environment Dump:
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi|0|CL_ENTRANTES-----7275555134-----Closer-----park----------999-----1
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi|AGI Variables: ||||||
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi|+++++ INBOUND CALL VDCL STARTED : |CL_ENTRANTES|-7275555134|2006-09-05 16:29:58
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi||select LAST_INSERT_ID() LIMIT 1;|37|
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi|callerID changed: Y0905162958000000037
2006-09-05 16:29:58|agi-VDADcloser_inboundCIDlookup.agi||INSERT INTO vicidial_auto_calls values('','127.0.0.1','CL_ENTRANTES','LIVE','37','','Y0905162958000000037','','1','','2006-09-05 16:29:58','IN')|

PostPosted: Tue Sep 05, 2006 3:53 pm
by mflorell
Found a bug, line 192 has an "else" sitting there by itself. just delete it and see if that helps.

Updated in SVN 2-X

PostPosted: Tue Sep 05, 2006 4:43 pm
by mtancoff
Oh men it´s just beautifull!

Now it´s working!!!

Sos grosso!! (Means "you are cool" in Buenos Aires slang)

PostPosted: Tue Sep 05, 2006 4:46 pm
by mflorell
Great, thanks for helping to find a bug. Let us know how your setup progresses.

PostPosted: Tue Sep 05, 2006 5:09 pm
by mtancoff
Ok glad to help, so far we´ve tested inbound and outbund, but with one agent only.