git tips

 

 

 

git push origin branch_name —- 更新本地update to remote
git pull origin branch name — 取远程其他人的更新
git stash —- 放弃本地更新

 


找出2次 commit 的区别

Use git log to view the commit history. Each commit has an associated revision specifier that is a hash key (e.g. 14b8d0982044b0c49f7a855e396206ee65c0e787 and b410ad4619d296f9d37f0db3d0ff5b9066838b39). To view the difference between two different commits, use git diff with the first few characters of the revision specifiers of both commits, like so:

If you want to get an overview over all the differences that happened from commit to commit, use git log or git whatchanged with the patch option:

参见 :   https://stackoverflow.com/questions/1786027/how-to-view-file-history-in-git

How to add local code to github

 

  1. Create a new repository on GitHub. You can also add a gitignore file, a readme and a licence if you want
  2.  Open Git Bash
  3. Change the current working directory to your local project.
  4. Initialize the local directory as a Git repository.
    git init
  5. Add the files in your new local repository. This stages them for the first commit.
    git add .
  6.  Commit the files that you’ve staged in your local repository.
    git commit -m "initial commit"
  7.  Copy the https url of your newly created repo
  8. In the Command prompt, add the URL for the remote repository where your local repository will be pushed.

    git remote add origin remote repository URL


    git remote -v
  9.  Push the changes in your local repository to GitHub.

    git push -f origin master

 

 

 

如果遇到错误 :  remote origin already exist  ,

 

 

early media in telco bridge

TB can do two type early media ,  show in this picture :

 

 

How to implement early media in TB simple call

a)  accept  leg A

b)  set SIP status to 183 and alerting

ExtraProtInfo was defined as :

 

c)  playing prompt

 

 

 

 

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  (已解决 )     ,  见  http://176.122.178.37/?p=351

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