Guys,

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.

jl

Dan wrote:
Hi,

----- Original Message ----- From: "Jim Paraschou" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
channel.
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





Thanks
Dimitris

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users



_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to