login | register
Sun 07 of Sep, 2008 [02:12 UTC]

voip-info.org

History

Asterisk func callerid

Created by: Corydon76,Last modification on Fri 22 of Aug, 2008 [20:35 UTC] by atlantiatech

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)

Notes

  • This function may be both read from and written to.
  • It was previously claimed on this page that Asterisk 1.4 adds items pres and ton. An examination of the source code reveals that these items do not exist.
  • 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)

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)

See also



Comments