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) 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值