Hi,
I am trying to capture and distinguish two types of cancels generated by
kamailio.
1- Cancel when Invite timeout 408
2- Cancel generated when call lands on multiple devices and any one of them
answer the call.
This type of cancel comes with (rfc3326)
Reason: SIP;cause=200;text="Call completed elsewhere"
How can I capture and isolate these proxy generated CANCEL events?
--
regards,
abdul basit
Hello,
I am trying to use the dialplan module but I am having this problem:
First of all, I pull the "dpid" value from the two first digits of the dnis:
$var(dialplan_vendor) = $(rU{s.substr,0,2});
Then
if(!dp_translate("$var(dialplan_vendor)","$dlg_var(servicio)/$var(ani_dialplan)"))
{
xlog("L_NOTICE","Error al seleccionar el dialplan\n");
sl_send_reply("403", "Not allowed");
drop;
}
But when I test everything I get:
ERROR: dialplan [dialplan.c:233]: dp_get_ivalue(): no AVP, XAVP or
SCRIPTVAR found (error in scripts)
I think the problem is related to variable $var(dialplan_vendor). It is set
up as string due to the transformation and dialplan need a integer.
If I set up the variable this way for testing: $var(dialplan_vendor) = 18,
it works correctly.
Question, how can I transform the sting into a integer?
Thank you
Nelson.
Hi,
we recently stumbled upon the following problem:
We had something like this in our route:
$var(ret) = allow_address("2");
if ($var(ret)) {
do_something;
}
Turns out, this always evaluates to true, no matter whether the IP
address really is in address group 2 or not. The values in $var(ret)
are 1 or -1, depending on the outcome of allow_address().
However, if we write it this way
if (allow_address("2")) {
do_something;
}
the code inside is only executed if the IP address is in address group 2.
Is this some kind of inconsistency? Should negative values in
variables evaluate to true or false?
Best Regards,
Sebastian
Hi Daniel!
Looking into code it seems RPC functions of USRLOC don't allow setting
all fields for USRLOC entry, for example, Received and Socket.
It would be great if we can set these, because we need to have ability
to transfer contacts from other server to Kamailio.
I think at present this can be done sending specially crafted fake
REGISTER packets or calling special route from HTTP with some tricks
for saving contact and received, but as for me it would be great to
set it from RPC because we already have ul.add method.
It also would be cool if we can use named parameters in JSONRPC
params: {} section with names corresponding to usrloc fields, like
'table', 'AOR', 'received' and so on. Maybe on specual key not to mix
with current 'params'.
Thanks for your great work!
--
Best regards,
Dmitry Sytchev,
IT Engineer
Hi Daniel!
Looking into code it seems RPC functions of USRLOC don't allow setting
all fields for USRLOC entry, for example, Received and Socket.
It would be great if we can set these, because we need to have ability
to transfer contacts from other server to Kamailio.
I think at present this can be done sending specially crafted fake
REGISTER packets or calling special route from HTTP with some tricks
for saving contact and received, but as for me it would be great to
set it from RPC because we already have ul.add method.
It also would be cool if we can use named parameters in JSONRPC
params: {} section with names corresponding to usrloc fields, like
'table', 'AOR', 'received' and so on. Maybe on specual key not to mix
with current 'params'.
Thanks for your great work!
--
Best regards,
Dmitry Sytchev,
IT Engineer
Hi Robert,
Hope you are doing good.
You have helped me in the past.
I need to set LCR via app_lua, getting rates and destination from mysql.
Link which i am following is
https://www.kamailio.org/wiki/embeddedapi/4.0.x/lua
The issue is I am not able to get connect via sr commands for example
sr.sqlops.query("connection", "query", "result")
What should be exactly is "connection", "query", "result"
Error I am getting in syslog is
/usr/local/kamailio/etc/kamailio/kamailio.lua:1: attempt to index
field 'sqlops' (a nil value)
I am using kamailio 5.0.2
A little bit of headsup will help me.
Thanks a lot again.
--
Regards
Santosh Gupta
+91 9323043570
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_cam…>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_cam…>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Hi,
I have one query in Dialplan module, my scenario is If I call
22291+++++++++ the first three digit should remove and the call place to
91+++++++.
But i dont get the exact result, the first three digits are not removing. I
have used the below rules:
Lcr_rule table:
============
id: 5
lcr_id: 2
Prefix:22291
Request uri: NULL
Stopper: 1
Enabled: 1
LCR_rule_target:
==================
id:3
lcr_id:2
rule_id:5
gw:id:2
priority:1
weight:1
Dialplan table:
=============
id:3
dpid:2
pr:1
match_op:1
match_exp: ^222[0-9]+$
subst_exp: ^222[0-9]+$
repl_exp:\1
Is it correct or not, Please guide me.
Thanks & Kind Regards,
Logeshwaran G
Hello,
I have several Asterisk sending calls to a centralizad Kamailio.
I would like this Kamailio to set up the caller id number of the calls.
I am using the uac_replace_from function but I would like to pull the
caller id from a database to set up the number based on the sip vendor the
call is forwarded
What would be the correct way to do that?
I was thinking of:
sql_query("ca", "select ddi from ddi_table where xxx= $rU limit 1", "ra");
$avp(dnis) = $dbr(ra=>[0,0]);
sql_result_free("ra");
But I am afraid of causing a bottheneck on the database.
As usual, thank you for the help.
Regards,
Nelson.-
Hello,
I have Kamailio 5.0 configured with snmpstats module. I can succesfully
query for eg. the current num of dialogs on kamailio by issuing:
snmpget -v 2c -c public localhost KAMAILIO-MIB::kamailioCurNumDialogs.0
KAMAILIO-MIB::kamailioCurNumDialogs.0 = Gauge32: 0
Is it possible to make query about calls that have ended with 5xx sip
cause code on last 5min or 15min?
I noticed that the following is available on the snmpstats module but it
only holds a counter that keeps increasing until I restart kamailio
process:
snmpget -v 2c -c public localhost
KAMAILIO-MIB::kamailioTotalNumFailedDialogSetups.0
Also I think the above includes all cause codes that are between
3xx-6xx.
Cheers,
--Olli