Hi everybody,
I am trying to call a sip client on a mobile cellphone, which is registered
fine at my Kamailio instance. Everything is working fine if the phone is
awake and the mobile app is not sleeping (e.g. energy saving by OS). If the
device is sleeping, the cellphone gets a wakeup request call via apple push
kit and wakes the app. Currently my app is doing a Register after each
wakeup, because the device does not know if the cellular network changed
(external IPv4 address with Carrier Grade NAT).
At this point an incoming call already got routed to any existing user
registrations in userloc db. In this case, if the cellular provided network
address changed, the sip client on the device won't receive any invite of
this last call. Instead all last known Contact-URIs are tried to be called
until this sip invite times out because no response message is received back
in time.
I tried to delay the incoming invite message, but this doesn't seem the
right way to go, since I can't know if the mobile device is actually
reachable and this method would potentially delay every call.
What is the best approach to solve this issue? I am looking forward for any
comment or suggestion.
BR,
Henning
Hi team,
I am facing an issue while setting up IM server based on kamailio.
SIP-SIP online messaging is fine. For offline messaging i am using msilo
module which is storing offline messages in 'silo' table.
As B-party come online ... it receive offline messages stored in database.
But
*Problem is*.. these messages will deliver to B-party as many time it
REGISTER online.
How can I configure msilo module to mark messages delivery status?
or how can i delete the delivered messages so that there will be no chance
of delivering them again on next REGISTER?
Message parts of kamailio.cfg are
....
/* add local domain aliases */
alias="192.168.10.18"
port=9060
# ----- msilo params -----
modparam("msilo", "db_url", DBURL)
modparam("msilo", "db_table", "silo")
modparam("msilo", "sc_mid", "id")
modparam("msilo","from_address","sip:registrar@192.168.10.18:9060")
modparam("msilo","contact_hdr","Contact: registrar@192.168.10.18:9060;
msilo=yes\r\n")
modparam("msilo","content_type_hdr","Content-Type: text/plain\r\n")
........
route[MSILO_MESSAGE] {
if (!is_method("MESSAGE")) return;
xlogl("L_NOTICE", "[$rm] r-uri: $ru d-uri: $du \n");
if (lookup("location")) {
xlogl("L_NOTICE", "[$rm] -> loaction found. Relying message [[$rb]]
to the UAC \n");
t_relay();
} else {
if (!t_newtran()) {
xlogl("L_ERROR", "[$rm] -> ERROR creating new transaction \n");
sl_reply_error();
exit;
};
xlogl("L_NOTICE", "[$rm] -> Storing MSILO_MESSAGE \n
[$ru]-[$tu]-[$ou] \n ");
if (m_store("$ru")) {
xlogl("L_NOTICE", "MSILO: offline message stored! \n");
if (!t_reply("202", "Accpeted and Strored")) {
xlogl("L_ERROR", "MSILO: Err sending 202 reply... \n");
sl_reply_error();
}
} else {
xlogl("L_ERROR", "MSILO: offline message NOT stored... \n");
if (!t_reply("503", "Service Unavailable")) {
sl_reply_error();
}
}
}
exit;
}
.....
# Handle SIP registrations
route[REGISTRAR] {
if (!is_method("REGISTER")) return; // discard all non-REGISTER methods
if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
#!ifdef WITH_NATSIPPING
setbflag(FLB_NATSIPPING); //# do SIP NAT pinging
#!endif
}
$avp(received) = "sip:" + $si + ":" + $sp + ";transport=" + $proto;
xlogl("L_INFO", "[$rm] -> UAC actual location $avp(received) \n");
if (!save("location",0x04)) {
xlogl("L_ERROR", "[$rm] -> Unable to save user location \n");
sl_reply_error();
}
else {
xlogl("L_INFO", "[$rm] -> dumping messages with MSILO \n");
# MSILO - dumping user's offline messages to user
if (m_dump("$fu")) {
xlogl("L_NOTICE", "MSILO: offline messages for $fu dumped - if
they were \n");
}
else {
xlogl("L_NOTICE", "MSILO: no offline messages dumped \n");
};
}
exit;
}
Any idea?
--
regards,
abdul basit
Hello,
My kamailio is listening to TCP, so when I try to duplicate packets to homer,
It tries to send them as TCP. From the log I see:
Apr 5 08:21:45 kamprod /usr/local/sbin/kamailio[16309]: ERROR: <core> [core/forward.c:181]: get_out_socket(): no socket found
Apr 5 08:21:45 kamprod /usr/local/sbin/kamailio[16309]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:10.168.10.229:5090)
Apr 5 08:21:45 kamprod /usr/local/sbin/kamailio[16309]: ERROR: siptrace [siptrace.c:1940]: trace_send_hep2_duplicate(): can't forward to af 2, proto 1 no correspondi
Which is rather strange to me, because the protocol is defined to be UDP for HEP:
corresponding socket found for(udp:10.168.10.229:5090)
How can I fix this?
Thanks,
Arik
Greetings,
I'm using the Dialog module and the profile functions in order to limit the
number of channels that a Calling Number can use.
I'm using profile with values and the number in E164. However it doesn't
work correctly and the value are not correctly updated. I've tried to give
a a value with only 5 digits and everything seems to work fine. Does the
set_dlg_profile and unset_dlg_profile have a size limit for it's value ?
Thanks
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 all.
I would like to thank you all the documents you have to install a Kamailio
server. It's quite easy and fast.
Currently I'm working on Azure, witha Debian 9 OS, and I'd followed the
instructions to install the Kamailio OPENSER, and everything Works perfect.
But now I'm stuck on my next step. I would like to install all the IMS
components, P-cscf/I-cscf/S-cscf/Fhoss following this document
https://www.kamailio.org/wiki/tutorials/ims/installation-howto
But, I have no success. Maybe I've a mistake on the selection for the Debian
OS installed on the server. I say this because of this sentence:
" Note: This document is work in progress and yet unfinished!
This is a short installation howto for Debian Wheezy (stable).
"
So, I asume that maybe here I have a problem with the OS version, I'll try
to summarize where I have problems:
1.- I've installed the , P-cscf/I-cscf/S-cscf not a problem.
2.- I am not able to follow this steps related to the repository:
First, install the Key for our repository:
wget -O - http://repository.ng-voice.com/PublicKey | apt-key add -
Then add the repository to your "/etc/apt/sources.list":
echo "deb http://repository.ng-voice.com jessie ims rtpproxy" >>
/etc/apt/sources.list
and also I have problems with this action over the repository
Note: You will need to add the "non-free" packages to your repository:
deb http://ftp.de.debian.org/debian lenny main non-free
deb http://security.debian.org/ lenny/updates main non-free
3.- I decided to install directly the modules from an apt-get install
action, because I followed the instructions on the Log created on the
Kamailio starting box, where you can find all the steps related to IMS
modules, and the suggestion there it is to compile your own modules. On this
step I detected a problem related with the dialog_ng module, according to
the .log document on the Starting box, you have to include all the modules
before you execute the make all instruction:
modify modules.lst for included modules and excluded modules (use saved
file)
- include: ims_auth ims_charging ims_icscf ims_isc ims_qos
ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf
dialog_ng cdp cdp_avp
4.- After this issue, I tried to install FHOSS, but here I can't go further,
I am not able to compile it, neither doing my own compilation following this
step
ant compile deploy | tee ant_compile_deploy.txt
nor following
apt-get install openimscore-fhoss
I was no table to get connected to the repository, so I can't go further.
I'm sorry for all this information, can anyone help? Any suggestion?
Regards
Roi
---
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
Hi All!
I have some troubles with encoding hex string to use as ISUP part.
I have next line:
append_body_part("\x01\x10\x48*\x00*\x0a*\x00*
\x02\x09\x07\x03\x90\x90\x13\x71\x32\x20\x0a\x04\x02\x13\x73\x12*\x00*
","application/isup;version=itu-t92+","signal;handling=optional");
Problem is in the *\x00 *kamailio reads this string till first \x00
May be there is some workaround?
Currently I have added some C code into SIPT module to change values in
this pisitions first to 00 then make other changes.
My current input string is
append_body_part("\x01\x10\x48*\x01*\x0a*\x01*
\x02\x09\x07\x03\x90\x90\x13\x71\x32\x20\x0a\x04\x02\x13\x73\x12*\x01*
","application/isup;version=itu-t92+","signal;handling=optional");
I first make replacement \x01 to \x00 while executing sipt_destination
May be there is better solution?
Thank you.
--
Best regards,
Sergey Basov e-mail: sergey.v.basov(a)gmail.com
Hello All,
When I disconnect a call from callee side. FS Send the BYE to Kamailio
PUBLIC IP instead of Private IP.
So Caller is not able to receive BYE.
*# Call Flow:*
*Caller User -----> Kamailio(Bind on Private IP) ----> Freeswitch(Bind on
Private IP) -------> Kamailio(Bind on Private IP) ----> Callee User*
*Kamailio Public IP:* KAM_PUBLIC_IP:9000
*Kamailio Private IP:* 172.28.198.123:9000
*FS Private IP:* 172.28.198.128:5060
How to resolve the issue?
Please find attached SIP Message and Sample kamailio.cfg.
In advance Thank you.
--
Regards,
Suresh Talasaniya.
Contact : +91-9724264776
Skype : suresh.talsaniya
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