Hello,
I'm using Kamailio as SIP redirect where SBC sends INVITE packet to kamailio and "302","Multiple Choices" is sent back to SBC.
What I want is to modify the URI part in the To header of the Multiple Choices packet sent from kamailio. I tried to use uac_replace_to("","sip:$var(cdpn)@$td") where $var(cdpn) is already defined in the routing logic, but it's not reflected and the original TO URI is sent instead.
Any help to handle this issue is much appreciated.
Regards,
I receiving INVITE with two Route header (no to tag).
First Route header is my Kamailio host.
Second Route header is next hop after Kamailio.
I need to get value of next hop.
I tried to use "$route_uri" after "loose_route" but his deos works.
"$route_uri" always use top Route header.
But in the INVITE first Route header is Kamailio host.
Is any change to get top Route header after "loose_route"?
Hello,
we work on a mobile softphone which connects to asterisk through kamailio. Almost everything is fine except one thing.
Asterisk allows only one registration to an AOR. In mobile environment network can change, register/unregister can be called frequently in foreground/background cases.
Kamailio forwards every request to asterisk. Until I have only one connection between kamailio – asterisk, everything is fine.
The next situation is problematic:
1. Client A and client B register to asterisk through kamailio. –> there will be one connection between kamailio and asterisk
2. Client A calls client B. • one connection exist still
3. If client A terminates the call -> one connection remains. It is okay.
4. If client B terminates the call -> a new connection appears (kamailio IP with new port)
After case 4 If I try to register again, I got 403 from asterisk, since the setting of asterisk does not allowed to register from different IP:port for the same AOR. (this behaviour cannot be changed now).
The question: is there any setting/config exist in kamailio not to create new connection for a BYE in above case.
Thanks in advance for your reply.
Peter
Hello,
Can one kama process iterate a htable using sht_iterator_start(), sht_iterator_next(), sht_iterator_rm(), sht_iterator_end() while some other kama process call sht_rm(htable, item) ?
I've looked into code and to me it looks like slots are locked ok. The entire linked list(specific to a slot) where the item might be, is locked, so this means there should be no problems, right?
Thank you,
Stefan
Hi
I have a kamailio 5.7.1 running as TLS gateway for PBXs in private LAN
network:
UAC-WAN(sip-tls) <--> kamailio-WAN(sip-tls) - kamailio-LAN(sip) <-->
PBX-LAN(sip)
80.0.0.1 <--> 80.0.0.2 - 10.0.0.1 <--> 10.0.0.2
All communications tested works well except for re-INVITE like when UAC
put the call on hold .
The re-INVITE packet is managed like a new call
and the tm module doesn't match transaction :
matching_3261(): RFC3261 transaction matching failed - via branch
[z9hG4bK-524287-1---5e900485d5ad0faf]
t_lookup_request(): no transaction found
build_cell(): created new cell
t_relay_to(): new INVITE
I try to send the interesting logs and config
call logs and pcap : https://filebin.net/vdezuhyn7wdy3lqc
kamailio config :
...
request_route {
if (is_method("CANCEL")) {
if (t_check_trans()) {
route(RELAY);
}
exit;
}
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
route(WITHINDLG);
if ($si=="PBXIP0" || $si=="PBXIP1" || $si=="PBXIP2" ||
$si=="PBXIP3" ) {
if (!loose_route()) {
switch($rc) {
case -2:
sl_send_reply("403", "Forbidden");
exit;
}
}
remove_hf("Route");
force_rport();
record_route();
$fs = "tls:WANIP:5061";
}
if (is_method("INVITE|SUBSCRIBE")){
record_route();
}
t_on_failure("MANAGE_FAILURE");
$fs = "udp:LANIP:5060";
}
route(RELAY);
exit;
}
route[WITHINDLG] {
if (!has_totag()) return;
if ($si=="PBXIP0" || $si=="PBXIP1" || $si=="PBXIP2" ||
$si=="PBXIP3") {
route(RTPMANAGE);
route(RELAY);
exit;
}
if (loose_route()) {
if ( is_method("NOTIFY") ) {
record_route();
}
route(RTPMANAGE);
route(RELAY);
exit;
}
if ( is_method("ACK|BYE") ) {
route(RTPMANAGE);
route(RELAY);
}
sl_send_reply("404","Not here");
exit;
}
How can I solve this ?
Best Regards
Leo
I catched issue with
In the Kamailio logs i see
ssl bug #1491 workaround: not enough memory for safe operation:
shm=10219080 threshold2=11796480
Current stat about shared memory
[root@sbc-a1 ~]# kamctl stats shmem
{
"jsonrpc": "2.0",
"result": [
"shmem:fragments = 528",
"shmem:free_size = 11343104",
"shmem:max_used_size = 124449952",
"shmem:real_used_size = 122874624",
"shmem:total_size = 134217728",
"shmem:used_size = 58728144"
],
"id": 703182
}
But when kamailio started
[root@sbc-a1 ~]# kamctl stats shmem
{
"jsonrpc": "2.0",
"result": [
"shmem:fragments = 122",
"shmem:free_size = 112534264",
"shmem:max_used_size = 22372528",
"shmem:real_used_size = 21683464",
"shmem:total_size = 134217728",
"shmem:used_size = 12833888"
],
"id": 703670
}
What is stange a lot of fragments.
How it can be troubleshooted?
Can memory manager show info about each fragment like when fragment are
created an and which module requested fragment?
Hello everyone!
I had a Kamailio 5.6.4 server using the DB_REDIS module for quite some time without a password on the Redis DB working just fine.
A few days ago I decided to add a password to Redis and modify the Kamailio config file with the following line per the documentation to be able to authenticate:
modparam("db_redis", "db_pass", "r3d1sPass")
Since that moment, I see the following errors in the Kamailio logs:
......
kamailio: ERROR: <core> [core/modparam.c:175]: set_mod_param_regex(): parameter <db_pass> of type <1:string> not found in module <db_redis>
kamailio: CRITICAL: <core> [core/cfg.y:3790]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 556, column 49: Can't set module parameter
......
The documentation I am reading is here:
https://www.kamailio.org/docs/modules/devel/modules/db_redis.html#db_redis.…
Could someone help me figure out what I am doing wrong?
Many thanks,
Nick
Hello,
On 5.6.4, i’m trying to perform mwi pua_json, but cannot get it working.
I have a doubt about my json and spent some time to make variations on json without success.
Does one of you played with it and can tell me if something is wrong about this json ?
{
"Event-Package":"message-summary",
"Event-Name":"update"
"expires":3600,
"From":sip:ccoca@dff.com,
"To":sip:ccoca@dff.com,
"Message-Account":sip:ccoca@dff.com,
"Messages-Waiting":"yes",
"MWI-Voice-Message":"2/8 (0/0)",
"Messages-New":"2",
"Messages-Saved":"8",
"Messages-Urgent":"0",
"Messages-Urgent-Saved":"0",
"From-Realm":"dff.com",
"From-User":"ccoca",
"Call-ID":0_845806535@10.22.22.22<mailto:0_845806535@10.22.22.22>,
}
Regards,
David
Hello,
We are trying to build a lightweight SBC solution for some external peers, but currently there is a mixed environment which is handled by Asterisk.
We have some "peers" with IP based auth, and also some "subscribers" with register.
We have succeded with the subscribers, because we can handle the numbers for those type of users with aliases in Kamailio. So basically we have a subscriber, lets call it "test", and we can add aliases for the subscriber like "3612345678@localhost", then if we are calling the number the routing goes to the contact of "test" subscriber.
Currently the problem is that we dont have any idea about the IP based peers, because those peers not registering, so we cannot create aliases for them as far as i know.
How do you solve this type of problem? Maybe im overcomplicating the situation, but i havent got any solutions in my mind currently.
Thanks for your help and ideas.
With kind regards,
Zoltan
Hi Jakub
Although no direct experience with this exactly as you have described I have used HTTP API out of Kamailio quite a bit and into other services. Which yes some ultimatly end in AWS> Having done our's in KEMI there is some difference however from our experience we did notice some of this didn't fair well under a loads test scenario. We tested Kafka vs Kamailio HTTP API Modules vs Aiohttp (Python in Kemi) and Kafka significantly out perfomed in terms of the load test. We then had to rejig things to account for this instead of HTTP API. If this is ever going to be under intense load. Maybe make sure you do the load testing early on before you ratify your design. Also make sure all your error habndling is in place and working to prevent issues in Kamailio if something API side goes wrong.
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email.