Hello,
in preparation for releasing v4.3.0 next week, I updated the specs for
building RPMs from branch 4.3. However, I am not able to test the
results, just made sure the build is ok.
Packages are available at:
-
https://build.opensuse.org/package/show/home:kamailio:v4.3.x-rpms/kamailio43
I hope people here using RPMs will do some tests and provide feedback,
interested mainly in:
- it installs ok
- after install, it starts ok with default configuration file
- fifo and unix sockets are created now in /var/run/kamailio, so it has
to be checked they are there
- kamctl works ok for commands: ps, uptime and 'mi version'
Some modules are not packaged in various versions, as I could not spot
what are the packages needed for building them and if they are available
with different names. For example, apparently jansson lib is on redhat,
but not on centos, libev doesn't seem to be there. Also, I haven't had
time to look at packaging erlang module.
Help with the above is appreciated as well as helping building RPMs
genrally. Maybe the init.d script needs to be reviewed and updated as well.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
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
Hello,
I have noticed, that indexes with special chars gets duplicated in htables-es.
When I insert to htable a value with index like:
`1335199467::3339-516-53201517440-VM1-1-212.232.17.91::to:: some_value`
then I dump the elements using fifo sht_dump I see the same entry duplicated with slightly modfied index:
`1335199467::3339-516-53201517440-VM1-1-212.232.17.91::to:: some_value
1335199467::3339-516-53201517440-VM1-1-212_232_17_91::to:: some_value`
So to be clear.
Only 1 value is inserted and when I dump it I see 2 values in the htable. This happens when indexes with a dot are inserted to a htable and makes me some trouble when doing replication over multiple kamailios.
I consider it as a bug as using htable.sets I cant insert the both values to another node when doing manual replication of htableses.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/191
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