Hi Experts.
I did some tests with DIALPLAN module and I have some doubts about how to
define the regular expressions in the database.
For example, using the start character '^' (beginning of the string), it
looks not working:
kamcmd> dialplan.dump 1
{
DPID: 1
ENTRIES: {
ENTRY: {
PRIO: 1
MATCHOP: 2
MATCHEXP: ^(\+39)(.*)$
MATCHLEN: 0
…
[View More]SUBSTEXP: ^(\+39)(.*)$
REPLEXP: \2
ATTRS: 1
}
}
}
kamcmd> dialplan.translate 1 "+39123456"
error: 500 - No translation
Removing it, it works... but not as desired:
kamcmd> dialplan.dump 1
{
DPID: 1
ENTRIES: {
ENTRY: {
PRIO: 1
MATCHOP: 1
MATCHEXP: (\+39)(.*)$
MATCHLEN: 0
SUBSTEXP: (\+39)(.*)$
REPLEXP: \2
ATTRS: 1
}
}
}
kamcmd> dialplan.translate 1 "+39123456"
{
Output: 123456"
Attributes: 1
}
kamcmd> dialplan.translate 1 "xxxxxxx+39123456"
{
Output: 123456"
Attributes: 1
}
Can someone help me understand how the regular expression should be used in
DIALPLAN, please?
Br. Stefano
[View Less]
Hi experts.
I intended ATTRIBUTES is a value that is returned by dialplan's
dp_translate as the result as shown by kamcmd command:
kamcmd> dialplan.translate 2 s:+3912345
{
Output: 3912345
Attributes: test
}
Is my understanding correct?
I tried many ways, including using AVP and XAVP for the result, but no
success:
dp_translate("2", "$rU/$xavp(dp_result)");
pv_xavp_print();
DEBUG: dialplan [dialplan.c:222]: dp_get_ivalue(): dpid is 2 from constant
argument
DEBUG: …
[View More]dialplan [dialplan.c:243]: dp_get_svalue(): searching 7
DEBUG: dialplan [dialplan.c:331]: dp_translate_f(): input is +3912345
DEBUG: dialplan [dp_repl.c:592]: translate(): regex operator testing over
[+3912345]
DEBUG: dialplan [dp_repl.c:662]: translate(): found a matching rule
0x7f56aef690d8: pr 1, match_exp ^\+39.....
DEBUG: dialplan [dp_repl.c:481]: rule_translate(): copying match <3912345>
token size 2
DEBUG: dialplan [dialplan.c:340]: dp_translate_f(): input +3912345 with
dpid 2 => output 3912345
INFO: <core> [xavp.c:494]: xavp_print_list_content(): +++++ start XAVP
list: 0x7f56aeffaaa8 (level=0)
INFO: <core> [xavp.c:498]: xavp_print_list_content(): *** XAVP name:
dp_result
INFO: <core> [xavp.c:499]: xavp_print_list_content(): XAVP id:
3539756229
INFO: <core> [xavp.c:500]: xavp_print_list_content(): XAVP value type:
2
INFO: <core> [xavp.c:509]: xavp_print_list_content(): XAVP value:
3912345
INFO: <core> [xavp.c:531]: xavp_print_list_content(): ----- end XAVP list:
0x7f56aeffaaa8 (level=0)
If possible, how can I get both OUTPUT and ATTRIBUTES as result?
Stefano
[View Less]
Hello All,
When db_mysql is selected in the make, the make looks for -lmariadb. However, I want MySQL, not mariadb. Is there a way to let the make know that MySQL is preferred ov mariadb?
Thank you
hello dears ,
i'm using kamailio 5.0.1 as IMS platform and have the following issues :
* for Module "ims_usrloc_scscf" there is no documentation and i can't find a way to set database mode =2 and define the tables .
* for Module "ims_registrar_scscf"when the user Unregistered it takes about 1~2 minutes to remove it from the memory on database mode 0 .
so is there a way to minimize the timer when the user Unregistered and remove it immediately from the memory .
thanks in advance & best regards.
Hello,
with commit a213d9d1 I introduced a Code of Conduct to the Kamailio repository
[1].
This topic was initially discussed during the Kamailio development workshop,
started from Daniel. During the development workshop we came to the conclusion
that this is a policy decision and needs broader discussion in the Kamailio
Management board and also the Kamailio Admin-Team.
This discussion started last Friday, and after several days of discussion we
decided to choose an existing Code of …
[View More]Conduct. We adapted the CoC of the
Debian Project [2] and did a few changes for readability and also to adapt it
to the (smaller) scope of our project.
This CoC is in my opinion a good, generic and pragmatic document. Many people
in our community are already in one way or the other involved in the Debian
project.
I am aware that this is (especially right now) a hot topic for some people. My
personal opinion is that we managed to get a great fit to the existing
Kamailio community culture. The history of this project shows that we are an
open project and welcome contributions from anybody. So I don't expect any
impact because of this change.
We also ensured that the CoC only applies inside the Kamailio project, and
that the Kamailio Management board is the authoritative instance in any
conflicts about this topic.
I don't want to start a classical "bike-shedding" discussion on this list
about this topic.. But if you have any questions about this, lets us know. You
can also contact the Kamailio Management Board, if you want to keep it
private.
Best regards,
Henning Westerholt
[1] https://github.com/kamailio/kamailio/blob/master/CODE_OF_CONDUCT.md
[2] https://www.debian.org/code_of_conduct
[View Less]
Hi All,
I have compiled the kamailio v5.1.6 source code with tls and websocket
module enabled in ubuntu 18.04 LTS. Now I am able to start the kamailio in
UDP and TCP port 5060. I wanted to run the kamailio in WS, WSS and TLS
port as well. I have generated the private_key, certificate and ca_list and
provided the absolute file path in tls.cfg file.
I observed tls.so and websocket.so is present in the module path after
compile and installation of code. I have used below command to compile and
…
[View More]install.
1. make proper
2. make PREFIX="/usr/local/kamailio-5.1" include_modules="db_mysql tls
websocket" cfg
3. make all
4. make install
I have attached the kamailio.cfg and tls.cfg. Could you please suggest the
modification in configuration file to run in WS, WSS and TLS port ?
Thanks
Priyaranjan
[View Less]
Hi!
I just upgrade from 5.1.5 to 5.1.6 on my machine and I see Kamailio segfaulting (SIGSEGV).
Unfortunately the systemd service is also not restarted in this case.
I will generate coredumps and look into the backtrace and provide you with any insights I can gather.
Hello all,
I'm very rusty when it comes to variables :(
There's a part of my config where i load a parameter from usr_preferences
to know whether i should append a branch and call him to a fixed IP as well
as to their current location. I tried doing this on the REQUEST_ROUTE and
append a branch like:
# This will check if the TO user is an office user
if (avp_db_load("$to", "$avp(office)")) {
if ( $avp(gsm)==1 ) {
xlog("L_ERR","[…
[View More]REQUEST_ROUTE]: [$rm] callid: $ci
from=$fU to=$tU should be ($avp(gsm)) branched - Appending branch\n");
append_branch("sip:$tU@1.2.3.4:5060");
}
}
And later when the script hits the RELAY, the branch is actually sent, BUT
from the *PRIVATE IP.*
I tried adding:
force_send_socket(67.215.186.219:5060);
Right after the "append_branch" to set the socket from where to send, but
kamailio is still sending from the private ip.
Any ideas?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
[View Less]
Hello
I would like to ask if there is any available informations on how to use
Kamailio as a SIP Proxy but letting (multiple) Asterisk Instances do the
Media Relaying. Is this scenario supported and if yes are there any
tutorials or documentation available for it?
I know the Kamailio Dispatcher Module, but this does as far as I know a
dispatching of also the SIP Traffic. Not just the Media Traffic.