I noticed that accounting to database has stopped working. I don't
know when it has happened, but at least I have the problem with master.
My acc config is like this:
modparam("acc", "db_url", "mysql://user:pass@127.0.0.1/sip_proxy_usage")
modparam("acc", "db_flag", 7)
modparam("acc", "failed_transaction_flag", 8)
modparam("acc", "failed_filter", "407")
modparam("acc", "db_table_acc", "accounting")
modparam("acc", "acc_sip_code_column", "response_code")
modparam("acc", "acc_sip_reason_column", "response_reason")
modparam("acc", "db_insert_mode", 2)
modparam("acc", "reason_from_hf", 1)
If I change db_flag to log_flag, accounting to syslog works fine. With
db_flag, nothing is inserted to db and no error are produced to syslog
or mysql error.log.
Has something changed in acc db config that I have not noticed?
-- Juha
if server_address & notification_address use same ip and different port(see below),in dmq.list_nodes will have two node for one kamailio(one node for notify_server 5360 and one for dmq local 5260), question is when send REGISTER to port 5160, REGISTER will copy from port 5260 to 5360 on the same kamailio,this is not what i want.
dmq & dmq_usrloc cfg(**different port**):
listen=eth0:5160
listen=eth0:5260
listen=eth0:5360
modparam("dmq", "server_address", "sip:10.6.1.200:5260")
modparam("dmq", "notification_address", "sip:10.6.1.200:5360")
modparam("dmq", "multi_notify", 1)
modparam("dmq", "num_workers", 2)
# ----- dmq_usrloc params -----
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_msg_contacts", 50)
modparam("dmq_usrloc", "batch_msg_size", 500000)
And when I let server_address & notification_address use same IP & Port, check in function add_server_and_notify will report error("error adding notification node"),child_init will return failed.
So I suggest that the following changes, let server_address & notification_address can use the same IP and port:
@@ -315,11 +315,15 @@ dmq_node_t* add_server_and_notify(str *paddr)
for (index = 0; index < host_cnt; index++) {
pstr->s = puri_list [index];
pstr->len = strlen (puri_list [index]);
- if (!find_dmq_node_uri(node_list, pstr)) { // check for duplicates
+ if (!(pnode = find_dmq_node_uri(node_list, pstr))) { // check for duplicates
pnode = add_dmq_node (node_list, pstr);
if (pnode && !pfirst)
{ pfirst = pnode; }
- }
+ } else {
+ if (!pfirst) {
+ pfirst = pnode;
+ }
+ }
}
}
After Such A change, dmq.list_nodes will only have on node for (notify_server & server_addr(local)).
Is there any problem with this modification? Thanks
$./sbin/kamailio -v
version: kamailio 5.0.1 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1109
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
issue : https://github.com/kamailio/kamailio/issues/1109
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1308
-- Commit Summary --
* dmq: let server_address & notification_address can use the same IP and port #1109
-- File Changes --
M src/modules/dmq/notification_peer.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1308.patchhttps://github.com/kamailio/kamailio/pull/1308.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1308