Telco Bridge cli tools analyze

  • Most important is :  CliContext , look at the code  (in TB640\tb2.8.63\src\libraries\tbxclitools\tbx_cli_tools_private.h)


this struct include another import struct TBX_CLI_TOOLS_INIT_PARAMS


  • initialize in function “TBX_RESULT TbxCliToolsInit ”  in  file “tbx_cli_tools.c”

other modules first include “tbx_cli.h”  and “tbx_cli_tools.h” ,   then  initial TBX_CLI_TOOLS_INIT_PARAMS  ,  then  call TbxCliToolsInit  to  init cli tools

One example is  tb_watchdog.c 

  • How to switch display buffer

create a command lin update thread   :  TbxCliToolsCliThread   in  file “tbx_cli_tools.c”

in this thread , switch buffer like this code show


the thread is created in function  “TbxCliToolsStart”    in  file “tbx_cli_tools.c”

in this thread ,  call “TBXCliToolsLine_fprintf”   ——->  “TBXCli_fprintf”  to actually print on the screen

  • TbxCliToolsStart is supply for invoke by out of lib


  • 各文件分析:

tbx_cli.c  :  全是函数, 比如清屏,cursor移动到最开始的位置等

tbx_cli_tools.c :

最重要的函数是 : TbxCliToolsCliThread , 这是一个线程函数, 不停的在双缓存之间切换


  • 常用函数

TBXCliHome  : 设置 cursor位置回点 (0,0)

  • 光标位置


  • 如何响应键盘事件



  • 如何改变提示文本,并让用户选择yes no



in cctb1 , add pack callflow to existing ree-idd callflow

  •  new add files :  DB_Pack.hpp , DB_Pack.cpp ,CVHPack.hpp, CVHPack.cpp


  • modify files :  CSimpleCall.hpp (用本地文件覆盖)

CSimpleCall.cpp  (需特别注意在 cctb1 ,

mCommParams.mun16TbxGwPort =12360;     本地是  mCommParams.mun16TbxGwPort = 12358; )


DB.hpp +  DB.cpp 用本地代码覆盖


CVHCallFlow.cpp 的这句注释掉


outgoing call ‘s codec use g711 

  • 保持不变 :  CVHCCloud.hpp ,   CVHCCloud.cpp


  • TBConfig.txt 的修改




2018-6 To do list

  •  globle <–> csl callflow online  (当前只存在于 cctb1 ,cctb2 没有)

6月21 号 globe will ready , 开始测试 ,   according to Yasser

现在是 6.29 ,还没开始测试 , Yasser 说的话不能信。

but still need make cctb2

  •  make pack callflow run together with ree-idd on cctb1 and cctb2   (已解决)


  • 规范pack callflow error code (from xueliang)

  • 用 early media 播 A party 的 prompt  , 比如 not enough balance ,   not exist  pack  (已解决 )     ,  见

already send email to TB support to ask 

early media 是为了不计 A party 的 duration , 查 cdr 表确认不是这样

  • pack callflow make outgoing call 时 , 要用codec g711 ,    (已解决)

同时, 把 CVHCallflow.cpp 的这句注释掉


  • CSimpleCall 的 ispack 函数是怎么判断来电是 pack 还是 ree-idd的 ?

调用 sp_TB_CFValidate , 此存储过程存在于 pack 数据库,

当前 simplecall 程序判断 来电走哪个 callflow 的方法是 :

如果ispack 的返回值是1 :  pack

返回值 2 : reeidd

  •  cctb1 连 asterisk 190 , asterisk 186 的 call generator

当前问题 : 从190 出的电话不能到 cctb1

现在可以了, 原先是因为 cctb1 IP 写错 , cctb1 的 ip 和 cctb1 host 的 IP 弄混了

  • 存储过程逻辑里, 有没有白名单的概念 ? (From Kit)


  • pack callflow 的 cdr 能不能对的上

a)  AB connected


b) AB not connected

if A  call for pack not exist   :    CDR  not found in DB pack2018_cdr , but can be found in daily report

c) can not route

d) error happen

  • sp_TB_Disconnected 和 sp_TB_DisconnectedFailed 的区别

when leg B duration > 0 ,  call  sp_TB_Disconnected

else ,  call  sp_TB_DisconnectedFailed


发现, 当执行

, 返回值为0 , 但 实际cdr没有存进去

这是因为 需要 callid, 但一开始 callid 是 sp_connect_b的输出参数 (xueliang 已解决

  •  每一个错误代码都试一遍

a)  sp_chargeInit 返回值 = 74001,74002  ,  how to simulate this ?

b)                                                   74003     pack_not_exist                     已试过

c)                                                   74004    no_balance

d)                                                  74005,74006              modem pool

e)                                                 74007 , 74008

d)                                                74009                      another_is_ongoing




problem to be solved when Migration of TB simple call

  •   当前状态  windows 部分

cctb1 连  TB015103    ,  配置网址在

cctb2 连 TB015104                     

cctb1 & cctb2 要安装的包括 :  TB一系列(mysql ,pcap….), VS2012,  radmin , license 激活, 现有配置(在mysql 数据库)怎么转移?

cctb1 & cctb2 最好把现有的系统做成镜像, 然后装进虚拟机。

cctb1 & cctb2 以及连接的 TB 目前都在 AIMS 机房, 虚拟机将来也放到那里 ? 如果虚拟机在office, 怎么连TB ?


  • linux    ( bridge 193,194,197 )

其中 193 , 194 类似,   需要安装 :   supervisord, java JDK ,

collector 需要让maxis 改那边的IP 白名单,

*** 重要, 确认193 和 194 是不是有直连 tb tsg 的实体线路,  因为 TSG 有

TDM line interface 






  •  要迁移的包括 :

a) 数据库 209 &  210 , and analyzer



  • 有两处调用 maxis :

a)  call maxis webservice  for serviceAuthen

b) telco bridge send SS7 to maxis IN

For point a) ,  there should be a whitelist IP in maxis side ,  this need ask them to change .

For b)


c++ array stack

2018-03-14 , 按照worldhub dinesh 的要求, 写的一个作业程序 ,


dinesh, 6:03 PM
hi Liu yang

I’m dinesh from worldhub

6:04 PM
hi dinesh

dinesh, 6:05 PM
i need a help from you regarding my assignment

are you free, can i share to you?

6:05 PM
ok , pls say

dinesh, 6:05 PM
its C program assignment

here is the question sir, can you help on this?

6:08 PM
ok , I will try it , when u need this program

dinesh, 6:09 PM
by friday,

i have try coding but i cant get correct

6:10 PM
no prob , I will give u the program before Friday , what is your compile envir ? Linux or visual studio

dinesh, 6:10 PM
dev c++

6:11 PM
you will compile the program in Linux machine , right ?

dinesh, 6:11 PM
no sir

i just need to code and show the out come to my lecture

its just a assignment for me

its a reverse stack program

6:13 PM
ic , in fact you do not need to compile it , just need the code and show it in lecture

dinesh, 6:13 PM
yes, correct you said

just need to show my lecture only

6:14 PM
ok, I know it
I will back to home now , contact u later

dinesh, 6:14 PM
sure sir

9:10 PM
hi dinesh , as the picture show , c program should create a stack following input string , but what is the parameter of POP(X) and PUSH(Y)

dinesh, 9:11 PM

I will share the out come of my lecture with the qurstion

9:12 PM
ok , I need make clear what this program want to do

dinesh, 9:12 PM

the answer should be like this

9:13 PM
let me see
now I have understand the request , it more clear now

dinesh, 9:16 PM
yes this is the answer for the question

sorry for confusing you

9:17 PM
no prob
9:11 AM
hi dinesh , here is the source file

This file is no longer available for download. Learn more
u can compile it in Linux envir by command : gcc -o Source Source.c
if u are windows envir , you can compile it in visual tudio Developer Command Prompt by command : cl Source.c

dinesh, 9:35 AM
hi morning liu yang

9:36 AM

dinesh, 9:36 AM
yes i have compiled, and its run correctly

9:37 AM
ok , good

dinesh, 9:37 AM
yes, its correct
this is actually i want

thank you very much mr liu yang


9:39 AM
no prob