Search:
Asterisk func callerid
Synopsis:
CALLERID(<item>)Description:
CALLERID(<item>)The allowed values for <item> are:
- name: alphanumeric string
- num or number: number at which caller prefers to be called back (digits only in the POTS/ISDN world)
- all: a Caller*ID string with the number specified between angle-brackets, e.g. "Some User <123>"
- ani: "automatic number identifaction" - billing number (digits only in the POTS/ISDN world)
- dnid: dialed number (digits only in the POTS/ISDN world), don't confuse with DNIS
- rdnis: redirected dialed number information service (digits only in the POTS/ISDN world)
- pres: call presentation/screening (textual representation, 1.6)
- ton: type of number (digits only, 1.6)
Notes
- This function may be both read from and written to.
- ton can be 0(unknown — i.e., includes dial prefixes), 1(international), 2(national), 4(subscriber)
- number is deprecated and doesn't work in 1.6.
- CALLERID(num) and CALLERID(name) control the parts of the SIP address before the @ in the 'From' header under normal conditions.
- AASTRA CID BUG: Setting CID (under sip.conf) to something other than the default (asterisk) with spaces in it (ex: Unknown Caller) when no CID is available will cause asterisk to Dial the Aastra phone, but it will not "ring".(tested with 480i ct firmware 1.4.2.3000)
ISDN (Q.931) only permits ASCII characters (more precisely: the IA5 character set) as CallerID name, see also the FILTER function. If indeed you would like to present special characters on an IP phone's display you will most probably have to turn to UTF-8 enconding:
NAME=`echo $NAME | iconv -f ISO-8859-1 -t UTF-8`
Upgrading to Asterisk 1.4
The behavior of the "clid" field of the CDR has always been that it willcontain the callerid ANI if it is set, or the callerid number if ANI was not
set. When using the "callerid" option for various channel drivers, some
would set ANI and some would not. This has been cleared up so that all
channel drivers set ANI. If you would like to change the callerid number
on the channel from the dialplan and have that change also show up in the
CDR, then you *must* set CALLERID(ANI) as well as CALLERID(num).
Example
; Retrieve the Caller*ID string and save it off for later use
exten => s,1,Set(CallerIDString=${CALLERID(all)})
; Set our Caller*ID before we dial out
exten => s,1,Set(CALLERID(name)=Asterisk PBX)
See also
- RDNIS
- DNID
- ANI
- P-Asserted-Identity and Remote-Party-ID header
- Asterisk variables
- Asterisk functions
- Asterisk - documentation of application commands
Created by: Corydon76,Last modification on Fri 05 of Mar, 2010 [15:50 UTC] by JustRumours

Page Changes

