Hello,
In the kamailio core cookbook (https://www.kamailio.org/wiki/cookbooks/5.5.x/core#event_route) I read that the name of an event_route should be like this:
event_route[groupid:eventid]
Where:
groupid - should be the name of the module that triggers the event
eventid - some meaningful short text describing the event
Some modules of kamailio have underscores in the name, for example: http_async_client
Years ago a fix have been committed in order to allow underscores in the second part of the name, after the semicolon:
https://github.com/kamailio/kamailio/commit/5806703c1ff72243457ff55758f41c3…
But it seems that an underscore is still not allowed in the first part of the name:
https://github.com/kamailio/kamailio/blob/master/src/core/cfg.lex
EVENT_RT_NAME [a-zA-Z][0-9a-zA-Z-]*(":"[a-zA-Z][0-9a-zA-Z_-]*)+
So I wonder if this is a bug in the code or a mistake in the cookbook.
Thanks,
Luca
Hello,
a short announcement to inform that the dates for next Kamailio World
Conference have been set to April 18-19, 2024, the event to take place
again in Berlin, Germany. It will be a different venue than the past
editions, that one not being available. A pre-conference day is
considered on April 17, 2024, but it is not yet known in what form and
where.
The conference is scheduled a bit earlier than the usual in the year
because Germany hosts the Euro 2024 football championship during
June-July 2024, making May very busy and harder to find adequate
conferencing space in Berlin.
The website and more details will be published soon.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com
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: 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);