Hello Experts,
I need your advice on the following issue if you can kindly help.
I am working on a hold call flow:
UA - > Kamailio (RTP Engine) - > FS
initial call establishes fine, RTP engine is invoked and SDP media IP is modified correctly. Then
1.
I am receiving a hold re-invite with a send-only
2.
I see Kamailio is changing the media IP in the SDP (with my RTP engine IP) when it sends the Invite to my core FS server.
3.
FS sends 200 OK with a=recvonly
4.
Kamailio relays the message as it is to the other leg.
can someone advise me, on how can I invoke rtpengine at step 4, so the SDP is sent with my media server IP in the 200 OK?
--- 200 OK from FS ----
SIP/2.0 200 OK
Via: SIP/2.0/UDP 13.54.01.02:5060;branch=z9hG4bKd2e8.8a573af8d927f67c1db4550676f8be88.0;i=1
Via: SIP/2.0/TCP 192.168.10.117:51280;received=218.33.01.02;rport=51280;branch=z9hG4bKPj7d1d8968830d4ed3922eec7da7cdc17c;alias
Record-Route: <sip:13.54.01.02:5060;r2=on;lr=on>
Record-Route: <sip:13.54.01.02;transport=tcp;r2=on;lr=on>
From: <sip:0403225908@trunk.xyz.corp>;tag=6a180ffa7f824972a2c59ba47f293acb
To: <sip:+61285038000@trunk.xyz.corp>;tag=DZrpcpgS1BDKF
Call-ID: 4154062196634c34a2dbcb6b612bf44c
CSeq: 12263 INVITE
Contact: <sip:+61285038000@54.88.54.88:5060;transport=udp>
User-Agent: UserAgentX/v1.0
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Require: timer
Supported: timer, path, replaces
Session-Expires: 1800;refresher=uac
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 266
v=0
o=FreeSWITCH 1724635755 1724635757 IN IP4 54.88.54.88
s=FreeSWITCH
c=IN IP4 54.88.54.88
t=0 0
m=audio 21202 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=recvonly
a=ptime:20
a=rtcp:21203 IN IP4 54.88.54.88
--- 200 OK relayed towards the UA ----
2024/08/26 17:22:39.923639 172.16.8.126:5060 -> 218.33.78.33:51280
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.10.117:51280;received=218.33.01.02;rport=51280;branch=z9hG4bKPj7d1d8968830d4ed3922eec7da7cdc17c;alias
Record-Route: <sip:13.54.01.02:5060;r2=on;lr=on>
Record-Route: <sip:13.54.01.02;transport=tcp;r2=on;lr=on>
From: <sip:0403225908@trunk.xyz.corp>;tag=6a180ffa7f824972a2c59ba47f293acb
To: <sip:+61285038000@trunk.xyz.corp>;tag=DZrpcpgS1BDKF
Call-ID: 4154062196634c34a2dbcb6b612bf44c
CSeq: 12263 INVITE
Contact: <sip:+61285038000@54.88.54.88:5060;transport=udp>
User-Agent: UserAgentX/v1.0
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Require: timer
Supported: timer, path, replaces
Session-Expires: 1800;refresher=uac
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 266
v=0
o=FreeSWITCH 1724635755 1724635757 IN IP4 54.88.54.88
s=FreeSWITCH
c=IN IP4 54.88.54.88
t=0 0
m=audio 21202 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=recvonly
a=ptime:20
a=rtcp:21203 IN IP4 54.88.54.88
my configs for within dialog route:
#####
route[WITHINDLG] {
append_hf("X-Test-Header: route_WITHINDLG\r\n");
if (has_totag()) {
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
if (is_method("ACK")) {
xlog("L_INFO", "Relaying ACK\n");
}
if (is_method("INVITE|UPDATE")) {
if (has_body("application/sdp") && search_body("m=image") && search_body("T38")) {
xlog("L_INFO", "T.38 re-INVITE detected, skipping rtpengine invocation\n");
} else {
xlog("L_INFO", "Non-T.38 INVITE detected, invoking rtpengine\n");
rtpengine_manage("replace-origin replace-session-connection");
}
}
route(RELAY);
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
route(PRESENCE);
exit;
}
if (is_method("ACK")) {
if (t_check_trans()) {
t_relay();
exit;
} else {
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
}
#####
looking forward to your usual guidance.
Thank you!
Regards,
Shah
Hello,
I encountered a problem stopping Kamailio with FIPS OpenSSL:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff7292380ac in OPENSSL_sk_pop () from /lib64/libcrypto.so.3
Missing separate debuginfos, use: dnf debuginfo-install
kamailio-5.7.3-4816.x86_64
(gdb) bt
#0 0x00007ff7292380ac in OPENSSL_sk_pop () from /lib64/libcrypto.so.3
#1 0x00007ff72914bf5b in conf_modules_finish_int () from /lib64/libcrypto.so.3
#2 0x00007ff72914c694 in CONF_modules_unload () from /lib64/libcrypto.so.3
#3 0x00007ff7291efff9 in OPENSSL_cleanup () from /lib64/libcrypto.so.3
#4 0x00007ff72954702b in ?? ()
#5 0x0000000100061c08 in ?? ()
#6 0x00007ff7190566c8 in ?? ()
#7 0x00007ffccf196a20 in ?? ()
#8 0x000000000071da8a in futex_release (lock=0x7ff729f08b50 <syslog>)
at core/mem/../mem/../futexlock.h:134
#9 0x00000000006e9448 in destroy_tls () at core/tls_hooks.c:75
#10 0x000000000041f278 in cleanup (show_status=1) at main.c:594
#11 0x0000000000420af1 in shutdown_children (sig=15, show_status=1) at
main.c:721
#12 0x0000000000421717 in handle_sigs () at main.c:752
#13 0x0000000000430c88 in main_loop () at main.c:1988
#14 0x0000000000439d13 in main (argc=14, argv=0x7ffccf1973f8) at main.c:3212
(gdb)
Environment:
Oracle Linux Server 9.3
Kamailio 5.7.3
yum list --installed | grep ssl
openssl.x86_64 10:3.0.7-24.0.3.el9_fips
@tools
openssl-libs.x86_64 10:3.0.7-24.0.3.el9_fips
@tools
openssl-pkcs11.x86_64 0.4.11-7.el9
@anaconda
xmlsec1-openssl.x86_64 1.2.29-9.el9
@AppStream
What can I do for further investigation?
Thanks
Hello all,
I wanted to inform you about an upcoming change regarding the syntax we use for defining socket names in the listen (-l) command line argument.
Current Syntax:
-l udp:10.10.10.10:5060/11.11.11.11:5060
Proposed Options:
1. -l udp:10.10.10.10:5060/11.11.11.11:5060=s1
2. -l s1=udp:10.10.10.10:5060/11.11.11.11:5060 ( A draft PR about this option can be found in https://github.com/kamailio/kamailio/pull/3954)
[https://opengraph.githubassets.com/69f8a4a1d2c8988372b4942f84bde95de94502d2…]<https://github.com/kamailio/kamailio/pull/3954>
main: Add support for naming socket in cli by xkaraman · Pull Request #3954 · kamailio/kamailio<https://github.com/kamailio/kamailio/pull/3954>
Pre-Submission Checklist Commit message has the format required by CONTRIBUTING guide Commits are split per component (core, individual modules, libs, utils, ...) Each component has a single...
github.com
Please note that the socket name (s1) in both options is/should be optional. The change will allow for better clarity and flexibility when defining sockets, particularly when a name needs to be assigned and match the config file style.
I would appreciate your feedback on which syntax you find more intuitive or any concerns you might have with these options. Your input is important to ensure a smooth transition.
Best regards,
Xenofon
Hello all,
I'm using Kamailio as SIP redirect (act as routing decision for SBC) depending mainly on sqlops and db_postgres modules, and it's working perfectly.
What I need now is to have a kind of cluster of Kamailio servers for high availability purpose.
What is the best option for me ?
BR
Hi,
I just tried to send numbers of SIP register to kamailio (release 5.8.2). It is reported that there are some memory leakage in shared memory after the expiry of all the registration sessions. After drill down the code. function save_pending(...) is called. (in ims_registrar_pcscf/save.c). Inside that function, it seems that "sec_verify_params" is not deallocated upon the function completes.
Findings:
- sec_verify_params uses the result from function cscf_get_security_verify(...)
- Function cscf_get_security_verify(...) returns the result of function parse_sec_agree(...)
- Function parse_sec_agree(...) returns "params" where "shm_malloc(...)" is called
It seems that the memory pointed by 'sec_verify_params' is not further referenced by others. Should shm_free(...) be called when leaving function save_pending(...) in order to free the unused memory of 'sec_verify_params'?
Please advice.
Thank you.
Regards,
Hong
Hi,
I implemented an apple and android push server/proxy with kamailio 5.8.1.
The server/proxy is transparent.
It works fine with UDP, since the registration after the push comes from
the same ip and port.
So t_continue works without problems.
(We use the new registration as signal thet the phone is ready)
If we use tcp at the client, he gets the push, wakes up and send the new
registration on an other port.
The SIP stack uses now an other connection.
t_continue fails, because it uses the old data of the original invite
acccording to the first registration.
Is it possible to change the stored connection values according to the
new registration data?
Best regards,
Bernd
Hello,
Based on business requirements, 35% of invites should be handled by async_workers and 65% with be handled by main children.
The target is 1500cps.
I'm using the following conf :
children=64
async_worker=128
when doing performance tests using SIPp, I figured out the 1500cps is well supported by the conf above, but when I updated the data in database to not use anymore async workers, the cps is getting decreased and it was between 200 and 500.
This a client requirements is to be able to enable/disable feature that needs to be handled by async workers.
Could you please help me on this?
Thanks in advance
We're seeing an issue where some webRTC clients are not receiving inbound calls. Kamailio logs show the following error:
WARNING: {1 609669922 INVITE BW152025538120824-895739618(a)10.103.43.11}: <core> [core/msg_translator.c:3007]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
ERROR: {1 609669922 INVITE BW152025538120824-895739618(a)10.103.43.11}: <core> [core/msg_translator.c:2086]: build_req_buf_from_sip_req(): could not create Via header
ERROR: {1 609669922 INVITE BW152025538120824-895739618(a)10.103.43.11}: tm [t_fwd.c:484]: prepare_new_uac(): could not build request
ERROR: {1 609669922 INVITE BW152025538120824-895739618(a)10.103.43.11}: tm [t_fwd.c:1764]: t_forward_nonack(): failure to add branches
DEBUG: {1 609669922 INVITE BW152025538120824-895739618(a)10.103.43.11}: tm [t_funcs.c:358]: t_relay_to(): t_forward_nonack returned error -2 (-2)
DEBUG: {1 609669922 INVITE BW152025538120824-895739618(a)10.103.43.11}: tm [t_funcs.c:376]: t_relay_to(): -2 error reply generation delayed
It seems to be happening after the client has been connected to Kamailio for more than 24 hours. The socket connection details look correct in the external DB and in the output of ws.dump, core.tcp_list, and ul.dump.
A restart of Kamailio or a reload of the webRTC client, triggering a new websocket connection, will clear the issue. However, we haven't been able to determine exactly when and why a client ends up in this state.
While a client is in this state, REGISTER requests are still handled successfully, they can make outbound calls and TCP keepalives from the client are working.
I'm still working on trying to debug this with GDB so I can see what the value of send_info is in https://github.com/kamailio/kamailio/blob/master/src/core/msg_translator.c#…, but I wasn't having luck with multiple child processes running, and now my client has reloaded and is working again. I've restarted Kamailio with a single child process, so when it does start failing again, I may have better luck with GDB.
Any thoughts on what might be causing clients to get into this state? Whatever additional information I can provide that might help, I'm happy to share. Thanks!
Hi guys, some modules are not shown in Kamailio Kemi's documentation, such as secfilter. Is there any way to load them and use them in Python?
a way is to simulate the secfilter but it is not a general solution.
(Sorry in advance for the obvious question)
ALL:
Hi, here is my lua script:
```
local body = '{"ip":"172.16.4.111", "ports":[5261, 5260]}'
local resp = ""
local code = KSR.http_client.curl_connect_post("configapi", "", "application/json", body, resp)
```
the error is :
```
24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): param[0] for: curl_connect_post is str: configapi
24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): param[1] for: curl_connect_post is str:
24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): param[2] for: curl_connect_post is str: application/json
24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): param[3] for: curl_connect_post is str: {"ip":"172.16.4.111", "ports":[5261, 5260]}
24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): param[4] for: curl_connect_post is str:
24(2406) ERROR: <core> [core/pvapi.c:429]: pv_cache_get(): invalid parameters
24(2406) ERROR: http_client [http_client.c:739]: ki_curl_connect_post(): failed to get pv spec for:
```
I know the error means: "resp" type is not right, what is the correct type ? I search google for this issue, no one knows, someone please help me.
Thinks