Module: sip-router
Branch: master
Commit: e973bbe5e7310861f77b17ce0afaf1cca35fe48a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e973bbe…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Fri May 28 15:38:41 2010 +0300
modules/tm: new implementation of load_contacts()/next_contacts()
- Simpler implementation of load_contacts()/next_contacts() functions
based on recent changes related to Request-URI handling.
- Function next_contacts() does not anymore set any timers. Check
contact_avp and call t_set_fr() before calling t_relay() instead.
- Removed fr_timer_next module parameter, because it is not needed
anymore.
---
modules/tm/README | 255 ++++++++++++++------------------------
modules/tm/doc/functions.xml | 51 +++-----
modules/tm/doc/params.xml | 73 -----------
modules/tm/doc/tm.xml | 15 +--
modules/tm/t_serial.c | 279 ++++++++++++------------------------------
modules/tm/tm.c | 1 -
6 files changed, 190 insertions(+), 484 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=e97…
i understood that module functions can now have an arbitrary number of
string, int and pseudo var arguments, where string arguments can
possibly also contain pseudo variables.
some time ago i asked an example on how this is done, but didn't get any
reply. so i'll try again. for example, allow_trusted function is
now defined like this:
{"allow_trusted", (cmd_function)allow_trusted_2, 2, fixup_pvar_pvar,
fixup_free_pvar_pvar, REQUEST_ROUTE | FAILURE_ROUTE},
how can i add a third argument to the function without needing to define
yet another fixup_pvar_pvar_something?
-- juha
I've got a strange issue with the latest kamailio. I also had this
problem with kamailio 3.0.3 downloaded from the webpage.
I can start kamailio, but after a while (sometimes within one minuten,
sometimes after an hour),
I get the following log errors:
Oct 12 15:46:24 sp01 /sbin/kamailio[26621]: ERROR: <core> [db.c:387]:
invalid type (3) or nul (0) version columns for trusted
Oct 12 15:46:24 sp01 /sbin/kamailio[26621]: ERROR: <core> [db.c:405]:
querying version for table trusted
Oct 12 15:46:24 sp01 /sbin/kamailio[26621]: ERROR: permissions
[trusted.c:249]: error during table version check.
Oct 12 15:46:24 sp01 /sbin/kamailio[26621]: ERROR: <core>
[sr_module.c:832]: init_mod_child(): Error while initializing module
permissions (//lib/kamailio/modules_k/permissions.so)
Oct 12 15:46:24 sp01 /sbin/kamailio[26621]: ERROR: <core> [pt.c:481]:
ERROR: fork_tcp_process(): init_child failed for process 10, pid 26621,
"tcp receiver child=0"
Oct 12 15:46:24 sp01 /sbin/kamailio[26621]: ERROR: <core>
[tcp_main.c:4811]: ERROR: tcp_main: fork failed: Success
Oct 12 15:46:24 sp01 /sbin/kamailio[26625]: : <core> [pass_fd.c:103]:
ERROR: recv_all: 1st recv on 21 failed: Connection reset by peer
Oct 12 15:46:24 sp01 /sbin/kamailio[26625]: : <core> [tcp_main.c:3323]:
ERROR: handle_tcp_child: read from tcp child 0 (pid 26621, no 10)
Connection reset by peer [104]
Oct 12 15:46:24 sp01 /sbin/kamailio[26625]: : <core> [pass_fd.c:293]:
ERROR: receive_fd: EOF on 19
Oct 12 15:46:24 sp01 /sbin/kamailio[26611]: ALERT: <core> [main.c:738]:
child process 26621 exited normally, status=255
Oct 12 15:46:24 sp01 /sbin/kamailio[26611]: INFO: <core> [main.c:756]:
INFO: terminating due to SIGCHLD
Oct 12 15:46:24 sp01 /sbin/kamailio[26625]: INFO: <core> [main.c:807]:
INFO: signal 15 received
Looking at the error message, it thinks that the column type of
table_version in the table version is a string (type 3), and it should
be an int (type 1).
But in the database it really is an int.
When I run kamailio with debugging on level 5, I see that it's trying to
run the "select table_version from version where table_name='trusted'"
several times when kamailio starts (for every child thread).
And then minutes, of even an hour later, it suddenly continues with that
check, but based on a database response from another query.
This is the "select password from subscriber ....etc...".
And that column is indeed an string.
I'm using PostgreSQL 8.4 as server,
but maybe someone has seen this before, or now where I have to start
looking?
I first saw it yesterday when started to use the permissions module.
I only see this with the trusted table,
And always it uses the "select password from subscriber ... " response
when giving this error.
So is this an error in the permissions module / trusted.c file?
or something in auth_db that's not freeing the response correctly?
Strange thing is, that is sometimes happens very quick, and sometimes it
can take an half hour or hour.
I can mail the full log if anybody is interested and thinks he/she can
help me.
With kind regards,
Robert Verspuy
--
*Exa-Omicron*
Patroonsweg 10
3892 DB Zeewolde
Tel.: 088-OMICRON (66 427 66)
http://www.exa-omicron.nl
hello,
just started using the dialog module with kamailio 3.1.0 and getting
segfaults whenever get_profile_size() is executed. here's a stack trace:
Core was generated by `kamailio'.
Program terminated with signal 11, Segmentation fault.
#0 0x003c729e in w_get_profile_size (msg=0x834d8b4, profile=0xb60823f8
"\224$\b\266\t", value=0x831cb40 "\004",
result=0x8340900 "\001") at dialog.c:767
767 if(sp_dest->setf(msg, &sp_dest->pvp, (int)EQ_T, &val)<0)
(gdb) bt
#0 0x003c729e in w_get_profile_size (msg=0x834d8b4, profile=0xb60823f8
"\224$\b\266\t", value=0x831cb40 "\004",
result=0x8340900 "\001") at dialog.c:767
#1 0x08057770 in do_action (h=0xbff5fcb8, a=0x8328f2c, msg=0x834d8b4) at
action.c:1105
#2 0x0805ea3c in run_actions (h=0xbff5fcb8, a=0x8328f2c, msg=0x834d8b4) at
action.c:1553
#3 0x080576c0 in do_action (h=0xbff5fcb8, a=0x832c794, msg=0x834d8b4) at
action.c:711
#4 0x0805ea3c in run_actions (h=0xbff5fcb8, a=0x832c794, msg=0x834d8b4) at
action.c:1553
#5 0x0805ed71 in run_actions_safe (h=0xbff606e8, a=0x832c794,
msg=0x834d8b4) at action.c:1605
#6 0x080f5d44 in rval_get_int (h=0xbff606e8, msg=0x0, i=0xbff600d8,
rv=0xbff5f694, cache=0x0) at rvalue.c:904
#7 0x080fb4fb in rval_expr_eval_int (h=0xbff606e8, msg=0x834d8b4,
res=0xbff600d8, rve=0x832c9c4) at rvalue.c:1866
#8 0x080fb5d0 in rval_expr_eval_int (h=0xbff606e8, msg=0x834d8b4,
res=0xbff60394, rve=0x832cdac) at rvalue.c:1873
#9 0x08057511 in do_action (h=0xbff606e8, a=0x832db7c, msg=0x834d8b4) at
action.c:1069
#10 0x0805ea3c in run_actions (h=0xbff606e8, a=0x832be40, msg=0x834d8b4) at
action.c:1553
#11 0x080576c0 in do_action (h=0xbff606e8, a=0x8313b88, msg=0x834d8b4) at
action.c:711
#12 0x0805ea3c in run_actions (h=0xbff606e8, a=0x83003cc, msg=0x834d8b4) at
action.c:1553
#13 0x0805ecf4 in run_top_route (a=0x83003cc, msg=0x834d8b4, c=0x0) at
action.c:1626
#14 0x080dceab in receive_msg (
buf=0x82a7740 "INVITE sip:*98@pipeline.bbpsphone.net SIP/2.0\r\nCall-ID:
6fb1466b73075c7ad55f278f86ff6b27@0:0:0:0:0:0:0:0\r\nCSeq: 2 INVITE\r\nFrom:
\"Eugene Oden\"
<sip:goden.atl1@pipeline.bbpsphone.net<sip%3Agoden.atl1(a)pipeline.bbpsphone.net>>;tag=56dc2460\r\nTo:
"..., len=1538, rcv_info=0xbff608f8)
at receive.c:205
#15 0x0816eef7 in udp_rcv_loop () at udp_server.c:532
#16 0x080ad9e1 in main_loop () at main.c:1554
#17 0x080b1126 in main (argc=1, argv=0xbff60bd4) at main.c:2398
and the relevant bits of configuration - not sure if its correct:
...
loadmodule "dialog.so"
modparam("dialog", "dlg_flag", 4);
modparam("dialog", "profiles_no_value", "voicemail");
...
route {
...
if (is_method("INVITE")) {
dlg_manage();
setflag(4);
}
...
if (! route(LIMIT_VOICEMAIL)) {
xdbg(" SCRIPT: Voicemail limit exceeded\n");
sl_send_reply("503", "Service Unavailable");
exit;
}
...
}
...
route[LIMIT_VOICEMAIL] {
get_profile_size("voicemail", "$avp(size)");
if ($avp(size) >= 1) {
return -1;
}
set_dlg_profile("voicemail");
return 1;
}
any thoughts?
gene
I noticed that the textops module assumes that it is always operating on the
original message; with no regard to the existing lumped modifications. This
makes the successive application of textops (and some other operations as
well such as nathelper) incorrect. Is this true, or am I missing something?
maged
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Juha Heinanen (jh)
Attached to Project - sip-router
Summary - user friendly module function declaration
Task Type - Improvement
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - instead of telling, how many arguments a module function has and what fixup function to use, number and kinds of the arguments could be specified by a string of letters, such as, i = expression yielding to an int value, s = expression yielding to a string value, v = script variable, a = avp, p = any pseudo variable. for example, in
{"printx", (cmd_function)print_fx, "sip", 0, REQUEST_ROUTE}
printx would have 3 arguments, first one a sting valued expression, second an int valued expression and third a pseudo variable.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=99
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#99 - user friendly module function declaration
User who did this - Juha Heinanen (jh)
http://sip-router.org/tracker/index.php?do=details&task_id=99
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Juha Heinanen (jh)
Attached to Project - sip-router
Summary - continue statement for while loop
Task Type - Feature Request
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - It would make config scripts involving while loops cleaner if next iteration of the while loop could be activated by "continue" statement.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=98
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#98 - continue statement for while loop
User who did this - Juha Heinanen (jh)
http://sip-router.org/tracker/index.php?do=details&task_id=98
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.