Hello,
We are using a few carries where we are sending calls to, each of them is
using a special prefix in the From header in order to manage the callerid.
Some of them are not recognizing headers like P-Asserted-Identity or
Remote-Party-ID, so for them we have to replace the From header with the
corresponding prefix. The way we do - it's by using the uac_replace_from
function, which works fine.
The problem is when we are sending the same call to the failover trunk, and
that trunk is using a different prefix. We have to call again the
uac_replace_from function which is appending the new prefix to the existing
one, something like:
From: <sip:12345@domain.localsip:+12345@domain.local>;tag=as404cb50c
I was trying to use uac_restore_from() function and call again
uac_replace_from, but the result is the same.
Is there any way to call the uac_restore_from function twice for the same
call?
Thank you.
Hello ,
I was using Kamailio 5.3.3 . After upgrading to 5.4.0 i am getting below
error with same cfg file which worked well with 5.3.3.
0(102523) ERROR: <core> [core/ppcfg.c:235]: pp_ifdef_level_error():
different number of preprocessor directives: 2 more #!if[n]def as #!endif
What does this mean? Any clue to solve this?
--
Thanks,
Sagar
Hello,
What will be the best way to save ISP Information in Kamailio memory?
I have the following information for each ISP into the DB:
*ISP Name | ISP IP | ISP Username | ISP Password | ISP Prefix*
ISP1 | 1.1.1.1 | user | pass |
1234
This info it's not changed/updated too often, so I want to avoid querying
the DB on every call and get this info directly from the memory.
I was thinking to use htable for that, so I created a htable as an array
for that and loaded all the information there manually, something like that:
*kamcmd htable.sets isp ISP1[address] 1.1.1.1*
* kamcmd htable.sets isp ISP1[username] user*
* kamcmd htable.sets isp ISP1[password] pass*
* kamcmd htable.sets isp ISP1[prefix] 1234 *
*$sht( isp => ISP1[address]) == "1.1.1.1"*
* $sht( isp => ISP1[username]) == "user" *
* $sht( isp => ISP1[password]) == "pass" *
* $sht( isp => ISP1[prefix]) == "1234" *
So far so good, I'm able to get this information from the htable and use it
whenever I need it.
Now, the problem comes when I want to load all this information
automatically from the DB. How can I setup htable module to get the array
key (address, username...) from the database automatically on server
restart, and append this array_key to the column value?
I've tried this way:
modparam("htable", "htable",
"isp=>size=8;dbtable=isp;cols='trunk_name[address],trunk_address'")
But it's not working unfortunately, getting back this error: You have an
error in your SQL syntax; check the manual that corresponds to your MariaDB
server version for the right syntax to use near '[address]'
If I'm setting this way:
modparam("htable", "htable",
"isp=>size=8;dbtable=isp;cols='trunk_name,trunk_address'")
and setting trunk_name value to: ISP1[address], then it's working fine, but
in this case I will have to create by one column for each array key, which
may be confusing and it's a lot of unnecessarily information into the DB.
Is it possible to do that, or better to trigger a script on each restart
which will load this information from the DB into htable?
Thanks
Hello,
Is it permitted to use the wildcard TLS certificates for Kamailio server?
In reality, it works (tested with v.5.4) but the RFC-5922 disables the
wildcard certificates usage:
"Implementations MUST match the values in their entirety:
Implementations MUST NOT match suffixes. For example,
"foo.example.com" does not match "example.com".
Implementations MUST NOT match any form of wildcard, such as a
leading "." or "*." with any other DNS label or sequence of
labels. For example, "*.example.com" matches only
"*.example.com" but not "foo.example.com". Similarly,
".example.com" matches only ".example.com", and does not match
"foo.example.com".
(Ref.:https://tools.ietf.org/html/rfc5922#section-7.2)
To be honest, I don't understand why this restriction is good for...
Is somebody aware of a newer RFC that removes this limitation?
Best regards,
Leonid Fainshtein
Hello,
I have confuse about this timeout:
https://www.kamailio.org/docs/modules/devel/modules/xhttp_prom.html#xhttp_p…
Is there reason for forced deletion of unused metrics?
Let's imagine a situation: Zabbix reads metrics at a certain interval,
unused metrics are deleted if they are not used for a period of time
(xhttp_prom_timeout).
I drew 2 cases when Zabbix will receive the same value, but we cannot say
unambiguously whether these are new values or not.
[image: xhttp_prom_timeout.jpg]
Regards,
Marat
Hi, I have kamailio connect to Teams, and works form Asterisk -> Teams
calls.
For Teams -> Asterisk calls I'd worked using extension and register
Asterisk with that extension.
But I'd like to use direct routing with IP.
In kamailio.cfg I activate define WITH_PSTN.
I configured the IP and PORT for my PSTN.
I'm using the default route[PSTN]:
route[PSTN] {
#!ifdef WITH_PSTN
# check if PSTN GW IP is defined
xlog("L_INFO","PSTN ACTIVADO");
if (strempty($sel(cfg_get.pstn.gw_ip))) {
xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip not
defined\n");
return;
}
# route to PSTN dialed numbers starting with '+' or '00'
# (international format)
# - update the condition to match your dialing rules for PSTN
routing
if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$")){
xlog("L_INFO", "Error en el formato numerico!!");
return;
}
# only local users allowed to call
if(from_uri!=myself) {
sl_send_reply("403", "Not Allowed");
exit;
}
# normalize target number for pstn gateway
# - convert leading 00 to +
#if (starts_with("$rU", "00")) {
# strip(2);
# prefix("+");
#}
if (strempty($sel(cfg_get.pstn.gw_port))) {
#$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
xlog("L_INFO","SELECCION CON PUERTO");
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":"
+ $sel(cfg_get.pstn.gw_port);
} else {
xlog("L_INFO","SELECCION CON PUERTO");
$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":"
+ $sel(cfg_get.pstn.gw_port);
}
route(RELAY);
exit;
#!endif
return;
}
And in my request_route:
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE")) {
if($src_ip != "IP ASTERISK"){
xlog("L_INFO", "***********ROUTE PSTN***********");
route(PSTN);
} else {
xlog("L_INFO","LLamada desde $si con puerto $sp");
record_route_preset("FQND:5061;transport=tls", "IP
KAMAILIO:5060");
add_rr_param(";r2=on");
route(DISPATCH);
route(RELAY);
}
}
But never see that the call go to PSTN route..
I'd made any wrong??
Thanks
All, hi:
I'm a Kamailio newbie!
I've managed to set up a proxy server with the minimal configuration file found here: https://github.com/kamailio/kamailio/blob/master/misc/examples/mixed/kamail….
The issue that I'm having is that the audio on calls simply stop precisely after 15 minutes. It's always precisely at 15 minutes. The calls continue connected but without any audio.
A summary about my set up:
1. This is an Amazon AWS EC2 server so it doesn't have a public IP directly attached to the interface. This makes me believe that the issue might be related to NAT.
2. I use Flowroute as the SIP trunk for these tests.
3. My phone system, for testing purposes, works on UDP port 6060 an the RTP ports are 20,000 to 30,000.
4. I am not using, for the time being, TLS nor SRTP.
5. My phone system is inside the same subnet as the Kamailio server.
Questions:
1) Am I missing the NATHELPER module and if so how could we combine it to the minimal proxy configuration described above? Assuming that my Kamailio server uses local IP 10.80.10.5 and the PBX 10.80.10.6, both on UDP port 6060 for SIP.
2) May I simply combine the example file for nathelper.cfg as per this URL: https://github.com/kamailio/kamailio/blob/master/misc/examples/mixed/nathel… to the proxy example files, change IP addresses, ports, etc.? If not, how would one go about adding the NATHELPER module to the minimal proxy configuration?
3) Could it be some other issue that is causing the 15-minute interruption on audio?
Thank you so much for your help!
We have a PBX that doesn’t support websockets .
But we want a PWA webaapp ctxSIP that uses sip.js to work .
Due to its not SIP generic do we setup like this
PBX <----> Kamailio <---->webapp
Im looking for developers for android build via react native or ionic framework but not sure what solution/archtectiure
Question. Does Kamailio register the SIP user/pass on the Kamailio server meaning it keeps it registered. And thus the ctxSIP client app just handles the pass thru for that connection.
What about RTP do I need a separate handler for that.
Tha nks