login | register
Tue 02 of Dec, 2008 [01:39 UTC]

voip-info.org

History

Setting Callerid

Created by: johnlange,Last modification on Wed 16 of Jul, 2008 [08:47 UTC] by nxnlvz

Set(CALLERID...

Synopsis

 Set(CALLERID(all|name|num|number|ANI|DNID|RDNIS)=_CALLER NAME_<_CALLER NUMBER_>)

Asterisk 1.2 and later- For old usage please see Asterisk cmd SetCallerID

Description

Set Caller*ID on a call to a new value or read the current value.

Options are:

  • all: both caller's name and number like this: Joe Smith <2095551212>
  • name: the caller's name
  • num: the caller's number (without the brackets) * can be used as num or number
  • ANI: Announced Number Identification - the billing number that made the call (this number is usually the same as num, but it can be different)
  • DNID:
  • RDNIS:

Example


 exten => _1NXXNXXXXXX/2100,1,Set(CALLERID(all)=Joe Smith <2095551212>)
 exten => _1NXXNXXXXXX/2101,1,Set(CALLERID(all)=Jane Smith <2095551213>)
 exten => _1NXXNXXXXXX/2102,1,Set(CALLERID(number)=2095551214)
 exten => _1NXXNXXXXXX,n,Dial(Zap/g1/${EXTEN})

This is a fragment of a context for routing outgoing calls. It sends NANP toll calls to Zap/g1 after first setting the outgoing caller ID depending on the calling internal extension number.

Add-ons

Many carriers don't yet pass along CID name (so expect an empty string). Some free add-on modules like smartCID will track this info in a mysql database, and auomatically populate the NAME field for you. As well, smartCID will do a reverse lookup on the 411 web site to find the cid NAME. See www.generationd.com for more info

See also




Comments

Comments Filter
222

333

by rnbguy, Friday 26 of October, 2007 [16:09:36 UTC]
does anyone know how to parse the callerID from one iax trunk to the other, it seems the callerID isnt passed when using one iax2 trunk to dial another iax2 trunk
222

333How to use MySQL to update CallerID Name

by nasirq, Monday 27 of November, 2006 [08:01:34 UTC]
First create a table with at least two fields, Number and Name.

In the dial plan, for 's' extension where incoming calls are coming, or where ever you want to update the CallerID, add:

exten => s,1,MYSQL(Connect connid dbhost dbuser dbpass dbname)
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ name\ from\ directory\ where\ number=\'${CALLERID(num)}\')
exten => s,n,MYSQL(Fetch fetchid ${resultid} TEMP)
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,Set(CALLERID(name)=${TEMP})