Added 2 new params to the debugger module such as the per module facility logging is now possible.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/175
-- Commit Summary --
* debugger: add support for static and dynamic, module specific, logging facility
* debugger: updated documentation for the new facility parameters.
-- File Changes --
M dprint.c (45)
M dprint.h (17)
M modules/debugger/debugger_api.c (176)
M modules/debugger/debugger_api.h (2)
M modules/debugger/debugger_config.c (6)
M modules/debugger/debugger_config.h (3)
M modules/debugger/debugger_mod.c (47)
M modules/debugger/doc/debugger_admin.xml (58)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/175.patchhttps://github.com/kamailio/kamailio/pull/175.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/175
Hello,
This pull request adds 2 features.
--Prioritize the trusted records (highest to lowest priority)
--Match from-uri AND request-uri, if either is blank only one is matched.
Please review the pull request and let me know if any other changes are needed.
Thank you.
Emmanuel
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/152
-- Commit Summary --
* added RURI-pattern matching and priority
-- File Changes --
M modules/permissions/hash.c (65)
M modules/permissions/hash.h (8)
M modules/permissions/permissions.c (4)
M modules/permissions/permissions.h (2)
M modules/permissions/trusted.c (103)
M utils/kamctl/db_sqlite/permissions-create.sql (6)
M utils/kamctl/mysql/permissions-create.sql (6)
M utils/kamctl/oracle/permissions-create.sql (6)
M utils/kamctl/postgres/permissions-create.sql (6)
M utils/kamctl/xhttp_pi/permissions-table (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/152.patchhttps://github.com/kamailio/kamailio/pull/152.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/152
Implement load and restore of usrloc contact attributes in the t_load_contacts, t_next_contacts and t_next_contact_flows functions in tm module.
Includes documentation of the new tm parameter 'xavp_contact'
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/178
-- Commit Summary --
* usrloc: Update documentation concerning xavp_contact parameter
* tm: Load and restore contact attributes when serial forking
-- File Changes --
M modules/tm/README (310)
M modules/tm/doc/params.xml (21)
M modules/tm/t_serial.c (51)
M modules/tm/tm.c (2)
M modules/usrloc/README (6)
M modules/usrloc/doc/usrloc_admin.xml (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/178.patchhttps://github.com/kamailio/kamailio/pull/178.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/178
Hello. I need parallel forking calls with the same username. (Call to all contacts with name for example User123), my endpoints may be WebSocket based and standart UDP endpoints. And I use rtpengine_manage for managing calls wor webphones and standart softh/hard phones.
I get all contacts manually and than at the branch route set rtpengine_manage settings for every call.
It works fine but it works for one kamailio server.
When I use 2 kamailio servers as load balansers Server that handle call get all endpoints from location but call to only one, that registred only at ths server
for example I call user123
I have 3 contacts
user123(a)1.2.3.4 - was registered at kamailio 1
user123(a)3.2.1.4 - was registered at kamailio 2
user123(a)4.3.2.1 - was registered at kamailio 1
So if call goes through kamailio 1 it call only to user123(a)1.2.3.4 and user123(a)4.3.2.1
I use this settings for usrloc at 2 kamailios to share all table between 2 servers
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "user_column", "username")
modparam("usrloc", "contact_column", "contact")
modparam("usrloc", "expires_column", "expires")
modparam("usrloc", "q_column", "q")
modparam("usrloc", "callid_column", "callid")
modparam("usrloc", "cseq_column", "cseq")
modparam("usrloc", "methods_column", "methods")
modparam("usrloc", "cflags_column", "cflags")
modparam("usrloc", "user_agent_column", "user_agent")
modparam("usrloc", "received_column", "received")
modparam("usrloc", "socket_column", "socket")
modparam("usrloc", "path_column", "path")
modparam("usrloc", "ruid_column", "ruid")
modparam("usrloc", "instance_column", "instance")
modparam("usrloc", "use_domain", 1)
and this code for calling them
[GET_CONTACTS]
{
sql_query("ca", "select contact from location where username='$tU'", "ra");
xlog("rows: $dbr(ra=>rows) cols: $dbr(ra=>cols)\n");
if($dbr(ra=>rows)>0){
$var(i)=0;
while($var(i)<$dbr(ra=>rows)){
xlog("L_INFO","SQL query return contact {$dbr(ra=>[$var(i),0])} for {$tU} at step {$var(i)}\n");
if ($dbr(ra=>[$var(i),0])=~"transport=ws"){
xlog("L_INFO", "This is a Websocket call to endpoint");
sql_pvquery("ca", "select received from location where contact='$dbr(ra=>[$var(i),0])'","$var(recieved)");
$du=$var(recieved);
xlog("L_INFO","SQL query return recieved {$var(recieved)} for {$tU}. Destination is {$du}\n");
append_branch("sip:$tU@$(du{s.select,1,:})");
}
else
{
xlog("L_INFO", "This is a classic UDP call to endpoint");
$var(recieved)='';
sql_pvquery("ca", "select received from location where contact='$dbr(ra=>[$var(i),0])'","$var(recieved)");
xlog("L_INFO", "SQL query return RECIEVED {$var(recieved)}");
if ($var(recieved)==0){
xlog("L_INFO", "Recieved string is EMPTY");
$du="sip:"+$(dbr(ra=>[$var(i),0]){s.select,1,@});
}
else {
xlog("L_INFO", "Recieved string is {$var(recieved)}");
$du=$var(recieved);
}
$var(UDP_contact)="sip:"+$(dbr(ra=>[$var(i),0]){s.select,1,@});
append_branch("sip:$tU@$(du{s.select,1,:})");
xlog("L_INFO","Classic Destination URI is {$dbr(ra=>[$var(i),0])} for {$tU}}. Destination is {$du}\n");
}
$var(i) = $var(i) + 1;
}
}
t_on_branch("1");
return;
}
}
}
branch_route[1]{
if($du=~"transport=ws"){
xlog("L_INFO","Websocket Branch is {$du} for {$tU}\n");
rtpengine_manage("internal extenal force trust-address replace-origin replace-session-connection ICE=force RTP/SAVPF");
t_on_reply("REPLY_FROM_WS");
}
else{
xlog("L_INFO","UDP Branch is {$du)} for {$tU}\n");
rtpengine_manage("replace-origin replace-session-connection ICE=remove RTP/AVP");
t_on_reply("MANAGE_CLASSIC_REPLY");
}
}
When it try to branch endpoint without registration at server that handle call I get errors that tm module can not build Via header
*via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be
found*
*ERROR: <core> [msg_translator.c:1725]: build_req_buf_from_sip_req():
could not create Via header*
*ERROR: <core> [forward.c:607]: forward_request(): ERROR:
forward_request: building failed*
UDP calls get errors something like above (sorry than can not share error code, This situation not often).
So I think I have this trouble because I use manually handling call and tried to substitute to lookup_branches function. but I have no Idea how to set rtpengine_manage paraments for each endpoint depending this is websocket or standart call.
IF there is write problem for callings thhrough 2 kamailios as load balansers please let me know about how to set rtpengine_manage parametrs wor endpoints for every fork. If not- can you tell me how I can call to all endpoints endepending of registration server (kamailio 1 or 2).
But with another side I can not understand why kamailio 2 don't see registrations at kamailio1 (or 1 from 2). May be this is trouble of usrloc module. That's why I write this problem here.
Thanks.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/53
In order to get rid of any occurrence of ```/tmp``` in modules, introduce a ```RUN_DIR``` make option and every module should honor it
default could be ```/var/run/$(NAME)```
Related to #48
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/80
Please refer to closed issue #124.
Problem not solved... still seeing "stuck" registrations. Note that in this case, I'm not getting a timeout response back from the UAS. The case where I'm seeing the issue is when the UAS never responds at all.
I don't think adding the line to reset UAC_REG_ONGOING and UAC_REG_AUTHSENT at the error: label really changed anything, since the done: label, which immediately follows it, already reset those flags (and would be executed on the goto error).
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/149
mtree.h defines MT_MAX_DEPTH as 32 and the tprefix database table field is defined as a varchar(32) but the module fails to start if a prefix of 32 characters is present in the database table mapped to the mtree. The error message on start is:
> 0(10465) ERROR: mtree [mtree.c:156]: mt_add_to_tree(): max prefix len exceeded
> 0(10465) ERROR: mtree [mtree_mod.c:603]: mt_load_db(): Error adding info to tree
To reproduce do the following:
Kamailio script:
```
loadmodule "mtree.so"
modparam("mtree", "db_url", DBURL)
modparam("mtree", "mtree", "name=mtree;dbtable=mtree;type=0;multi=0")
modparam("mtree", "char_list", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-.")
```
MySQL:
(create a table called mtree per the code in utils/kamctl/mysql/mtree-create.sql)
```sql
insert into mtree values (1, '12345678901234567890123456789012', 'foo', 'bar', current_timestamp, 'baz');
```
Start kamailio and observe that it fails to start. Enable debugging to see the error messages specified above.
Changing the tprefix to '1234567890123456789012345678901' makes Kamailio start successfully.
I propose a fix would entail making Kamailio support prefixes of 32 characters since we then can use GUIDs/UUIDs as "prefixes" without alteration and also adding to the mtree documentation that the maximum prefix length is 32 characters. Another fix would be to let the mtree code be but change the table creation scripts under utils/kamctl/ to create the tprefix field as varchar(31) (and add info about the constraint to the documentation).
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/179