asTAPI and IdentaPop Pro showing wrong number

I have the latest version of astTAPI and IdentaPop Pro installed on my workstation. I believe they are setup correctly in that I see the manager register when I load IdentaPop and when a call comes in I get a popup showing a phone number. My problem is that the number shown is my phone line number, not the calling party’s number. I contacted support at IdentaPop and they said it is not their problem, it is my config. I just can’t figure it out. Has anyone gotten this to work?

I telneted into my Asterisk box on the manager port and watched the info fly by when a call comes in. Whew, lots of stuff flys by. Somewhere there is a piece of code that is grabbing the wrong thing flying by. I just can’t find it.

I have exactly the same problem.

And I can’t find any way to solve it. It has to be a problem inside Asttapi, but I’m not able to dig into the source …


Well, it sort of is, and it sort of isn’t. The Asterisk people changed everything on the management part, therefore AsTapi is receiving the wrong info. But, the AsTapi people should be able to adapt I would think. They just haven’t yet. Oh well. Look through the docs on Asterisk, they explain what they changed and there is a Dial option, the letter ‘o’ I think that you can use to make Asterisk act like it used to, which will make AsTapi work again. Supposedly. I never could get it to work tho…

i use YAC and wrote my own AGI to send the callerid (and matching name if it exists in a db) to YAC. works nicely.

Um, are you willing to share this agi??

of course :smiley:

[code]#!/usr/bin/perl -w

this is bbNotify.agi

free to use, don’t abuse.

copyright baconbuttie 2006

use DBI;
use Asterisk::AGI;
use IO::Socket;

my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();

my $debug = 3; # Debug level, lower to reduce logging
my $port=10629; # Always this !!
my $message; # Message depends on ARG3
my $mydata = $ARGV[0]; # Data value to look for
my $keyword = $ARGV[1]; # Keyword to search db for
my $msgtype = $ARGV[2]; # Used to determine message start
my $caller = $ARGV[3]; # CallerID for this notification

#$caller = $AGI->get_variable(‘callerid’);

if ($debug >= 2) {debug("Data = ".$mydata,3);}
if ($debug >= 2) {debug("Keyword = ".$keyword,3);}
if ($debug >= 2) {debug("Message Type = ".$msgtype,3);}
if ($debug >= 2) {debug("CallerID = ".$caller,3);}

if ($debug >= 2) {
foreach $key (keys %input) {
debug("$key = ".$input{$key},3);

get record set ipaddresses for matching keyword/value pairs

my $dbh = DBI->connect(“dbi:mysql:asterisk”,“mysqluser”,“mysqlpassword”) or die(“Connect failed”);
my $query = “SELECT ipaddress AS ipaddress FROM notify WHERE keyword = ‘$keyword’ AND mydata = ‘$mydata’”;
if ($debug >= 2) {debug("Notify Query = ".$query,3);}
my $sth = $dbh->prepare($query) or die(“Couldn’t prepare statement”);
if($sth->rows == 0)
debug(“No Notify Destinations found”,3);
exit 0;
# determine the message we’re sending
if($msgtype eq “1”) {$message = "Home call from : ".$caller;}
elsif($msgtype eq “2”) {$message = "Business call from : ".$caller;}
elsif($msgtype eq “3”) {$message = "Internal call for $mydata from : ".$caller;}
elsif($msgtype eq “4”) {$message = "Group call from : ".$caller;}
elsif($msgtype eq “5”) {$message = "Unused : ".$caller;}
elsif($msgtype eq “6”) {$message = "Unused : ".$caller;}

# go through recordset, sending message to each
while (($ipaddress) = $sth->fetchrow_array) {

print “$ipaddress\n”;

	$socket=IO::Socket::INET->new(PeerAddr=> $ipaddress, PeerPort=> $port, Proto=> 'tcp', Type=> SOCK_STREAM) or die "Can't talk to host";
	print $socket $message;
	close $socket;
exit 1;


sub debug
my $string = shift;
my $level = shift || 3;
if ($debug) {
$AGI->verbose($string, $level);

exit 0;
and i call it with something like

you need a db table to find the ip address of the corresponding extension, but you should be able to work that out ok.

Sorry to soundlike a total dumba$$ here, but Ive been trying so hard to get YAC working with Trixbox and have had no luck.

I have pretty much zero programming background, but I can usually fumble my way through basic things. I have no idea where to start here though.

Can you help me implement your script?

Id kill to get YAC working again for Caller ID lookup!

Any help would be totally greatful!

Thanks for your contribution, and for your time