最近由于工作需要,需要定制一下呼叫中心的不同分机走不同中继出局的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: