[Asterisk-Users] Caller ID from Database

john lawler maillist at tgice.com
Mon Dec 8 08:18:04 MST 2003


You can do the same thing w/ the builtin application LookupCIDName. 
That's exactly what it was designed for.  You just store the information 
in database family 'cidname' and use it the same way.  Search the 
archive or google for examples.


Dan wrote:
> Hi,
> ----- Original Message ----- 
> From: "Jim Paraschou" <algogr at yahoo.com>
> To: <asterisk-users at lists.digium.com>
> Sent: Saturday, December 06, 2003 8:13 PM
> Subject: [Asterisk-Users] Caller ID from Database
>>Hi all,
>>Does anybody know a way to set callerid to a channel
>>by searching the incoming cid to a database and return
>>the name of the caller and set the callerid to the
>>I tried it with agi script in C but the problem is
>>that agi command SET CALLERID did not work for me with
>>a variable.
>>What i mean is that printf("SET CALLERID 123<JIM>")
>>for example works fine printf("SET CALLERID %s",clid)
>>where clid is a string variable does not work.
>>Anyone can help?
> I use a very simple workaround with the internal Asterisk database.
> This is the context for the incoming calls on X100P:
> [incoming]
> exten => s,1,Answer
> exten => s,2,Ringing
> exten => s,3,DBget(CIDTMP=phonebook/${CALLERIDNUM})
> exten => s,4,SetCallerID(${CALLERIDNUM})
> exten => s,5,SetCIDNAME(${CIDTMP})
> exten => s,6,Dial(..
> To add records use something like that from the * console:
> database put phonebook 2530123 MyHome
> It works perfect for me ( I do not have a very large database)
> Best regards,
> Dan
>>Do you Yahoo!?
>>New Yahoo! Photos - easier uploading and sharing.
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users

More information about the asterisk-users mailing list