Hi All,
Please help!
I am getting an error when trying to start kamailio after making some
changes to the configuration file.
Error is :
*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
47-57: '('')' expected (function call)*
*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
102: bad expression*
*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
102: bad command*
*atus=255/EXCEPTION*
*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
103: bad command*
*rse error in config file /etc/kamailio/kamailio.cfg, line 878, column
105: bad command*
* used inside params of another function: xlog*
*rse error in config file /etc/kamailio/kamailio.cfg, line 879, column
28: use of function execution inside params not allowed*
*Server.*
Changes made is :
# Routing to foreign domains
route[SIPOUT] {
if (uri==myself) return;
#Start of change
if (mongodb_find_one("mongodbsrv1", “telephone", “cXXX", " {
\'did\': \'2XXXXXXXXXXXXXXXXX\' } ", "mgr1")) {
xlog("response from mongodb is
[[$mongodb(mgr1=>value)]]\n");
}
#End of change
append_hf("P-hint: outbound\r\n");
route(RELAY);
exit;
}
Please can someone tell me what I am doing wrong. Error says syntax but I
have tried many permutations of the suggested syntax with no luck.
Please help
Thanks
--
-----
Ekunwe
EDO Network Services, Inc.
Tel: 601.497.3932
Hello Everyone,
First of all, this is my first ever e-mail to the group so I'd like to thank all the developers who built this great product and thank everyone for the kind and helpful community. I've been using Kamailio for the past 8 months, I've had lots of fun with it.
My issue is I'm trying to set-up JS Kemi interpreter for my Kamailio-Asterisk box. I translated the config file to JS kemi, which wasn't too bad but I'm getting a type error for the "KSR.kx.ifdef("WITH_ASTERISK")" statement that I used.
Jan 17 15:11:26 anayurt kamailio[8261]: 0(8261) DEBUG: app_jsdt [app_jsdt_api.c:1478]: dukopen_KSR(): module 'KSR' has been initialized
Jan 17 15:11:26 anayurt kamailio[8261]: 0(8261) DEBUG: app_jsdt [app_jsdt_api.c:473]: jsdt_sr_init_child(): loading js script file: /usr/local/etc/kamailio/kamailio-basic-kemi-jsdt.js
Jan 17 15:11:26 anayurt kamailio[8261]: 0(8261) ERROR: app_jsdt [app_jsdt_api.c:447]: jsdt_kemi_load_script(): failed running: TypeError: undefined not callable (property 'ifdef' of [object Object])
Jan 17 15:11:26 anayurt kamailio[8261]: 0(8261) ERROR: <core> [core/sr_module.c:865]: init_mod_child(): error while initializing module app_jsdt (/usr/local/lib64/kamailio/modules/app_jsdt.so) (idx: 0 rank: -127 desc: [main])
Jan 17 15:11:26 anayurt kamailio[8261]: 0(8261) ERROR: <core> [main.c:1671]: main_loop(): error in init_child(PROC_INT) -- exiting
In syslog I can see that kex.so module is loaded successfully and 'KSR' has been initialized. I don't know what I'm doing wrong. A few sample JS Kemi code that I could find did not use the kx.ifdef function. Was this a new addition to the interpreter? Perhaps my Kamailio version (kamailio 5.5.0 x86_64/linux) does not support it?
Thank you all in advance.
Kaan.
We are looking for some help (possibly a paid consultant) to help us with our Kamailio setup.
To keep this as short as possible: we use Kamailio as a NAT proxy to bridge our external IP and our private IP asterisk
servers (via dispatcher).
However both the external IP and the internal IP that the Kamailio server uses are virtual IPs created by keepalived.
Because of that neither mhomed nor fix_nated_contact work, and we use force_send_socket to direct the traffic.
We run linux Debian 10 for the OS.
Also we do not use a DB at all, everything is done with local config files.
The problem is that when traffic goes out the Contact header has a private IP in it, like:
Contact: <sip:##########@10.10.10.###]:5060>
There are 2 possible solutions to this:
1. Make changes to linux, keepalived and/or Kamailio so that Kamailio recognize the virtual IPs so that mhomed and
fix_nated_contact work as usual.
2. Create a manual header rewrite system.
If solution #2:
What we need to do is create a way to rewrite the contact header to the external IP on the way out, and on the way back
rewrite it back to the internal server that the call is already connected to.
Not sure if we will need to store those paths on the server or if we can do some kind of cheat with another persistant
header like P-Preferred-Identity or P-Asserted-Identity (i.e. store the internal IP in the name field or something).
If anyone out there know of a way to do this or wants to give it a try please reach out to me.
Thank you all for your time.
--
^C
Chad
Hello,
We are attempting to setup an instance of Kamailio to serve as an IMS
for a test setup of 4G/5G NSA with Open5GS.
The instructions on the Kamailio wiki and provided by Open5GS
currently specify to use FoHSS as the HSS solution for Kamailio IMS. As
this HSS solution has not seen significant development in a few years
we are reticent to deploy it on our implementation.
Is there an alternative open source HSS which can be deployed to serve
as the HSS for Kamailio instead of FoHSS, and would there need to be
any adjustments to Kamailio to reflect the deployment of this HSS
instead of FoHSS?
Thank you,
Benjamin Simon
Research Assistant
Florida Institute for Cybersecurity Research, University of Florida
Email: bsimon4(a)ufl.edu
Disclaimer: Florida has a very broad public records law. As a result,
any written communication created or received by the University of
Florida will be made available to the public and media, upon request,
unless otherwise exempt. Under Florida law, e-mail addresses are public
records. If you do not want your e-mail address released in response to
a public records request, do not send electronic mail to this address.
Instead, contact by phone or in writing.
Hi,
I have a pair of kamailio stateful proxies and am trying to achieve
Active-Passive failover model with DMQ dialog replication. Primary Proxy is
working in the middle of 2 SBCs and all nodes are within the same network
so NATing is NOT involved ;secondary proxy is accessible through VPN. It's
pretty simple configuration, proxy is just adding and removing headers in
the middle.
So if I stop the kamailio service on primary IP , SBCs blacklist that and
start sending new invites to secondary IP. That's all good.
But if I reproduce this failover during a connected session , SBCs do not
send mid-dialog requests/responses to failover IP. I can see they still try
to send messages to primary SBC which obviously end up with timeout. I
understand the most natural solution is HA with Virual IP but it's not
possible because secondary IP is accessible through VPN.
I tried to use DNS SRV record with priorities but that also does not work
with mid-dialog messages, I also have tried to change record-route/via
header to fqdn through advertise_address. Its not changing record-route but
via only but I am still not getting expected results.
Any guidance of possible solution(s) here will be appreciated.
--
Muhammad Danish Moosa
" The core of mans' spirit comes from new experiences. "___ Christopher
McCandless
Hello!
I need help uploading a list of aliases through a dbtext to use them via
myself.
It is likely that there is some configuration problem:
*loadmodule "db_text.so"*
*modparam("db_text", "db_mode", 1)modparam("db_text", "emptystring", 1)*
*loadmodule "alias_db.so"modparam("alias_db", "db_url",
"text:///etc/kamailio/dbtext")*
*[root@kamailio]$ cat dbtext/dbaliasesid(int,auto) alias_username(string)
alias_domain(string) username(string) domain(string)1::sip.test.local::*
*[root@kamailio]$ kamcmd core.aliases_list{ myself_callbacks: yes
aliases: { }}*
If done through a script (alias=sip.test.local), then everything works fine:
*[root@kamailio]$ kamcmd core.aliases_list{ myself_callbacks: yes
aliases: { alias: { proto: *
address: sip.test.local port: *
} }}*
--
BR,
Denys Pozniak
Hi All,
I have tried couple of methods to retrieve last via IP of SIP message but failed to retrieve it, trying to retrieve the source
- @hf_value.via[-1].host,
it simply prints the exact text back @hf_value.via[-1].host
- $sel((a)hf_value.via[-1])
it doest give the IP but the entire via value
SIP/2.0/TCP 172.31.30.144;branch=z9hG4bKf8bd.753341d2000000000000000000000000.0.host
@via[-1].host
it also simply prints the exact text back @via[-1].host
Regards,
Adarsh Chauha
Hi,
Given several EVAPI worker processes:
modparam("evapi", "workers", 4)
# kamcmd -s /run/kamailio/kamailio_ctl ps | fgrep -i evapi
539257 EvAPI Dispatcher
539258 EvAPI Worker
539259 EvAPI Worker
539260 EvAPI Worker
539261 EvAPI Worker
How should one understand the way that the EVAPI workload is allocated among them?
My best guess is that the EvAPI dispatcher process is the sole accept()or of client connections and the place where all relaying to client connections is done, regardless of their number, and that the ‘workers’ represent an async pool of processes in which TM transactions can be resumed or other work can be done when an outside caller sends a message to the dispatcher.
However, the documentation[1] is a little vague on the meaning of the ‘workers’ modparam:
"Number of worker processes to be started to handle incoming messages from remote applications.”
Or maybe it’s not. Just wanted to confirm that my understanding is correct.
Thanks!
— Alex
[1] https://kamailio.org/docs/modules/5.5.x/modules/evapi.html#evapi.p.workers
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/