login | register
Sat 05 of Jul, 2008 [02:49 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Samuel, Thu 03 of Jul, 2008 [13:41 UTC]: ok thank you
  • Mats Karlsson, Thu 03 of Jul, 2008 [13:37 UTC]: Nice Samuel, will look forward to rad it.
  • bwl_fernstudent, Thu 03 of Jul, 2008 [09:08 UTC]: Your blog shows some usefull code
  • Samuel, Thu 03 of Jul, 2008 [08:04 UTC]: I'll translate it, for sure
  • Mats Karlsson, Wed 02 of Jul, 2008 [20:46 UTC]: LOL, in french! Translate it to English and I will read it.
  • Samuel, Wed 02 of Jul, 2008 [08:07 UTC]: Hello, i wrote a blog about Asterisk, speaking about installation,programming and more http://sambranche.blogspot.com/
  • Nick Barnes, Tue 01 of Jul, 2008 [17:46 UTC]: Steve - Asterisk doesn't 'fit into linux' - it's an application which runs on top of Linux.
  • Steve, Mon 30 of Jun, 2008 [18:07 UTC]: anyone know where I can find a block diagram of how asterisk fits into linux. my f'ing bosses want me to draw something up.. ugh.
  • akbar, Fri 27 of Jun, 2008 [10:37 UTC]: marley_boyz@yahoo.com how to configure call forward, call back, call pick up using TDM and asterisk 1.2.13... please help me.. thx...
  • Matthew Williams, Tue 24 of Jun, 2008 [22:37 UTC]: We are looking for Tier II VoIP Support Technicians in St Louis. Send resumes to mwilliams AT voxitas DOT com.
Server Stats
  • Execution time: 0.42s
  • Memory usage: 2.60MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 0.37

Asterisk cmd LookupCIDName

Synopsis:

 Look up CallerID Name from local database

Description:

 LookupCIDName

Looks up the Caller*ID number on the active channel in the Asterisk database (family 'cidname') and sets the Caller*ID name. Does nothing if no Caller*ID was received on the channel. This is useful if you do not subscribe to Caller*ID name delivery, or if you want to change the names on some incoming
calls.

Examples

 exten => s,X,LookupCIDName
 

CLI command for storing CID names:

 database put cidname 12345 "John Smith"

CLI command for listing CID names:

 database show cidname

Using Trixbox / FreePBX with Third Party Caller Name Lookup Scripts


This is the original caller-id macro used by FreePBX (v 2.1.2)

[macro-user-callerid]
exten => s,1,GotoIf($["${CHANNEL:0:5}" = "Local"]?report)
exten => s,n,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten => s,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?report)
exten => s,n,Set(CALLERID(all)=${AMPUSERCIDNAME} <${AMPUSER}>)
exten => s,n(report),NoOp(Using CallerID ${CALLERID(all)})

exten => s,n,GotoIf($["${CALLERID(name)}" != ""]?done)
exten => s,n,AGI(callerid_shell.agi|${CALLERIDNUM})
exten => s,n,NoOp(AGI Returned ${lookupname})
exten => s,n,Set(CALLERID(name)=${lookupname})
exten => s,n(done),NoOp(Callerid Lookup Complete)

The second paragraph of code will kick in if no Caller Name has been set,
perform the lookup and return it. I've used the following script (also linked below) to do this. Just place the
second block of code below the existing macro-user-callerid section.




As an alternative, you can use the smartCID script (available at www.generationd.com). This script can do callerid lookup from a local MYSQL database, but can also go out to websites like 411.com and do a reverse phone lookup to get the caller's name and address. This script also offers a call screening field - usefull!


See also



Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Created by oej, Last modification by chandave on Fri 12 of Oct, 2007 [07:37 UTC]

Comments Filter

Works Great

by Kevin Stephenson on Tuesday 08 of November, 2005 [02:20:27 UTC]
This works great. I had my caller ID customized in no time. Well it took a little time to figure out where to put in the database commands but I finally found that "asterisk -r" from the console or ssh will get you where you can do that. Maybe this will help future users on this page.

by bzly2000 on Tuesday 01 of November, 2005 [18:39:21 UTC]
It took awhile to figure this one out! I had used a text file (containing number and name) to feed a perl script to load cidname entries into the * database. Then I used LookupCIDName in extensions.conf to populate the caller id name. Everything worked fine. However, after externally generating the number/name text file and updating the cidname entries with the file and perl script, I could no longer answer a call on a Polycom IP 500 phone. The call would show on the display with the caller's name, but you couldn't answer it. The problem was that I had accidently embedded a linefeed in the name data. This extra data in the caller id name prevented the phones from answering an incoming call (where LookupCIDName had updated the cidname).

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver