How to get call info from Kamailio

女生的网名这么多〃 提交于 2019-12-11 19:43:56

问题


I have setup a Kamailio server and am able to establish calls. I need a way to get call related information like from, to, duration,etc. I have enabled the dialog module in the config but no avail. I am not well versed with config files and I am not sure if I am doing something wrong in the config file.


回答1:


You need to Modify the config file to log the call related information in kamailio database tables.Here's the link

You have to uncomment the lines in the config file those add columns to database tables.

In addition to this,a web interface siremis for monitoring server can also be installed




回答2:


It's impossible to blindly know if config is good or bad. However, as general advise, be sure you use dlg_manage() before relaying the INVITE and the other SIP requests related to calls.

For troubleshooting, you can list active dialogs with 'kamctl mi dlg_list' to see if they are correctly tracked or not.




回答3:


since the link you mentioned is no longer working, here is my suggestion. To get Call information you can best use CDRs , which can be done in 2 ways

  1. set acc module CDR or
  2. get dialog variable and send to external CDR processor.

If you want to obtain further more details about dialogs , its routes , scokets , tiemouts etc then use dialog DB storage , which looks like

+------------------+------------------+------+-----+---------+----------------+
| Field            | Type             | Null | Key | Default | Extra          |
+------------------+------------------+------+-----+---------+----------------+
| id               | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| hash_entry       | int(10) unsigned | NO   | MUL | NULL    |                |
| hash_id          | int(10) unsigned | NO   |     | NULL    |                |
| callid           | varchar(255)     | NO   |     | NULL    |                |
| from_uri         | varchar(128)     | NO   |     | NULL    |                |
| from_tag         | varchar(64)      | NO   |     | NULL    |                |
| to_uri           | varchar(128)     | NO   |     | NULL    |                |
| to_tag           | varchar(64)      | NO   |     | NULL    |                |
| caller_cseq      | varchar(20)      | NO   |     | NULL    |                |
| callee_cseq      | varchar(20)      | NO   |     | NULL    |                |
| caller_route_set | varchar(512)     | YES  |     | NULL    |                |
| callee_route_set | varchar(512)     | YES  |     | NULL    |                |
| caller_contact   | varchar(128)     | NO   |     | NULL    |                |
| callee_contact   | varchar(128)     | NO   |     | NULL    |                |
| caller_sock      | varchar(64)      | NO   |     | NULL    |                |
| callee_sock      | varchar(64)      | NO   |     | NULL    |                |
| state            | int(10) unsigned | NO   |     | NULL    |                |
| start_time       | int(10) unsigned | NO   |     | NULL    |                |
| timeout          | int(10) unsigned | NO   |     | 0       |                |
| sflags           | int(10) unsigned | NO   |     | 0       |                |
| iflags           | int(10) unsigned | NO   |     | 0       |                |
| toroute_name     | varchar(32)      | YES  |     | NULL    |                |
| req_uri          | varchar(128)     | NO   |     | NULL    |                |
| xdata            | varchar(512)     | YES  |     | NULL    |                |
+------------------+------------------+------+-----+---------+----------------+


来源:https://stackoverflow.com/questions/18183440/how-to-get-call-info-from-kamailio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!