您的位置:首页 > 文旅 > 旅游 > 简单介绍 Kamailio cfg_rpc 模块

简单介绍 Kamailio cfg_rpc 模块

2024/10/5 15:32:13 来源:https://blog.csdn.net/qq_56167818/article/details/139971906  浏览:    关键词:简单介绍 Kamailio cfg_rpc 模块

记得先加载 cfg_rpc 模块

`loadmodule "cfg_rpc.so"`

kamailio 起来之后 运行 `kamcmd cfg.list` 可以得到:

dispatcher: probing_threshold
dispatcher: inactive_threshold
dispatcher: ping_reply_codes
rtpengine: rtpengine_disable_tout
rtpengine: aggressive_redetection
rtpengine: rtpengine_tout_ms
rtpengine: queried_nodes_limit
rtpengine: rtpengine_retr
websocket: keepalive_timeout
websocket: enabled
xlog: methods_filter
siputils: ring_timeout
registrar: realm_pref
registrar: default_expires
registrar: default_expires_range
registrar: expires_range
registrar: min_expires
registrar: max_expires
registrar: max_contacts
registrar: retry_after
registrar: case_sensitive
registrar: default_q
registrar: append_branches
registrar: use_expired_contacts
maxfwd: max_limit
tm: auto_inv_100_reason
tm: default_reason
tm: ac_extra_hdrs
tm: ruri_matching
tm: via1_matching
tm: callid_matching
tm: callid_cseq_matching
tm: fr_timer
tm: fr_inv_timer
tm: fr_inv_timer_next
tm: wt_timer
tm: retr_timer1
tm: retr_timer2
tm: max_inv_lifetime
tm: max_noninv_lifetime
tm: noisy_ctimer
tm: auto_inv_100
tm: unix_tx_timeout
tm: restart_fr_on_each_reply
tm: pass_provisional_replies
tm: aggregate_challenges
tm: unmatched_cancel
tm: default_code
tm: reparse_invite
tm: blst_503
tm: blst_503_def_timeout
tm: blst_503_min_timeout
tm: blst_503_max_timeout
tm: blst_methods_add
tm: blst_methods_lookup
tm: cancel_b_method

core: debug
...

现在可以临时把 core:debug设置为3

`kamcmd cfg.seti core debug 3`

等问题复现拿到日志之后要记得用下面的命令进行恢复

`kamcmd cfg.seti core debug 2`


现在看下 registrar 模块的参数:

`kamcmd cfg.get  registrar`

得到:

{
        realm_pref: <null string>
        default_expires: 3600
        default_expires_range: 0
        expires_range: 0
        min_expires: 60
        max_expires: 3600
        max_contacts: 10
        retry_after: 0
        case_sensitive: 0
        default_q: -1
        append_branches: 1
        use_expired_contacts: 0
}

现在要把 max_expires 设置为1800

`kamcmd cfg.seti registrar max_expires 1800`

现在再看一遍,`kamcmd cfg.get  registrar`,得到:

{
        realm_pref: <null string>
        default_expires: 3600
        default_expires_range: 0
        expires_range: 0
        min_expires: 60
        max_expires: 1800
        max_contacts: 10
        retry_after: 0
        case_sensitive: 1
        default_q: -1
        append_branches: 1
        use_expired_contacts: 0
}
 

最后建议多读 Kamailio 官方文档,活学活用,为己所用

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com