Asterisk func callerid

Asterisk func callerid  

2009-11-24 15:21:05|  分类: Asterisk|字号 订阅

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) on ly 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` 

Return value

Returns the resulting string. 

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) 

你可能感兴趣的:(function,service,filter,header,character,deprecated)