Hello,
I have a kamailio sip proxy server with freeswitch acting as SBC. I want to
redirect the call to freeswitch when hold is pressed so that i can play
music on hold. I tried this by using rewritehostport in case of a
re-invite, but the call drops in that case. Could someone please help me
with this?
Gautam
Hi,
sometime we get the following error after we restart the kamailio for a while:
ERROR: <core> [timer.c:972]: ERROR: slow timer too slow: overflow
(1048 - 25 = 1023)
... last message repeated 138times
....
ERROR: <core> [timer.c:972]: ERROR: slow timer too slow: overflow
(1048 - 25 = 1023)
last message repeated 49 times
it print them continuously....
is it normal?
How I can fix it?
Thank you very much!
Best Regards,
Laura
Hello,
is anyone here having an opensuse available for using to do some tests?
It is about the radius modules, it seems opensuse does now have
radiusclient-ng, but the client library from freeradius. They should be
quite similar and we should be able to compile with freeradius client
library, like
make FREERADIUS=1 ...
I tried on opensuse build service and it fails due to some conflict on
DBG definition. It is hard to troubleshoot on OBS, so maybe someone can
give a hand and find the fix faster -- I can provide guidelines or if I
can get shell access (just simple user) would be better (write me
directly in this case). The goal is to get the radius modules packaged
as rpm on opensuse.
Thanks,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.comhttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hey there,
I added the list to CC as others may be interested in your findings as well.
"sunny_day" <416415455(a)qq.com> schrieb:
> Thank you very much for your detailed analysis !
> According to your analysis I have been getting more understand the
> kamailio. :-)
> After submitting the issue, I have done many experiments. And now, I
> may find the reason about my script.
>
> 1. somebody seems like having said dialog is tracing and dealed with
> after loose_route()--(May be I didn't understand it correctly. And now
> I am also not sure the relationship between dialog and loose_route() ).
> And the dialog will be destroyed after receiving the "BYE" message.
> So, I place the "insert" after loose_route() and "is_method("BYE")" .
> ------it may have problem.
Calling loose_route() makes sure that for a given sequential request (which includes BYE messages) it is properly linked to its dialog. This is carried out by either adding cookies to Route headers or trying to match the dialog-identifying SIP headers (From-Tag, To-Tag, and Call-ID).
This so-called "matching mode" is set to "DID only" which corresponds to using cookies in Route headers. For this to work, you must ensure that calls are being enriched with Record-Route headers. So one possible reason why things didn't work for you is that you used "DID only" matching mode (which you apparently did as you configuration didn't deviate from the default) but forgot to add Record-Route headers. Alternatively, you could set matching mode to 2 (SIP header-based matching only) or 1 (cookie-based but fallback to header-based) to get things going dialog-wise.
See the dlg_match_mode modparam documentation here: http://sip-router.org/docbook/sip-router/branch/master/modules_k/dialog/dia… .
> The main reason "insert" can not insert the data into cdr table is
> loose_route() returns "0", which has no "Route:" header , and the
> "insert" will never be executed.
Which may be the case because you did not instruct Kamailio to add Record-Route headers along the signaling way.
> 2. At last, I place the "insert" in the "route(RELAY);". And data can
> be inserted into the cdr table again. Originally, I was considering the
> dialog will be destroyed immediately when then "BYE" message received.
> The results of my experiments prove that it isn't. But I am not sure
> whether my conclusion is right.
In the old days, dialogs would indeed be destroyed as soon as the transaction correlating to the first BYE request was deleted. This was changed a while in ago in order to be able to handle responses to such BYE requests too. So these days, dialogs do not get destroyed until a BYE-completing response is seen. (More specifically, until the transaction related to a BYE-completing response is terminated. Or, if that BYE request never sees a response and its transaction times out, whichever comes first. But that's just details.)
You probably shouldn't be satisfied with updating database entries during route[RELAY] (at least not only). If it's not working on processing of a final BYE request, this indicates that dialog tracking isn't properly working for you (see my explanation above as to why). Whatever you store in dialog variables during an INVITE may not be valid by the time you persist to database.
And regarding CDR generation using Kamailio's built-in mechanism: It's part of the acc (accounting) module (not dialog as I initially claimed). You may want to look at the documentation to see if it's a fit for you:
http://sip-router.org/docbook/sip-router/branch/master/modules_k/acc/acc.ht…
HTH,
--Timo
> ------------------ Original ------------------
> From: "Timo Reimann"<sr(a)foo-lounge.de>;
> Date: Wed, Dec 21, 2011 06:51 PM
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List"<sr-users(a)lists.sip-router.org>;
> Cc: "sunny_day"<416415455(a)qq.com>;
> Subject: Re: [SR-Users] Who can tell me how to get the dialog-based
> CDRs ?
>
>
> Hey,
>
>
> Am 21.12.2011 um 07:03 schrieb sunny_day:
>> My object: get the dialog-based CDRs
>>
>> SIP proxy: kamailio-3.2.0
>>
>> My script:
>>
>> loadmodule "dialog.so"
>> ......
>> modparam("dialog","dlg_flag",4)#Must be set to create the dialog
> associated to an initial request.
>> modparam("dialog","db_url","mysql://xxx:xxx@localhost/albert")
>> modparam("dialog","table_name","dialog")
>> .......
>> request_route{
>> if( is_method("INVITE") && !has_totag())
>> {
>> dlg_setflag(4);
>> dlg_var(start_time)=$TS;
>> dlg_var(caller)=$fU;
>> dlg_var(caller)=$tU;
>> }
>> dlg_manage();
>> ......
>> # dispatch destinations to PSTN
>> route(PSTN);
>> # user location service
>> route(LOCATION);
>> route(RELAY);
>> }
>> .........
>> route[WITHINDLG] {
>> if (has_totag()) {
>> # sequential request withing a dialog should
>> # take the path determined by record-routing
>> if (loose_route()) {
>> if (is_method("BYE")) {
>> setflag(FLT_ACC); # do accounting ...
>> setflag(FLT_ACCFAILED); # ... even if the
> transaction fails
>>
>> sql_query("cd", "insert into
> cdr(caller,callee,start_time,duration)
> values($dlg_var(caller),$dlg_var(callee),$dlg_var(start_time),$DLG_lifetime)",
> "rd");
>> sql_result_free("rd");
>> }
>> if (is_method("ACK")) {
>> route(NATMANAGE); # ACK is forwarded statelessy
>> }
>> route(RELAY);
>> }
>> ........
>>
>>
>> My issue is :
>>
>> The dialog records can be wrritten into the dialog table.
> But , the sql_query can not executed. So the cdr table will not get the
> CDRs. I don't know why. Who can help me ?
>> This is a simple script for testing.
>>
>> Any suggestion will be appreciated.
>>
>> Thank you in advance.
>
> It's very hard to help with any Kamailio error unless you provide the
> actual error message. Whatever the issue is with the sqlops module,
> Kamailio will tell you, so please tell us.
>
> Until then, I can only speculate what's gone wrong: Did you possibly
> forget to specify the sqlcon module parameter? You need to setup the
> MySQL connection parameters in there. See
>
> http://sip-router.org/docbook/sip-router/branch/master/modules_k/sqlops/sql…
>
> for sqlcon's documentation and
>
> http://sip-router.org/docbook/sip-router/branch/master/modules_k/sqlops/sql…
>
> for the reference regarding sql_query(). Please note how that part
> states that "the result parameter should normally only be omitted when
> no result is expected (INSERT, UPDATE, DELETE)" (which is the case in
> your test script). In consequence, you won't need to free the result
> set which could be another source of error.
>
>
> Finally, please note that the dialog module itself is capable of
> producing CDRs directly from the dialog machinery. It's yet lacking
> support for direct output to a database (AFAIK), however, so you'd have
> to post-process the CDR results (which are being written to file as of
> now) in order to get them persisted into a database.
> For some reason, the CDR documentation I wrote seems to have
> disappeared from the git repository. I'll investigate that further and
> provide you with a link to the dialog-way-of-creating-CDRs when
> available (and desired from your side).
>
>
> HTH,
>
> --Timo
Hi,
I am using kamailio (only one) as routing engine. I have 2 gateways. Both of
them sending calls to kamailio.
When i use the carrierroute module i need to change (and succeed) the user
($rU). But, i need to send the call (the invite) back to the gateway that
sent me the call from the beginning (it can be either one of those 2). So,
my problem is that i don’t want to rewrite the host in carrierroute, just
the user. If i leave the rewrite_host field empty, it is considered to be
"black list" and drops the call. If i rewrite the host, i can send the call
to the second gateway that was not the one that sent the call, and the call
drops as well.
any ideas how to use carrierroute for changing user only and send the invite
back to the gateway that originally sent the call?
Thanks,
Uri
My object: get the dialog-based CDRs
SIP proxy: kamailio-3.2.0
My script:
loadmodule "dialog.so"
......
modparam("dialog","dlg_flag",4)#Must be set to create the dialog associated to an initial request.
modparam("dialog","db_url","mysql://xxx:xxx@localhost/albert")
modparam("dialog","table_name","dialog")
.......
request_route{
if( is_method("INVITE") && !has_totag())
{
dlg_setflag(4);
dlg_var(start_time)=$TS;
dlg_var(caller)=$fU;
dlg_var(caller)=$tU;
}
dlg_manage();
......
# dispatch destinations to PSTN
route(PSTN);
# user location service
route(LOCATION);
route(RELAY);
}
.........
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
sql_query("cd", "insert into cdr(caller,callee,start_time,duration) values($dlg_var(caller),$dlg_var(callee),$dlg_var(start_time),$DLG_lifetime)", "rd");
sql_result_free("rd");
}
if (is_method("ACK")) {
route(NATMANAGE); # ACK is forwarded statelessy
}
route(RELAY);
}
........
My issue is :
The dialog records can be wrritten into the dialog table. But , the sql_query can not executed. So the cdr table will not get the CDRs. I don't know why. Who can help me ?
This is a simple script for testing.
Any suggestion will be appreciated.
Thank you in advance.
------------------
albert.gu
Hi,
I followed this web article to install Kamailio 3.2 and RTPProxy on Debian Squeeze x64:
http://kb.asipto.com/kamailio:skype-like-service-in-less-than-one-hour
The system is running on a public IP address outside of our corporate LAN. I have been testing it using pjsua v2 alpha 2 from the pjsip.org project.
I am having an issue when I enable srtp in the pjsua clients. If both pjsua clients are running on machines on our corporate LAN (symmetric NAT), the call succeeds and I get audio and video. If one of the clients is running outside of the corporate LAN, the call connects but I do not get any audio or video. If I turn off srtp in both clients and try the call again, audio and video starts working. Is there any additional configuration I need to make in the kamailio.cfg file when I intend to use srtp in the clients?
RTPProxy info:
Basic version: 20040107
Extension 20050322: Support for multiple RTP streams and MOH
Extension 20060704: Support for extra parameter in the V command
Extension 20071116: Support for RTP re-packetization
Extension 20071218: Support for forking (copying) RTP stream
Extension 20080403: Support for RTP statistics querying
Extension 20081102: Support for setting codecs in the update/lookup command
Extension 20081224: Support for session timeout notifications
Kamailio info:
version: kamailio 3.2.0 (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 10:23:25 Nov 2 2011 with gcc 4.4.5
Regards,
--Jonathan
Elena, your advice is very useful for me. Thank you very much. :-)
However,i think i should introduce the environment I now used.
First, there are 3 users on the linux, and one kamailio.cfg for each user. I am not the root user. So i don't have the priviledge to write the diretory---->/var/log/messages
According the introduction you provided for me, I want to setup my own log file. But I am not sure whether it will work. The idea is:
1. In kamailio.cfg set "log_facility=LOG_LOCAL5"
2. In syslog.conf set
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local5.none /var/log/messages
3. In syslog.conf set
# log messages with LOG_LOCAL5 in /var/log/kamailio.log
local5.* -/home/albert/mylocal/myvar/log/kamailio.log
Any idea will be appreciated. Thanks in advance.
------------------
albert.gu
------------------ 原始邮件 ------------------
发件人: "Elena-Ramona Modroiu"<ramona(a)asipto.com>;
发送时间: 2011年12月21日(星期三) 凌晨4:29
收件人: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List"<sr-users(a)lists.sip-router.org>;
抄送: "sunny_day"<416415455(a)qq.com>;
主题: Re: [SR-Users] 回复: Why? there isn't a syslog.conf under mykamailiodirectory?
Hi,
regarding the configuration of syslog to write kamailio log messges in a special file, you can find couple of tutorials on kamailio.org wiki sites. One is:
http://www.kamailio.org/wiki/tutorials/3.2.x/syslog
Regards,
Ramona
On 12/20/11 10:35 AM, sunny_day wrote: I got it . Thank you Michal :)
------------------
albert.gu
------------------ 原始邮 件 ------------------
发件人: "Michal Matyska"<michal.matyska(a)iptel.org>;
发送时间: 2011年12月20日(星期二) 下午5:20
收件人: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List"<sr-users(a)lists.sip-router.org>;
主题: Re: [SR-Users] Why? there isn't a syslog.conf under mykamailiodirectory?
Hi,
use -E option and you'll get all the logs on the sterr.
Michal
sunny_day píše v �t 20. 12. 2011 v 17:10 +0800:
> Olle , Thank you very much for your reply!
> I am not the root user on the unix system. but I want to customize the
> log file for the function: xlog.
> Now, I don't know where to see the content what xlog writes. It can
> help me to debug the script of kamailio.cfg i edited.
>
> what i do is collect the CDRs by dialog and acc modules. Any
> suggestion will be appreciated.
>
> Thanks a lot !
>
> ------------------
> albert.gu
>
>
> ------------------ Original ------------------
> From: "Olle E. Johansson"<oej(a)edvina.net>;
> Date: Tue, Dec 20, 2011 04:57 PM
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> UsersMailing List"<sr-users(a)lists.sip-router.org>;
>
> Subject: Re: [SR-Users] Why? there isn't a syslog.conf under my
> kamailiodirectory?
>
>
> 20 dec 2011 kl. 05:57 skrev sunny_day:
>
> > There should be a syslog.conf file under the kamailio directory.
> > But I haven't.
> >
> > I only want to see the contents generated by "xlog"
>
> Syslog is a daemon in your operating system. The configuration file is
> propably in the /etc
> directory. Try running "man syslog.conf" for more information about
> that file.
>
> /O
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users(a)lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users