Module: kamailio
Branch: master
Commit: f128db2b85a525ff82c28faffbeec3203f9560c3
URL: https://github.com/kamailio/kamailio/commit/f128db2b85a525ff82c28faffbeec32…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-18T12:16:08+01:00
tm: use coherent type int for tm route blocks indexes
---
Modified: src/modules/tm/h_table.h
Modified: src/modules/tm/t_reply.c
Modified: src/modules/tm/t_reply.h
---
Diff: …
[View More]https://github.com/kamailio/kamailio/commit/f128db2b85a525ff82c28faffbeec32…
Patch: https://github.com/kamailio/kamailio/commit/f128db2b85a525ff82c28faffbeec32…
---
diff --git a/src/modules/tm/h_table.h b/src/modules/tm/h_table.h
index 8481ccde29e..d95cb7d717c 100644
--- a/src/modules/tm/h_table.h
+++ b/src/modules/tm/h_table.h
@@ -225,13 +225,11 @@ typedef struct ua_client
*/
struct retr_buf *local_ack;
/* the route to take if no final positive reply arrived */
- unsigned short on_failure;
+ int on_failure;
/* the route to take for all failure replies */
- unsigned short on_branch_failure;
+ int on_branch_failure;
/* the onreply_route to be processed if registered to do so */
- unsigned short on_reply;
- /* unused - keep the structure aligned to 32b */
- unsigned short on_unused;
+ int on_reply;
} tm_ua_client_t;
@@ -429,18 +427,18 @@ typedef struct cell
/* nr of replied branch; 0..sr_dst_max_branches=branch value,
* -1 no reply, -2 local reply */
- short relayed_reply_branch;
+ int relayed_reply_branch;
/* the route to take if no final positive reply arrived */
- unsigned short on_failure;
+ int on_failure;
/* the route to take for all failure replies */
- unsigned short on_branch_failure;
+ int on_branch_failure;
/* the onreply_route to be processed if registered to do so */
- unsigned short on_reply;
+ int on_reply;
/* The route to take for each downstream branch separately */
- unsigned short on_branch;
+ int on_branch;
/* branch route backup for late branch add (t_append_branch) */
- unsigned short on_branch_delayed;
+ int on_branch_delayed;
/* place holder for MD5checksum, MD5_LEN bytes are extra alloc'ed */
char md5[0];
diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c
index e9b9df434a5..c5a58bba8ab 100644
--- a/src/modules/tm/t_reply.c
+++ b/src/modules/tm/t_reply.c
@@ -224,17 +224,17 @@ void t_on_reply(unsigned int go_to)
}
-unsigned int get_on_failure()
+int get_on_failure()
{
return goto_on_failure;
}
-unsigned int get_on_branch_failure()
+int get_on_branch_failure()
{
return goto_on_branch_failure;
}
-unsigned int get_on_reply()
+int get_on_reply()
{
return goto_on_reply;
}
diff --git a/src/modules/tm/t_reply.h b/src/modules/tm/t_reply.h
index 709b70454ed..18ce47f457c 100644
--- a/src/modules/tm/t_reply.h
+++ b/src/modules/tm/t_reply.h
@@ -199,11 +199,11 @@ void on_failure_reply(
replies arrive
*/
void t_on_failure(unsigned int go_to);
-unsigned int get_on_failure(void);
+int get_on_failure(void);
void t_on_branch_failure(unsigned int go_to);
-unsigned int get_on_branch_failure(void);
+int get_on_branch_failure(void);
void t_on_reply(unsigned int go_to);
-unsigned int get_on_reply(void);
+int get_on_reply(void);
int t_retransmit_reply(struct cell *t);
[View Less]

max_branches=30
Following this route, the branch value will be doubled,only 15 branches can be created
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3678
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3678(a)github.com>
<!-- 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, …
[View More]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 -->
- [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
- [X] 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
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
I was looking in code at how t_check_trans() works and updated doc. Please let me know if I understood correctly how it behaves for non-acks and non-cancel, when transaction is found.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3673
-- Commit Summary --
* tm: Update doc for t_check_trans()
-- File Changes --
M src/modules/tm/doc/functions.xml (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3673.patchhttps://github.com/kamailio/kamailio/pull/3673.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3673
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3673(a)github.com>
[View Less]
### Description
I came across the following while trying to serialize SQL data to xavp (`sql_xquery()`) and then serializing the result to htable using `xavp_params_implode()`. One of the data columns has a type of `BIGINT`. The resulting string had neither the key nor value.
I recognize that Kamailio does not currently have support for 64 bit integers and that adding support for it is probably not a trivial matter. My request here is really that if the value is going to be dropped it …
[View More]would be good if `pv` would omit a warning.
#### Reproduction
MySQL table:
```sql
CREATE TABLE dids (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
did varchar(11) NOT NULL,
route_id BIGINT NOT NULL,
failure_route_id INT NOT NULL,
description VARCHAR(255)
);
```
With data like this:
```sql
INSERT INTO dids
( did, route_id, failure_route_id, description ) VALUES
( '15555551000', 101, 1006, 'Alice' );
```
And the following Kamailio code:
```
$var(query) = "SELECT * "
+ "FROM dids "
+ "WHERE did = " + $(rU{sql.val.str});
sql_xquery("db", "$var(query)", "did_data");
xavp_params_implode("did_data", "$sht(did=>$rU)");
xinfo("Serialized query result: [$sht(did=>$rU)]\n");
```
The following log line results - the `route_id` is missing all together:
```
1(7) INFO: <script>: Serialized query result: [id=1;did=15555551000;failure_route_id=1006;description=Alice;]
```
### Possible Solutions
It's worth noting that the value is usable out of the XAVP. `$xavp(did=>route_id)` is retrievable, and the problem seems to be only when running `xavp_params_implode()`. In a perfect world, the key and value would be retained and put into the serialized data, however I'm not sure of the complexity of this (what if the the value exceeds a 32 bit int?, etc). With that said, my only real request would be that if a value is dropped that a warning is omitted with a rough explanation of the reason ("omitting _keyName_ unknown_ data type", etc).
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
5.7.3
```
* **Operating System**:
Alpine 3.18
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3663
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3663(a)github.com>
[View Less]
#### 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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature …
[View More](non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #3464
#### Description
fixed rabbitmq-c deprecation warning
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3670
-- Commit Summary --
* rabbitmq: fixed rabbitmq-c deprecation warning
* kazoo: fixed rabbitmq-c deprecation warning
-- File Changes --
M src/modules/kazoo/Makefile (4)
M src/modules/kazoo/kz_amqp.c (9)
M src/modules/kazoo/kz_amqp.h (5)
M src/modules/rabbitmq/Makefile (4)
M src/modules/rabbitmq/rabbitmq.c (7)
M src/modules/rabbitmq/utils.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3670.patchhttps://github.com/kamailio/kamailio/pull/3670.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3670
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3670(a)github.com>
[View Less]
On Ubuntu, `/bin/sh` defaults to `dash` whose built-in `echo` command does not support the `-e` flag. `printf`, on the other hand, supports backslash escapes by default so we use that instead.
In passing, also clean up some messy ANSI escape codes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3671
-- Commit Summary --
* utils: Prefer `printf` over `echo -e`.
-- File Changes --
M pkg/kamailio/obs/kamailio.init (2)
M …
[View More]utils/kamctl/kamctl (2)
M utils/kamctl/kamctl.base (10)
M utils/kamctl/kamdbctl (6)
M utils/kamctl/kamdbctl.base (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3671.patchhttps://github.com/kamailio/kamailio/pull/3671.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3671
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3671(a)github.com>
[View Less]
Hi
I have a kimailio box that receives messages from one interface and send it from another interface and I use dispatcher module successfully.
Now I assigned an I range to Linux loopback interface through Linux kernel anyip feature. And I can ping the range.
ip -4 route add local 192.168.0.0/24 dev lo
I want to send messages from source of the ip in this range but kamailio cant do this in the right way.
I added this two directives to kamailio.cfg:
mhomed=yes
ip_free_bind = 1
and …
[View More]when I want to use an ip from the list I use
$fs=”udp:192.168.0.120:5060”;
With no luck
If I use
force_send_socket(udp:192.168.0.120:5060);
kamailio returns an error
bad force_send_socket argument: 192.168.0.120:5060 (kamailio doesn't listen on it)
and if I add listen directive for one ip like:
listen=udp:192.168.0.120:5060
everything works fine but I want to be able to use any ip from list not just one ip.
Thanks.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3394
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3394(a)github.com>
[View Less]
When used `tcp_accept_haproxy=yes` and inbound connection from load-balancer received via IPv6 protocol and client real IPv4 then i can see error in the kamailio log
```
28(723055) ERROR: {1 27 REGISTER 4fkReTbLC-} siptrace [siptrace_hep.c:94]: trace_send_hep3_duplicate(): interworking detected ?
```
Looks like requried add haproxy protocol support into siptrace module
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3665
You are receiving …
[View More]this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3665(a)github.com>
[View Less]