文档章节

Asterisk管理界面FreePBX关于中继出局主叫CID的设置分析

武汉赢卓通讯
 武汉赢卓通讯
发布于 2013/07/20 17:27
字数 1066
阅读 501
收藏 0

最近由于工作需要,需要定制一下呼叫中心的不同分机走不同中继出局的CID,于是系统的分析了一下FreePBX出局CID的变化流程,做一下学习笔记!

熟悉asterisk拨号计划的人都知道,影响主叫的dialplan函数是 CALLERID(all) 或者CALLERID(num) ,下面我们结合一下FreePBX的呼出流程,跟踪一下呼叫出局后cid的变化

1)两台asterisk服务器,A服务器192.168.1.69 ,B服务器192.168.1.82 ,建立一条从B服务器到A服务器的SIP中继,中继名为 to69 ,那么B服务器的分机802 可以通过路由(路由匹配前缀69),最终以Dial(SIP/to69/808)的方式拨号到A服务器的分机808了。B服务器的CLI 输出如下:

  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [69808@from-internal:1] Macro("SIP/802-0000000d", "user-callerid,SKIPTTL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/802-0000000d", "AMPUSER=802") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/802-0000000d", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/802-0000000d", "1?Set(REALCALLERIDNUM=802)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/802-0000000d", "AMPUSER=802") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/802-0000000d", "AMPUSERCIDNAME=802") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/802-0000000d", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/802-0000000d", "AMPUSERCID=802") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/802-0000000d", "CALLERID(all)="802" <802>") in new stack
    -- Executing [s@macro-user-callerid:9] ExecIf("SIP/802-0000000d", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:10] GotoIf("SIP/802-0000000d", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] Set("SIP/802-0000000d", "CALLERID(number)=802") in new stack
    -- Executing [s@macro-user-callerid:20] Set("SIP/802-0000000d", "CALLERID(name)=802") in new stack
    -- Executing [s@macro-user-callerid:21] NoOp("SIP/802-0000000d", "Using CallerID "802" <802>") in new stack
    -- Executing [69808@from-internal:2] NoOp("SIP/802-0000000d", "Calling Out Route: to69") in new stack
    -- Executing [69808@from-internal:3] Set("SIP/802-0000000d", "MOHCLASS=default") in new stack
    -- Executing [69808@from-internal:4] Set("SIP/802-0000000d", "_NODEST=") in new stack
    -- Executing [69808@from-internal:5] Macro("SIP/802-0000000d", "record-enable,802,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/802-0000000d", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("SIP/802-0000000d", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("SIP/802-0000000d", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,15)
    -- Executing [s@macro-record-enable:15] GotoIf("SIP/802-0000000d", "0?IN") in new stack
    -- Executing [s@macro-record-enable:16] ExecIf("SIP/802-0000000d", "1?MacroExit()") in new stack
    -- Executing [69808@from-internal:6] Macro("SIP/802-0000000d", "dialout-trunk,4,808,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/802-0000000d", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/802-0000000d", "0?sub-pincheck,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/802-0000000d", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/802-0000000d", "DIAL_NUMBER=808") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/802-0000000d", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/802-0000000d", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/802-0000000d", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/802-0000000d", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/802-0000000d", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/802-0000000d", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/802-0000000d", "0?Set(CALLERPRES()=)") in new stack  ##影响CID的宏
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/802-0000000d", "0?Set(REALCALLERIDNUM=802)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/802-0000000d", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/802-0000000d", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/802-0000000d", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/802-0000000d", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/802-0000000d", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/802-0000000d", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/802-0000000d", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/802-0000000d", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/802-0000000d", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/802-0000000d", "0?sub-flp-4,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/802-0000000d", "OUTNUM=808") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/802-0000000d", "custom=SIP/to69") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/802-0000000d", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/802-0000000d", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/802-0000000d", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/802-0000000d", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/802-0000000d", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:20] Dial("SIP/802-0000000d", "SIP/to69/808,300,") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/to69/808
    -- SIP/to69-0000000e is ringing
    -- SIP/to69-0000000e is ringing
elastix82*CLI> 
Disconnected from Asterisk server
[root@elastix82 ~]# 
如下:

中继处改变cid的设置,体现在freepbx的如下地方

分机出改变cid的设置如下

© 著作权归作者所有

武汉赢卓通讯
粉丝 4
博文 7
码字总数 6418
作品 0
武汉
架构师
私信 提问
如何构建VoIP实现电话诈骗——Asterisk的设置

         Asterisk的介绍   在我早期进行渗透测试工作时,我的其中一个任务便是找到那些被“wardialing”技术攻击的调制解调器。20世纪80年代,黑客使用了一种叫做“wardialing”的技...

嘶吼RoarTalk
2018/05/30
0
0
如何构建VoIP来是实现电话诈骗之——Asterisk的设置

Asterisk的介绍 在我早期进行渗透测试工作时,我的其中一个任务便是找到那些被“wardialing”技术攻击的调制解调器。20世纪80年代,黑客使用了一种叫做“wardialing”的技术,在调制解调器上...

技术小能手
2018/05/30
0
0
FreePBX进入界面的问题

freePBX的界面进入不了 是tomcat的界面 (我机子上装了tomcat的),请问怎么解决啊 ,求高手 安装提示信息 Checking for PEAR DB..OK Checking for PEAR Console::Getopt..OK Using usernam...

zsuperstar
2011/06/24
2.5K
3
技术讨论 构建一个小巧的来电显示迷惑工具

  *严正声明:本文仅用于技术探讨,严禁用于其他非法途径。   Asterisk介绍   记得在我刚入行安全行业的初期阶段,我便接手了一项非常棘手的任务。一个客户想要测试他们的电话网络是否...

FreeBuf
2018/06/08
0
0
在pcduino上构建自己的电话局–voip服务器

现在大家有时会收到电信运营商的推销短信,例如什么彩铃5月每月,一些收费服务。 这里给大家介绍一个开源项目,在pcduino实现免费的电话局,可以在这个电话局上实现彩铃,电话转接,来电显示...

pc朵拉
2013/07/03
0
0

没有更多内容

加载失败,请刷新页面

加载更多

Java的线程同步和并发问题示例

并发问题 多线程是一个非常强大的工具,它使我们能够更好地利用系统的资源,但我们需要在读取和写入多个线程共享的数据时特别小心。 当多个线程尝试同时读取和写入共享数据时,会出现两种类型...

hiuh
今天
1
0
Spring Boot 常用注解说明

实体类 @Entity (实体类注解) @Table(可指定表名) @Data(可缺省get/set) @Id (指定属性主键) @GeneratedValue(指定主键生成规则)

兜兜毛毛
今天
3
0
局域网能互相ping通,ubuntu虚拟机不能上外网

【问题】 桥接模式老是无法上网,查看本机IP发现被分配了一个私网地址,猜测应该是虚拟DHCP服务器没有打开,于是查看Ubuntu的网络配置: /etc/network/interfaces 发现没有dhcp配置的信息,只...

tahiti_aa
今天
2
0
以太坊助记词PHP开发包简介

以太坊助记词PHP开发包用来为PHP以太坊应用增加助记词和层级确定密钥支持能力。下载地址:以太坊助记词php开发包 。 1、开发包概述 以太坊助记词PHP开发包主要包括以下特性: 生成符合BIP39...

汇智网教程
昨天
2
0
系统监控-分布式调用链Skywalking

1. 为什么要使用分布式调用链技术? 随着公司业务的高速发展,公司服务之间的调用关系愈加复杂,如何理清并跟踪它们之间的调用关系就显的比较关键。线上每一个请求会经过多个业务系统,并产生...

秋日芒草
昨天
6
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部