Hi Everyone,
What is a accurate way to get current call count. I am only relaying calls.
Initialy I tried the code below. It seemed to work, it reported the correct number of calls I had dialed. I get the result through kamcmd htable get command.
------------------------------------------
under route[RELAY]
#
# COUNT
#
if (is_method("BYE")) {
$var(n) = $shtdec(callcount=>active);
sht_rm_name_re("callcount=>$ft");
}
--------------------------------------------
# Manage incoming replies
onreply_route[MANAGE_REPLY] {
#
# COUNT
#
if (status=="200") {
if (is_method("INVITE")) {
# On start
if($sht(callcount=>active) == $null) {
$sht(callcount=>active) = 0;
}
# New call
if ($sht(callcount=>$ft::from_tag)== $null) {
$sht(callcount=>$ft::from_tag) = $ft;
$var(n) = $shtinc(callcount=>active);
}
}
xlog("L_INFO", "This is a 200 OK reply\n");
}
xdbg("incoming reply\n");
if(status=~"[12][0-9][0-9]") {
route(NATMANAGE);
}
}
-------------------------------------------------------
However I wanted to distribute calls to several servers
I further added the despatcher code below
# round robin dispatching on gateways group '1'
if(!ds_select_dst("1", "4")) {
send_reply("404", "No destination");
exit;
}
xlog("L_INFO", "-----RELAYING going to <$ru> via <$du> time [$Tf] -----\n");
This makes my counting code above give incorrect call count.
How can I make call count work with dispatcher ? Do advise how I can do this
Regards
Hi, I'm working on a VoIP communication application with Kamailio as SIP server and using the SIREMIS interface.
As an administrator, I can add "Subscribers" which later will be registered on the server so that they can make the necessary negotiations when they want to make a call. My question is, how you can make groups of "contacts" so that such calls can be made only with each other "contacts" in the same group? that is, we can have many "subscribers" on the server and belong to two different groups and that they can only talk to each other contact each group.
Thank you so much and greetings!
Hello all
i have a quick question about using module ratelimit on kamailio 4.2 or
4.4.
on tests made before running it on production, i set the RED algorithm
with a limit of 10 calls per second, but i saw the call limitation was
not done until we got more than 20 calls per second or so on the queue.
we didnt get any INVITE discarded.
after surpassing around 20 INV/sec, it's true the algorithm starts to
work fine and only 10INV/sec are passed more or less
on production i have no easy way to check this behaviour, besides it's a
feature barely used.
so i only want to know if this behaviour is known, or if i'm missing
soemthing
my config is like this
modparam("ratelimit", "timer_interval", 5)
modparam("ratelimit", "queue", "4:INVITE")
modparam("ratelimit", "pipe", "4:RED:10")
route[RATE_LIMIT] {
$var(limitation)="4";
if (!rl_check("$var(limitation)")) {
send_reply("505","Limiting");
xlog("L_INFO","Call $ci / Call-ID $ci: ratelimit was reached,
rejecting with 505\n");
route(CLEAR);
exit;
}
}
thanks a lot and regards
david escartin
I wanted to create my own voip application using kamailio . I am not able
to find any rest integration with kamailio for my server to use for user
registration and other task.Please help in developing my appplication.
--
Thanks & Regards,
Kunal Dhanda,
Software Developer
E-mail : < "kunaliitkgp09(a)gmail.com" >,
Ph. No. (M) : +91 - 8884818805
Hi all, when we set syslog facility for ACC to LOCAL3, log_write_cdr() will
write at LOG_DAEMON anyway.
You have to recompile module acc to user another default syslog facility to
save cdr with another syslog facility.
Hi,
i have a problem with my kamailio installation.
Actually i set the shared memory to 128MB and it's all fine. When i
increase the shared memory to 256Mb and more i get the following error
while checking kamctl commands (like kamctl stats shmem)
ERROR: Error opening Kamailio's FIFO /var/run/kamailio/kamailio_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/var/run/kamailio/kamailio_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
If i revert to 128Mb kamailio is able to create the kamailio_fifo file and
all works fine.
Can somebody help me to solve?
Thanks
Hello, Alex!
Fisrt of all, thanks for you help with this problem!
I don't think that this will help me. I can see that this parameter is
enabled by default and in fact it is working in some cases. One case where
this works is when the INVITE is sended for more than one endpoint (when
the same user is registered in many devices). When someone answers the
INVITE, Kamailio sends a CANCEL message to the other endpoints and it has
the Reason header showing that the call was answered elsewhere.
I want to add the CANCEL Reason header when the timer expires, so kamilio
will not receive a final replay to that transaction.
*Bruno Emer*
Mobile: +55 11 96540-0044
email: brunoemer(a)gmail.com
<https://www.facebook.com/bruno.emer.5>
<https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic>
<https://twitter.com/brunoemer_>
<https://www.flickr.com/photos/122070309@N03/>
<http://google.com/+BrunoEmer> <http://instagram.com/brunoemer_>
2016-05-20 15:42 GMT-03:00 Bruno Emer <brunoemer(a)gmail.com>:
> Hello all!
>
> I have a situation here where when I send a INVITE to some specific
> user-agents in my environment I must change the fr_timer to a value lower
> than the default.
>
> I can acomplish this using the "t_set_fr" commands in my cfg file, and it
> works like a charm.
>
> The point is that when the timer reaches its limit, the kamailio server
> sends a CANCEL message to the user-agent. I know that this is the normal
> behavior, but I want to add the Reason field on it, so the user-agent
> application can know that the call wasn't answered on time.
>
> I was looking the TM module documentation to understand how to do this,
> but I couldn't figure out a way to get this working.
>
> Is there a way to add the Reason in CANCEL messages generated by the
> fr_timer?
>
>
> Thanks.
>
>
> *Bruno Emer*
>
> Mobile: +55 11 96540-0044
> email: brunoemer(a)gmail.com
> <https://www.facebook.com/bruno.emer.5>
> <https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic>
> <https://twitter.com/brunoemer_>
> <https://www.flickr.com/photos/122070309@N03/>
> <http://google.com/+BrunoEmer> <http://instagram.com/brunoemer_>
>
Hello all!
I have a situation here where when I send a INVITE to some specific
user-agents in my environment I must change the fr_timer to a value lower
than the default.
I can acomplish this using the "t_set_fr" commands in my cfg file, and it
works like a charm.
The point is that when the timer reaches its limit, the kamailio server
sends a CANCEL message to the user-agent. I know that this is the normal
behavior, but I want to add the Reason field on it, so the user-agent
application can know that the call wasn't answered on time.
I was looking the TM module documentation to understand how to do this, but
I couldn't figure out a way to get this working.
Is there a way to add the Reason in CANCEL messages generated by the
fr_timer?
Thanks.
*Bruno Emer*
Mobile: +55 11 96540-0044
email: brunoemer(a)gmail.com
<https://www.facebook.com/bruno.emer.5>
<https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic>
<https://twitter.com/brunoemer_>
<https://www.flickr.com/photos/122070309@N03/>
<http://google.com/+BrunoEmer> <http://instagram.com/brunoemer_>
Hi,
Kamailio adds extra characters in the re-invite "TO" field during session timer. There is no header manipulation in our route[WITHINDLG] block.
Re-INVITE received by KamailioTo: <sip:8131111111@?.?.?.?;otg=1>;tag=1c1048632956
Re-INVITE forwarded by KamailioTo: <sip:8132222222@?.?.?.?;T\033\023Z\f1>;tag=1c1048632956
Your help would be greatly appreciated.
Thanks,AS
Hello
I am trying to make a test setup to test the RTPENGINE.
Now my setup is Kazoo . i.e.:
Subsriber A ---Asterisk (192.168.175.132)-----via NAT-------------Kamailio(10.10.11.104) ----FreeSwitch(10.10.11.104)
Subscriber B is connected directly to Kamailio (this subscriber is in the same network)
First WITHOUT RTPENGINE :
When A calls to B - the sound both ways, so it is ok.
Second WITH RTPENGINE:
When A calls to B - the sound both ways, so it is ok.
Actually what I want is to make such setup that calls without the RTPENGINE are impossible.