login | register
Tue 09 of Feb, 2010 [17:55 UTC]

voip-info.org

History

Setting Callerid

Created by: johnlange,Last modification on Thu 03 of Dec, 2009 [17:28 UTC] by rdailey79

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) Note: can be used as num or number . You can set your caller ID number to text; just make sure not to use spaces, as you'll have unexpected results!
  • 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: Dialed Number IDentifier
  • RDNIS: Redirected Dialed Number Identification Service

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(num)=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.

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})