登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

baikgd的博客

技术是工具,生活是目的,更好的生活是目标!

 
 
 

日志

 
 

Asterisk func callerid  

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

  下载LOFTER 我的照片书  |

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`

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)
  评论这张
 
阅读(818)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018