[asterisk-users] Contact lookup
Danny Nicholas
danny at debsinc.com
Tue Feb 3 10:24:03 CST 2009
There are some good examples of this at voip-info.org. Shouldn't this be
handled by normal caller-id?
Anyhow, here's an AGI (PERL) example:
#!/usr/local/bin/perl
use Asterisk::AGI;
# the AGI object
my $agi = new Asterisk::AGI;
# send callback reference
my $rc = $agi->set_callerid('IM_A_CALLER');
$agi->say_digits('123');
$agi->send_text('call ext 106');
$agi->exec('Dial', 'SIP/102');
$agi->hangup();
exit;
This sends the message "call ext 106" to the phone display you call from,
says "123" on the speaker, then calls SIP/102 and shows "IM_A_CALLER" on the
display (the _ are there because "IM A CALLER" shows as "IM".
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Geoff Lane
Sent: Tuesday, February 03, 2009 10:05 AM
To: Asterisk Users
Subject: [asterisk-users] Contact lookup
Hi All,
Asterisk 1.4.12 on CentOS 5
I'd like to be able to look up each incoming CLI to retrieve an
associated name, if available, and then pass that to the extensions so
that they can see both the name and number of the caller. I'm not
after LDAP or anything else maintained externally, just a contact
lookup for my system.
I suspect that Astdb could be used for this, as could a relational
database like MySQL or postgres (accessed via AGI?) Probably simpler
would be to maintain a text configuration file since I'm only
concerned about less than a hundred entries initially.
I'd appreciate insight into which is the easiest way to do this, and
also any pointers to tutorials etc.
TIA,
--
Geoff
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list