Hi List,
two questions regarding Kamailio Websockets:
1. How do I send INVITE request TO the listening Websocket?
I usually used for UDP/TCP/TLS these format, but somehow this is not working for Websocket because it gets in an endless loop:
if ($rU=~"^(\+|00|0)?[1-9][0-9]{4,20}$") {
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ";user=phone;transport=udp";
force_send_socket(udp:MY_EXTERN_IP:MY_EXTERN_PORT);
rtpengine_offer("internal trust-address RTP AVP");
route(RELAY);
exit;
}
2. Why do I get these errors every time my Websocket Client is registering, but it still works and DB is inserted with registered location:
ERROR: <core> [parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 22)
ERROR: <core> [parser/msg_parser.c:690]: parse_msg(): ERROR: parse_msg: message=<HTTP/1.1 101 Switching Protocols#015#012Sia: SIP/2.0/TCP 10.250.5.17:51283#015#012Sec-WebSocket-Protocol: sip#015#012Upgrade: websocket#015#012Connection: upgrade#015#012Sec-WebSocket-Accept: 6uLXlD/aBrzu/j3PYP3DWO7rvLE=#015#012Server: kamailio (4.3.5 (x86_64/linux))#015#012Content-Length: 0#015#012#015#012>
I am using Kamailio 4.3.5 + CentOS 7.2. I appreciate every help I can get.
Best Regards
Dimitry Nagorny
Trainee
Hi
Hoping someone can point me in the right direction.
I have a Kamailio Ver: 4.2.3-1.1 running in front of a few asterisk servers
Ver: 13.17.2 sip is routed to an asterisk server depending the domain name
in the sip request, all working as expected . but if a call is put on hold
after resuming the call the party that placed the call on hold can't hear
any audio. The other party can hear . do I need to do anything special to
handle re-invites for calls put on hold?
Gerry Kernan
Infinity IT | 17 The Mall | Beacon Court | Sandyford |
Dublin D18 E3C8 | Ireland
Tel: +353 - (0)1 - 293 0090 | E-Mail:
<mailto:gerry.kernan@infinityit.ie> gerry.kernan(a)infinityit.ie
Managed IT Services Infinity IT - <http://www.infinityit.ie/>
www.infinityit.ie
IP Telephony Asterisk Consulting -
<http://www.asteriskconsulting.com> www.asteriskconsulting.com
Contact Centre Total Interact -
<http://www.totalinteract.com> www.totalinteract.com
Hi,
Quick (and simple) question:
Can someone provide a working RTPengine request, to enable Transcoding?
I know, this is possible, but I thought before looking into deep, how this
should be configured for the rtpengine_offer() command, could someone
provide an example?
Thanks,
Carsten
Hello Sir,
I need your expertise for kamailio cdr generation in seconds format.
I have a requirement to generate cdr duration in second format.Now I am getting second.milliseconds format.Below is the log where duration is 18.676 but I want this to be 19.(suppose where duration =18.234, I need it to be 18).
Mar 16 10:38:22 vm11-kamailio /usr/local/sbin/kamailio[20787]: NOTICE: acc [acc_cdr.c:352]: log_write_cdr(): start_time=1521196683.464; end_time=1521196702.140; duration=18.676; src_user=71097345; src_domain=185.122.XXX.XXX; src_ip=185.122.XXX.XXX; dst_user=; dst_ouser=91786042XXXX; dst_domain=185.122.XXX.XXX; sip_code=; sip_reason=; callid=LVHyTCFWYBpEFp.sFpY204aBdx.nez9B; dst_ip=185.122.XXX.XXX
My kamailio configuration related to cdr is like this;
/* what special events should be accounted ? */
modparam("acc", "db_url", "flatstore:/var/log/cdr.log")
#modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)")
modparam("acc", "log_facility", "LOG_DAEMON")
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_start_on_confirmed", 1)
modparam("acc", "cdr_log_enable", 1)
modparam("acc", "time_mode", 0)
modparam("acc", "time_attr", "seconds")
modparam("acc", "cdr_start_id", "start_time")
modparam("acc", "cdr_end_id", "end_time")
modparam("acc", "cdr_duration_id", "duration")
#modparam("acc", "cdr_flag", 3)
#modparam("acc", "early_media", 0)
#modparam("acc", "report_ack", 0)
#modparam("acc", "report_cancels", 0)
#modparam("dialog", "enable_stats", 1)
modparam("dialog", "hash_size", 1024)
modparam("dialog", "dlg_flag", 3)
modparam("dialog", "db_url", DBURL)
/* by default ww do not adjust the direct of the sequential requests.
* if you enable this parameter, be sure the enable "append_fromtag"
* in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
#modparam("acc", "log_flag", FLT_ACC)
#modparam("acc", "log_missed_flag", FLT_ACCMISSED)
#modparam("acc", "log_extra",
# "src_user=$fU;src_domain=$fd;src_ip=$si;"
# "dst_user=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc",
"cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
Please suggest me what to configure more in kamailio to achieve cdr in second format.
Thanks,
Narayan
Hi!
Seems calling function KSR.sqlops.sql_num_rows(«sql_res») crashes Kamailio. At least I got this at 5.1.2 from debian repos with LUA.
Getting smth like
dev1 kernel: [5780693.247255] kamailio[20659]: segfault at 50b300000004 ip 00007f34d2f46fd6 sp 00007ffe1f0ac310 error 4 in sqlops.so[7f34d2f42000+1c000]
Regards, Igor
Hi All,
Kamailio send 2 INVITE(lookup rewrite r-uri and append branch) request for
Client behind NAT.
Due to this reason for one request,Client respond with 486 Busy here. we
only want to send 1 INVITE request.
Following are the AOR for client at kamailio.if field(ip port) in CONTACT
and RECEIVED differ then kamailio send 2 INVITE request.
FOLLOWING INVITE HAS BEEN GENERATED AFTER LOOKUP FUNCTION(one from contact
and one from Received field).
INVITE:sip:123@192.168.230.124:45672
INVITE:sip:123@204.192.206.208:45672
I want only ONE INVITE request to be generated.Please suggest how do solve
this issue or if there is any config change or any code change required to
achieve this?
AOR:: 123
Contact:: sip:123@192.168.230.124:45672 Q=1
Expires:: 894
Callid:: 003A8EC4-12351(a)192.168.230.124
Cseq:: 2
User-agent:: SIPPER for 3CX Phone
Received:: sip:204.192.206.208: 45672
State:: CS_NEW
Flags:: 0
Cflag:: 192
Socket:: udp:172.12.120.88:5060
Methods:: 4294967295
Ruid:: uloc-5aba112d-7fce-5
Reg-Id:: 0
Last-Keepalive:: 1522144583
Last-Modified:: 1522144583
thanks,
amit
Hello Everyone,
Not sure what I am missing, but can't match ip address to subnet
Log says
INFO: <script>: Subnets not match processing rtp...destination ip
[10.0.1.242] and sourceip [10.0.1.241]
if(is_method("INVITE")) {
$avp(destip)=$(du{s.select,1,:});
$avp(subnet) = $avp(destip) + "/16";
xlog("L_INFO", "Initial Request: [$rm] destination ip
[$avp(destip)] and sourceip [$si]\n");
if(!is_in_subnet("$si", "$avp(subnet)")) {
xlog("L_INFO", "Subnets not match processing
rtp...destination ip [$avp(subnet)] and source ip [$si]\n");
route(RTP_MANAGE);
}
}
[root@prx00 ~]# rpm -qa | grep kamailio
kamailio-mysql-5.1.2-2.git4c840b7e9.fc27.x86_64
kamailio-5.1.2-2.git4c840b7e9.fc27.x86_64
Slava.
Hi!
I’m trying to get SDP body in my var.
I’m using smth like this
if (KSR.textops.has_body() ~= -1 and KSR.textops.has_body_type("application/sdp") ~= -1) then
KSR.textops.get_body_part("application/sdp", "$var(pbody)»)
local sdp_body = KSR.pv.get("$var(pbody)")
….
end
But in logs i see this
LUA {INVITE}: 7(20794) DEBUG: <core> [core/parser/msg_parser.c:183]: get_hdr_field(): content_length=470
LUA {INVITE}: 7(20794) DEBUG: app_lua [app_lua_sr.c:1496]: sr_kemi_lua_exec_func_ex(): param[0] for: has_body_type is str: application/sdp
LUA {INVITE}: 7(20794) DEBUG: textops [textops.c:3083]: has_body_helper(): content type is 196611
LUA {INVITE}: 7(20794) DEBUG: app_lua [app_lua_sr.c:1496]: sr_kemi_lua_exec_func_ex(): param[0] for: get_body_part is str: application/sdp
LUA {INVITE}: 7(20794) DEBUG: app_lua [app_lua_sr.c:1496]: sr_kemi_lua_exec_func_ex(): param[1] for: get_body_part is str: $var(pbody)
LUA {INVITE}: 7(20794) DEBUG: <core> [core/pvapi.c:396]: pv_cache_lookup(): pvar [$var(pbody)] found in cache
LUA {INVITE}: 7(20794) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
LUA {INVITE}: 7(20794) INFO: <core> [core/msg_translator.c:1694]: get_boundary(): Content-Type hdr has no params <application/sdp>
LUA {INVITE}: 7(20794) ERROR: textops [textops.c:2468]: ki_get_body_part_helper(): Cannot get boundary. Is body multipart?
So, in sdp_body var i got 0. What is wrong here?
Regards, Igor
Hello list,
I activated topos and topos_redis backend.
Now, I have the following errors:
Jan 6 07:34:11 sd-110402 /usr/local/sbin/kamailio[30288]: {1 102 NOTIFY
645f4b58537f9df53b9ce65f4937d652@163.172.83.169:5064} ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Jan 6 07:34:11 sd-110402 /usr/local/sbin/kamailio[30292]: {1 102 NOTIFY
5b678085378e62c12c6f18154501feb3@163.172.83.169:5064} INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Jan 6 07:34:11 sd-110402 /usr/local/sbin/kamailio[30292]: {1 102 NOTIFY
5b678085378e62c12c6f18154501feb3@163.172.83.169:5064} ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Jan 6 07:34:18 sd-110402 /usr/local/sbin/kamailio[30287]: {1 102 NOTIFY
2799d4a61e9defbc66dc67735e1c6e6c@163.172.83.169:5064} INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Jan 6 07:34:18 sd-110402 /usr/local/sbin/kamailio[30287]: {1 102 NOTIFY
2799d4a61e9defbc66dc67735e1c6e6c@163.172.83.169:5064} ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Jan 6 07:34:18 sd-110402 /usr/local/sbin/kamailio[30290]: {1 102 NOTIFY
760fe2ce3427748514441de25cade2e4@163.172.83.169:5064} INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Jan 6 07:34:18 sd-110402 /usr/local/sbin/kamailio[30290]: {1 102 NOTIFY
760fe2ce3427748514441de25cade2e4@163.172.83.169:5064} ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Jan 6 07:34:33 sd-110402 /usr/local/sbin/kamailio[30291]: {1 102 NOTIFY
7464fc2b503427423b0aba925fb13bc7@163.172.83.169:5064} INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Jan 6 07:34:33 sd-110402 /usr/local/sbin/kamailio[30291]: {1 102 NOTIFY
7464fc2b503427423b0aba925fb13bc7@163.172.83.169:5064} ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Jan 6 07:34:35 sd-110402 /usr/local/sbin/kamailio[30287]: {1 102 NOTIFY
581e88181527f4221fbc7f893a564d6a@163.172.83.169:5064} INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Jan 6 07:34:35 sd-110402 /usr/local/sbin/kamailio[30287]: {1 102 NOTIFY
581e88181527f4221fbc7f893a564d6a@163.172.83.169:5064} ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Could you help me to fix it?
Abdoul OSSENI