Upgrade 3CX to v18 and get it hosted free!

Asterisk NetCID

Author image

NetCID is a free network callerid popup program from Imptec and can be used with an AGI script called from Asterisk for talking callerid notification.

NetCID can be downloaded here:

  • NetCID
  • Speech Engine

place the following script in /var/lib/asterisk/agi-bin/

ncid.agi:

  1. !/usr/bin/perl

use Socket;

open STDOUT, ‘>/dev/null’;
fork and exit;

my $timedata = localtime(time);
my $cidnum = $ARGV[0];
my $cidname = $ARGV[1];

my $MSG1 = “STAT Get the Phone!!!”;
my $MSG2 = “RING”;
my $MSG3 = “NAME $cidname”;
my $MSG4 = “TTSN Call from $cidname”;
my $MSG5 = “NMBR $cidnum”;
my $MSG6 = “TYPE U”;
my $MSG7 = “IDLE $timedata”;

my $ipaddr=192.168.0.255;
my $portnum=42685;

socket(SOCKET, PF_INET, SOCK_DGRAM, getprotobyname(“udp”)) or die “socket: $!”;
setsockopt(SOCKET, SOL_SOCKET, SO_BROADCAST, 1) or die “setsockopt: $!\n”;
send(SOCKET, $MSG1, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
send(SOCKET, $MSG2, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
send(SOCKET, $MSG3, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
send(SOCKET, $MSG4, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
send(SOCKET, $MSG5, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
send(SOCKET, $MSG6, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
sleep(5);
send(SOCKET, $MSG2, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
sleep(5);
send(SOCKET, $MSG7, 0, sockaddr_in($portnum,$ipaddr)) or die “cannot send to $HOSTNAME($PORTNO): $!”;
close(SOCKET);
exit;

Next add a line to your extensions.conf:

exten => s,1,NoOp(Call from:${CALLERID(all)})
exten => s,n,AGI(ncid.agi,${CALLERID(num)},${CALLERID(name)})
exten => s,n,Dial(${HOUSEPHONES},,t)
exten => s,n,Hangup

 

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.