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
Hi list,
I use rtpengine 7.2.1 branch with kamailio 5.2.x and 5.3.x in
different setups.
Due to some issues with my 5.2.x config I saw the "Total timed-out sessions
via TIMEOUT" grow but "Total regular terminated sessions never" goes up
from 0.
That was an indicator for an non-existing rtpengine_manage() or
rtpengine_delete() at the end of dialogs. Okay.
Now I want to observe that a bit more.
I use parallel forking to webrtc clients, that i guess will be the "more
Offers" than Answers.
Any hints on what numbers are important?
rtpengine-ctl -ip 127.0.0.1:4444 list totals
Total statistics (does not include current running sessions):
Uptime of rtpengine :27726 seconds
Total managed sessions :3435
Total rejected sessions :0
Total timed-out sessions via TIMEOUT :0
Total timed-out sessions via SILENT_TIMEOUT :0
Total timed-out sessions via FINAL_TIMEOUT :0
Total timed-out sessions via OFFER_TIMEOUT :0
Total regular terminated sessions :3435
Total forced terminated sessions :0
Total relayed packets :69127802
Total relayed packet errors :5063
Total number of streams with no relayed packets :128
Total number of 1-way streams :8
Average call duration :233.321876
Graphite interval statistics (last reported values to graphite):
Total calls duration :0.000000
Min managed sessions :0
Max managed sessions :0
Min/Max/Avg offer processing delay
:0.000000/0.000000/0.000000 sec
Min/Max/Avg answer processing delay
:0.000000/0.000000/0.000000 sec
Min/Max/Avg delete processing delay
:0.000000/0.000000/0.000000 sec
Min/Max/Avg offer requests per second :0/0/0 per sec
Min/Max/Avg answer requests per second :0/0/0 per sec
Min/Max/Avg delete requests per second :0/0/0 per sec
Control statistics:
Proxy | Offer | Answer | Delete | Ping |
List | Query | StartRec | StopRec | Errors | BlkDTMF
| UnblkDTMF
127.0.0.1 | 3896 | 3757 | 3499 | 0 |
0 | 0 | 0 | 0 | 0 | 0
| 0
Kind Regards
--
Mit freundlichen Grüßen
*Karsten Horsmann*