Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)
The result: for multiple dialog bodie only first body checked (I added custom logging inside your code to see where it worked) -- 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/1427#issuecomment-365178957___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] acc: new json format with outputs to mqueue or syslog (#1437)
Thanks for the contribution! The option to enable features in a module with compile time defines is not preferred at all. We had in the past the RADIUS (and DIAMETER) accounting as part of acc and it was very inconvenient to maintain or package. The solution is to implement this as a new module on top of acc module, like `acc_json`, similar to `acc_radius`. In this way the module doesn't have compile time defines and can be packaged separately as part of jansson-modules pkg. It should be very easy to build the new module by reusing the code you have in this patch. I did the split of acc_radius module. -- 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/1437#issuecomment-365178761___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a0b6b3ab: tls: small updates to tls config
Module: kamailio Branch: master Commit: a0b6b3abe1beab33e11a52ff601c9cc50f7e2d56 URL: https://github.com/kamailio/kamailio/commit/a0b6b3abe1beab33e11a52ff601c9cc50f7e2d56 Author: Daniel-Constantin MierlaCommitter: Daniel-Constantin Mierla Date: 2018-02-13T08:41:13+01:00 tls: small updates to tls config --- Modified: src/modules/tls/tls.cfg --- Diff: https://github.com/kamailio/kamailio/commit/a0b6b3abe1beab33e11a52ff601c9cc50f7e2d56.diff Patch: https://github.com/kamailio/kamailio/commit/a0b6b3abe1beab33e11a52ff601c9cc50f7e2d56.patch --- diff --git a/src/modules/tls/tls.cfg b/src/modules/tls/tls.cfg index 102990b421..c1a08f6759 100644 --- a/src/modules/tls/tls.cfg +++ b/src/modules/tls/tls.cfg @@ -17,8 +17,8 @@ verify_certificate = no require_certificate = no private_key = /usr/local/etc/kamailio/kamailio-selfsigned.key certificate = /usr/local/etc/kamailio/kamailio-selfsigned.pem -#ca_list = ./modules/tls/cacert.pem -#crl = ./modules/tls/crl.pem +#ca_list = /usr/local/etc/kamailio/tls/cacert.pem +#crl = /usr/local/etc/kamailio/tls/crl.pem # This is the default client domain, settings # in this domain will be used for all outgoing @@ -27,6 +27,7 @@ certificate = /usr/local/etc/kamailio/kamailio-selfsigned.pem # We require that servers present valid certificate. # [client:default] +#method = TLSv1 verify_certificate = yes require_certificate = yes @@ -39,25 +40,25 @@ require_certificate = yes # interface. # #[server:127.0.0.1:5061] -#method = SSLv23 +#method = TLSv1 #verify_certificate = yes #require_certificate = no -#private_key = ./modules/tls/local_key.pem -#certificate = ./modules/tls/local_cert.pem +#private_key = /usr/local/etc/kamailio/tls/local_key.pem +#certificate = /usr/local/etc/kamailio/tls/local_cert.pem #verify_depth = 3 #ca_list = local_ca.pem #crl = local_crl.pem -# Special settings for the iptel.org public SIP +# Special settings for the example.sip (1.2.3.4) public SIP # server. We do not verify the certificate of the # server because it can be expired. The server # implements authentication using SSL client # certificates so configure the client certificate # that was given to use by iptel.org staff here. # -#[client:195.37.77.101:5061] +#[client:1.2.3.4:5061] #verify_certificate = no -#certificate = ./modules/tls/iptel_client.pem -#private_key = ./modules/tls/iptel_key.pem -#ca_list = ./modules/tls/iptel_ca.pem -#crl = ./modules/tls/iptel_crl.pem +#certificate = /usr/local/etc/kamailio/tls/example_client.pem +#private_key = /usr/local/etc/kamailio/tls/example_key.pem +#ca_list = /usr/local/etc/kamailio/tls/example_ca.pem +#crl = /usr/local/etc/kamailio/tls/example_crl.pem ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)
What was the result of testing it? Not working? The `while()` is there to deal with xml docs that have many `dialog` nodes. The `do { ... } while ()` is to find the next node with `dialog` name. These are to be compliant with xml specs, as there can be other nodes with different names. So just doing `node=node->next` doesn't ensure it will be the next `dialog` node, but the next node in the xml document. -- 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/1427#issuecomment-365172882___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] acc: new json format with outputs to mqueue or syslog (#1437)
@jchavanton pushed 1 commit. 6b8fccd acc: Makefile test -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/1437/files/8e15a950002718b40293298737096d1c6682813e..6b8fccd2fa076d350d4f45ad959326b59c471720 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] acc: new json format with outputs to mqueue or syslog (#1437)
I wonder what is the problem with the CI build, looking at the logs last thing done was building, and then nothing. ``` CC (clang) [M evrexec.so] evrexec_mod.o LD (clang) [M evrexec.so] evrexec.so ``` -- 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/1437#issuecomment-365078676___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] acc: new json format with outputs to mqueue or syslog (#1437)
Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] 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) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description This commit is introducing JSON format for ACC events. 2 way to output the ACC events are proposed/implemented (syslog and mqueue) The option to use db_flastore was considered and found less attractive, mainly because the DB abstraction layer is not making much sense, example reformatting the data many times ... and other outputs could benefit from JSON format. 1- syslog (directly from the module, because it may be valuable to run Kamailio using runit or in docker and not "daemionizing" it anymore while still using syslog for acc events) 2- mqueue this way you may be able to control the acc event from Kamailio routing script, and example is provided using the http_client module to publish to NSQD This seemed to be the best approach to remain as compatible as possible with the ACC module and benefit from it, while introducing the JSON format. Many parameters are reused like time_mode, log_extra, log_facility, it seemed like reusing was making sense, this may be questionable. If jansson or mqueue is not available or loaded the module will still build and run disabling the extra features -- Usage example where we use mqueue and process acc events in other worker processes. example also inluded in the doc ``` # example using json_mqueue/http_client to publish to NSQD max_while_loops=10 modparam("mqueue", "mqueue", "name=acc_events;size=10") modparam("acc", "json_mqueue", "acc_events") modparam("acc", "json_flag", 2) modparam("acc", "log_extra", "caller_ip_port=$avp(caller_ip_port);") modparam("rtimer", "timer", "name=nsqt;interval=1;mode=1;") modparam("rtimer", "exec", "timer=nsqt;route=RUN_CDR_PUBLISH") modparam("http_client", "keep_connections", 1) modparam("http_client", "httpcon", "nsqd=>http://localhost:4151/pub?topic=acc;) route[RUN_CDR_PUBLISH] { $var(count) = 0; while (mq_fetch("acc_events")) { $var(q_size) = mq_size("acc_events"); $var(count) = $var(count) + 1; xinfo("[RUN_CDR_PUBLISH][$var(q_size)][$var(count)][$mqk(acc_events)][$mqv(acc_events)]\n"); $var(res) = http_connect("nsqd", "", "application/json", $mqv(acc_events), "$var(nsq_res)"); if ($var(res) != "200") { mq_add("acc_events", "acc_key", "$mqv(acc_events)"); return; } } if ($var(count) > 0 ) { xinfo("[RUN_CDR_PUBLISH]done count[$var(count)]\n"); } } ``` Load testing Load tests where conducted with both json_syslog and json_mqueue/http to NSQD, latency was very stable it was high because the test server used was on West coast California >> New-Jersey >> California ![image](https://user-images.githubusercontent.com/3736014/36117214-a6ebcebc-0fed-11e8-928c-9ff9321bef86.png) average message/response latency graph in ms/sec -- Using voip_perf to send SIP compliant traffic (INVITE < 100 < 180 < 200 > ACK || BYE < 200) 7M SIP messages calls sent > 800/sec https://github.com/jchavanton/voip_perf ``` Total 100 INVITE calls sent in 1037082 ms at rate of 819/sec Total 100 responses received in 1037881 ms at rate of 818/sec: Detailed responses received: - 200 responses: 100 (OK) -- TOTAL responses: 100 (rate=818/sec) ``` All the ACC events where queued in NSQD and written to SYSLOG without introducing delay. ``` curl -v http://127.0.0.1:4151/stats nsqd v1.0.0-compat (built w/go1.8) start_time 2018-02-12T17:10:58Z uptime 33m4.181861175s Health: OK [acc] depth: 304 be-depth: 2990004 msgs: 304 e2e%: ``` ``` wc -l /var/log/json_acc.log 304 /var/log/json_acc.log ``` You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1437 -- Commit Summary -- * acc: new json format with outputs to mqueue or syslog -- File Changes -- M src/modules/acc/Makefile (12) M
Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)
I tried proposed changes. in ps_match_dialog_state_from_body there is a loop: while(node != NULL) { why do we need there one more while loop? What actually happens: . if(strcmp(tmp_state, vstate)!=0) { // here we come only once, when matching first dialog ... all later dialogs are iterating in the second while loop. as for me this part of code ``` + do { + if(node->next != NULL && node->next->name != NULL + && xmlStrcmp(node->name, node->next->name) == 0) { + node = node->next; + break; + } + node = node->next; + } while(node != NULL); ``` should look like: ``` node = node->next; ``` maybe that checks for NULL are also necessary, but not while do-while. General question - is there a way to propose changes in your custom branch? thanks for your help! -- 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/1427#issuecomment-364987310___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
OK, let's see the results, because it should work for single Route header, that was the purpose of the patch. -- 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/1428#issuecomment-364930317___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
No I did not test it. I will. -- 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/1428#issuecomment-364925128___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
Did you just review the code or you also tested it? It covers the cases when enable_double_rr is 1 (or different than 0) and there is no second Route header. Because if there is a second route, then the socket is forced later to the outgoing socket. -- 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/1428#issuecomment-364913360___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
Hi Daniel, I reviewed the code and unfortunately, it does not cover the case when - enable_double_rr=1 - both UA are using the same IP and the same port and there is only one route inserted by record_route() To handle this case, see the patch I suggest below. Alternatively, we could set enable_double_rr=2 I guess. What is your opinion ? [loose.diff.txt](https://github.com/kamailio/kamailio/files/1716237/loose.diff.txt) -- 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/1428#issuecomment-364906786___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)
Hi, Daniel! thanks for the patch! will give it a try today -- 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/1427#issuecomment-364885964___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] having keep-alive response count before ending the dialog (#438)
Closed #438. -- 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/438#event-1469052834___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] redis support into usrloc (#1137)
I am closing this one here, having two pull requests related to it, discussions can be continue there. -- 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/1137#issuecomment-364867345___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)
@vance-od - I tried a quick fix with the patches referenced above. Can you try with them and see if all ok? It relies on matching all related dialog states in the same xml document. If one found mismatching, then will not consider it terminated. Likely it can be improved with matching on callid, but this can be a starting point. -- 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/1427#issuecomment-364866447___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:92451536: presence: return on having a full match on states in xml document
Module: kamailio Branch: master Commit: 92451536a0ef985ff1d16c5531c232cd657532e1 URL: https://github.com/kamailio/kamailio/commit/92451536a0ef985ff1d16c5531c232cd657532e1 Author: Daniel-Constantin MierlaCommitter: Daniel-Constantin Mierla Date: 2018-02-12T10:15:47+01:00 presence: return on having a full match on states in xml document - better handling after previous commit, related to GH #1427 --- Modified: src/modules/presence/presentity.c --- Diff: https://github.com/kamailio/kamailio/commit/92451536a0ef985ff1d16c5531c232cd657532e1.diff Patch: https://github.com/kamailio/kamailio/commit/92451536a0ef985ff1d16c5531c232cd657532e1.patch --- diff --git a/src/modules/presence/presentity.c b/src/modules/presence/presentity.c index 5f0eef6368..4674f0ad49 100644 --- a/src/modules/presence/presentity.c +++ b/src/modules/presence/presentity.c @@ -338,6 +338,7 @@ int ps_match_dialog_state_from_body(str body, int *is_dialog, char *vstate) if (tmp_state != NULL) { if(strcmp(tmp_state, vstate)!=0) { + /* state not matched */ xmlFree(tmp_state); rmatch = 0; goto done; @@ -550,8 +551,8 @@ int ps_match_dialog_state(presentity_t* presentity, char* vstate) rmatch = ps_match_dialog_state_from_body(tmp_db_body, _is_dialog, vstate); - if(rmatch<=0) { - /* failure or not a match */ + if(rmatch==1) { + /* having a full match */ pa_dbf.free_result(pa_db, result); result = NULL; return rmatch; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:76b40abd: presence: check if all related dialog states are terminated
Module: kamailio Branch: master Commit: 76b40abd6534a5af0164601e48e525b9a5915930 URL: https://github.com/kamailio/kamailio/commit/76b40abd6534a5af0164601e48e525b9a5915930 Author: Daniel-Constantin MierlaCommitter: Daniel-Constantin Mierla Date: 2018-02-12T10:07:00+01:00 presence: check if all related dialog states are terminated - fix for incorrect dialog state for multiple dialogs xml body - reported by GH #1427 --- Modified: src/modules/presence/presentity.c --- Diff: https://github.com/kamailio/kamailio/commit/76b40abd6534a5af0164601e48e525b9a5915930.diff Patch: https://github.com/kamailio/kamailio/commit/76b40abd6534a5af0164601e48e525b9a5915930.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Crash on receiving incorrect REGISTER request? (#1420)
@kbdfck - if you get the coredump, the sip message will be inside it. Having the backtrace from corefile with gdb is important here. -- 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/1420#issuecomment-364853290___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] topos 5.1.1 regression: missing Contact header in in-dialog requests despite record_route() having been executed for initial request (#1421)
Closed #1421. -- 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/1421#event-1468948263___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] topos 5.1.1 regression: missing Contact header in in-dialog requests despite record_route() having been executed for initial request (#1421)
I reverted 97532ca as per comment from @sergey-vb . It was done also in branch 5.1. Reopen if still an issue. -- 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/1421#issuecomment-364852779___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.1:cc638e4c: topos: revert "topos: set uuid fields before checking contact/rr fields"
Module: kamailio Branch: 5.1 Commit: cc638e4cd6d6f4ff9aca0bf6c9d6c940a3e64e59 URL: https://github.com/kamailio/kamailio/commit/cc638e4cd6d6f4ff9aca0bf6c9d6c940a3e64e59 Author: Daniel-Constantin MierlaCommitter: Daniel-Constantin Mierla Date: 2018-02-12T09:14:26+01:00 topos: revert "topos: set uuid fields before checking contact/rr fields" This reverts commit 97532ca18f595d89edf9b0b6e6688847aa38dd44. (cherry picked from commit be6a419a5b0d6fe3922219a30788ad527a313fd6) --- Modified: src/modules/topos/tps_storage.c --- Diff: https://github.com/kamailio/kamailio/commit/cc638e4cd6d6f4ff9aca0bf6c9d6c940a3e64e59.diff Patch: https://github.com/kamailio/kamailio/commit/cc638e4cd6d6f4ff9aca0bf6c9d6c940a3e64e59.patch --- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 95f1097bd6..950d1982f4 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -214,10 +214,19 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir) } else { sv = td->as_contact; } + if(sv.len<=0) { + /* no contact - skip */ + return 0; + } + if(td->cp + 8 + (2*uuid->len) + sv.len >= td->cbuf + TPS_DATA_SIZE) { LM_ERR("insufficient data buffer\n"); return -1; } + if (parse_uri(sv.s, sv.len, ) < 0) { + LM_ERR("failed to parse the uri\n"); + return -1; + } if(dir==TPS_DIR_DOWNSTREAM) { td->b_uuid.s = td->cp; *td->cp = 'b'; @@ -225,6 +234,8 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir) memcpy(td->cp, uuid->s, uuid->len); td->cp += uuid->len; td->b_uuid.len = td->cp - td->b_uuid.s; + + td->bs_contact.s = td->cp; } else { td->a_uuid.s = td->cp; *td->cp = 'a'; @@ -232,20 +243,7 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir) memcpy(td->cp, uuid->s, uuid->len); td->cp += uuid->len; td->a_uuid.len = td->cp - td->a_uuid.s; - } - if(sv.len<=0) { - /* no contact - skip */ - return 0; - } - - if (parse_uri(sv.s, sv.len, ) < 0) { - LM_ERR("failed to parse the uri\n"); - return -1; - } - if(dir==TPS_DIR_DOWNSTREAM) { - td->bs_contact.s = td->cp; - } else { td->as_contact.s = td->cp; } *td->cp = '<'; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:be6a419a: topos: revert "topos: set uuid fields before checking contact/rr fields"
Module: kamailio Branch: master Commit: be6a419a5b0d6fe3922219a30788ad527a313fd6 URL: https://github.com/kamailio/kamailio/commit/be6a419a5b0d6fe3922219a30788ad527a313fd6 Author: Daniel-Constantin MierlaCommitter: Daniel-Constantin Mierla Date: 2018-02-12T09:12:26+01:00 topos: revert "topos: set uuid fields before checking contact/rr fields" This reverts commit 97532ca18f595d89edf9b0b6e6688847aa38dd44. --- Modified: src/modules/topos/tps_storage.c --- Diff: https://github.com/kamailio/kamailio/commit/be6a419a5b0d6fe3922219a30788ad527a313fd6.diff Patch: https://github.com/kamailio/kamailio/commit/be6a419a5b0d6fe3922219a30788ad527a313fd6.patch --- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 95f1097bd6..950d1982f4 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -214,10 +214,19 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir) } else { sv = td->as_contact; } + if(sv.len<=0) { + /* no contact - skip */ + return 0; + } + if(td->cp + 8 + (2*uuid->len) + sv.len >= td->cbuf + TPS_DATA_SIZE) { LM_ERR("insufficient data buffer\n"); return -1; } + if (parse_uri(sv.s, sv.len, ) < 0) { + LM_ERR("failed to parse the uri\n"); + return -1; + } if(dir==TPS_DIR_DOWNSTREAM) { td->b_uuid.s = td->cp; *td->cp = 'b'; @@ -225,6 +234,8 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir) memcpy(td->cp, uuid->s, uuid->len); td->cp += uuid->len; td->b_uuid.len = td->cp - td->b_uuid.s; + + td->bs_contact.s = td->cp; } else { td->a_uuid.s = td->cp; *td->cp = 'a'; @@ -232,20 +243,7 @@ int tps_storage_fill_contact(sip_msg_t *msg, tps_data_t *td, str *uuid, int dir) memcpy(td->cp, uuid->s, uuid->len); td->cp += uuid->len; td->a_uuid.len = td->cp - td->a_uuid.s; - } - if(sv.len<=0) { - /* no contact - skip */ - return 0; - } - - if (parse_uri(sv.s, sv.len, ) < 0) { - LM_ERR("failed to parse the uri\n"); - return -1; - } - if(dir==TPS_DIR_DOWNSTREAM) { - td->bs_contact.s = td->cp; - } else { td->as_contact.s = td->cp; } *td->cp = '<'; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
Thank you for your time! One of our engineer is currently testing it. If we have any issue or comments ,we will come back to you. -- 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/1428#issuecomment-364851229___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
Closing after the commit and remarks in the previous comment. -- 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/1428#issuecomment-364850721___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Issue with Socket selection on Forwarding ACK message (#1428)
Closed #1428. -- 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/1428#event-1468935219___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
Closed #1434. -- 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/1434#event-1468934502___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
Thanks for testing and feedback! Patch backported. -- 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/1434#issuecomment-364850593___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:749dd5c5: rtpengine: get again body pointer only when read_sdp_pv is set
Module: kamailio Branch: 5.0 Commit: 749dd5c55ed100e9a57ece18e82fab2d1eaaab8e URL: https://github.com/kamailio/kamailio/commit/749dd5c55ed100e9a57ece18e82fab2d1eaaab8e Author: Daniel-Constantin MierlaCommitter: Daniel-Constantin Mierla Date: 2018-02-12T09:00:07+01:00 rtpengine: get again body pointer only when read_sdp_pv is set - reported by GH #1434 (cherry picked from commit 75c4ca0bb69bd4f1ba42c6d964697737813fa81e) (cherry picked from commit 8794d6d60549683120e22b3b150674e686a29ba0) --- Modified: src/modules/rtpengine/rtpengine.c --- Diff: https://github.com/kamailio/kamailio/commit/749dd5c55ed100e9a57ece18e82fab2d1eaaab8e.diff Patch: https://github.com/kamailio/kamailio/commit/749dd5c55ed100e9a57ece18e82fab2d1eaaab8e.patch --- diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index ab1c088d5d..95a4ba4bd1 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -2883,12 +2883,17 @@ rtpengine_offer_answer(struct sip_msg *msg, const char *flags, int op, int more) pkg_free(newbody.s); } else { - /* get the body from the message as body ptr may have changed */ - cur_body.len = 0; - cur_body.s = get_body(msg); - cur_body.len = msg->buf + msg->len - cur_body.s; - - anchor = del_lump(msg, cur_body.s - msg->buf, cur_body.len, 0); + if (read_sdp_pvar_str.len > 0) { + /* get the body from the message as body ptr may have changed +* when using read_sdp_pv */ + cur_body.len = 0; + cur_body.s = get_body(msg); + cur_body.len = msg->buf + msg->len - cur_body.s; + + anchor = del_lump(msg, cur_body.s - msg->buf, cur_body.len, 0); + } else { + anchor = del_lump(msg, body.s - msg->buf, body.len, 0); + } if (!anchor) { LM_ERR("del_lump failed\n"); goto error_free; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev