[asterisk-users] Contact lookup

OCG Technical Support support at ocg.ca
Tue Feb 3 11:20:33 CST 2009


Have a look at smartCID at www.generationd.com

Uses a simple mySQL database, allows for call blocking flag, reverse CID
lookup, etc.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gordon
Henderson
Sent: February 3, 2009 11:51 AM
To: Asterisk Users List
Subject: Re: [asterisk-users] Contact lookup

On Tue, 3 Feb 2009, Geoff Lane wrote:

> 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.

AstDB:

At it's very simplest:

exten => s,n,Set(CALLERID(name)=Unknown)
exten => s,n,Set(name=${DB(cid/${CALLERID(number)})})
exten => s,n,GotoIf($["${name}" = ""]?endCID)
exten => s,n,Set(CALLERID(name)=${name})
exten => s,n(endCID),Noop(fixCallerID - End of processing - returning
${CALLERID(all)})

... somewhere in the incoming processing. (This is an extract from an 
overly complcated macro I use) Things to check for - a name already being 
present - eg. on an incoming SIP call. No name in the astDB - might want 
to substitute "Unknown" ..

All you need to do now is populate the astDB - I use a web interface and 
some php to drive the manager interface...

My biggest site has just under 300 lookup entries... (Which presents other 
issues with the web interface, but ...)

Gordon


_______________________________________________
-- 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