hello,
sorry for this very basic question, but i am a new kamailio user.
i installed kamailio and calls between users work fine.
now i would like to make it possible to route outbound sip calls. so
when a user dials for example 21 the call should be routed to
wbdemo(a)zipdx.com
thank you so much for your help!
best regards,
thomas peterseil
Broken is in the eyes of the beholder: well designed cryptographic code wants to ensure that information (keys, cleartext) doesn't leak via unsanitized memory (there are many ways, both within and beyond calling programs); the easy and more foolproof way to do that for the cryptography programmer is often to use a memory manager that takes care of that, such as jemalloc (with appropriate configuration parameters).
If you make security representations (and the certificate is reasonably construed to make a security representation) you shouldn't bypass this unless you verify that you prevent all possible information leaks.
From armslength, you might just try to use jemalloc as kamailio's mm library, but even there it would be necessary to be really careful about kamailio freeing sensitive memory immediately after use--everywhere that happens. That's why it's probably easier to just let a properly implemented crypto library do what it's designed to do.
Sent from Samsung Mobile
-------- Original message --------
From: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 12/12/2017 2:26 AM (GMT-06:00)
To: "Kamailio (SER) - Users Mailing List" <sr-users(a)lists.kamailio.org>,Tomi Hakkarainen <tpaivaa(a)gmail.com>
Subject: Re: [SR-Users] Unable to enable TLS on Kamailio
Hello,
there were some broken versions of openssl that didn't allow anymore to set custom memory manager. The only option is to upgrade libssl to a version that doesn't expose the issue. If you search on kamailio issues tracker on gihub.com, there should be one closed about this topic.
Cheers,
Daniel
On 11.12.17 22:20, Tomi Hakkarainen wrote:
Hi,
I have problem to enable TLS on just installed Kamailio server
openSUSE 42.3 (x86_64)
VERSION = 42.3
CODENAME = Malachite
version: kamailio 5.0.4 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 18:06:25 Dec 3 2017 with gcc 4.8.5
I get this on debug log:
0(11336) DEBUG: <core> [core/cfg.y:1642]: yyparse(): loading modules under /usr/lib64/kamailio/modules/
loading modules under config path: /usr/lib64/kamailio/modules/
0(11336) DEBUG: <core> [core/cfg.y:1623]: yyparse(): loading module tls.so
0(11336) DEBUG: <core> [core/sr_module.c:575]: load_module(): trying to load </usr/lib64/kamailio/modules/tls.so>
0(11336) DEBUG: <core> [core/mem/q_malloc.c:189]: qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
0(11336) DEBUG: <core> [core/mem/q_malloc.c:191]: qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
0(11336) DEBUG: <core> [core/mem/q_malloc.c:193]: qm_malloc_init(): qm_malloc_init(0x7f6e001cb000, 67108864), start=0x7f6e001cb000
0(11336) DEBUG: <core> [core/mem/q_malloc.c:202]: qm_malloc_init(): qm_malloc_init: size= 67108864, init_overhead=235256
0(11336) ERROR: tls [tls_init.c:595]: tls_pre_init(): Unable to set the memory allocation functions
0(11336) ERROR: tls [tls_init.c:597]: tls_pre_init(): libssl current mem functions - m: 0x7f6e055b33d0 r: 0x7f6e055b3a30 f: 0x7f6e055b39a0
0(11336) ERROR: tls [tls_init.c:599]: tls_pre_init(): Be sure tls module is loaded before any other module using libssl (can be loaded first to be safe)
0(11336) ERROR: <core> [core/sr_module.c:607]: load_module(): /usr/lib64/kamailio/modules/tls.so: mod_register failed
0(11336) CRITICAL: <core> [core/cfg.y:3411]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 150, column 12-19: failed to load module
for resolving have compiled openssl from 1.0.2j-fips to
openssl version
OpenSSL 1.0.2n 7 Dec 2017
Is this information enough to see what we are missing
Will provide more info if needed.
Any help and suggestions are appreciated.
Regards,
T
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Hi all,
I have a doubt regarding how dispatcher selects a node...
>From the docs:
*[...]*
*alg* - the algorithm used to select the destination address. The parameter
can be an integer or a variable holding an interger.
-
“4” - round-robin (next destination).
-
“8” - select destination sorted by priority attribute value (serial
forking ordered by priority).
-
“9” - use weight based load distribution. You have to set the attribute
'weight' per each address in destination set.
*[...]*
I normally use "4", so dispatcher round-robins through the destinations of
a setid, but I have now the following doubt:
If a trunk has 3 nodes, say 1.1.1.1, 2.2.2.2, 3.3.3.3
Can I do:
Send all calls to 1.1.1.1, if it goes down, then do a 80%-20% between
2.2.2.2 and 3.3.3.3.
if the trunk has a correct DNS SRV setup with weight and priority it's easy
to achieve, but in this case there is no SRV or nothing, just 3 IPs.
So can this logic be achieved with dispatcher directly? Can do some
combination of alg "8" and alg "9"?
Or would the correct approach need two separate setid groups and handle
that logic in failure route?
Thanks,
Joel.
Hello,
Is pua.publish strictly an MI function, or is it possible nowadays to
call it via the RPC channel, and specifically, using jsonrpc_exec()?
Thanks!
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Hello again,
Indeed this issue does not manifest at all. I'm awfully sorry for the false
alarm, and on release day no less!
The problem was there was a lingering DNAT rule in iptables, which would
translate port 5066 to port 5060. The deployment script injected this as it
was carried over from our legacy platform.
Of course, I kept banging my head against the wall here because sngrep
wouldn't show the DNAT's effect as it captures traffic from the NIC
directly: it would show a REGISTER arriving on 5066, but the dport was
masqueraded before being handed over to kamailio. Similarly for the
outgoing INVITE.
NAT is wrong in so many ways... :-)
BR,
George
On 11 December 2017 at 18:17, Daniel-Constantin Mierla <miconda(a)gmail.com>
wrote:
> Hello,
>
> I did a quick test and all looks fine, ports are set in via and
> record-route, in my config I have:
>
> record_route();
>
> $fs="udp:127.0.0.1:5080";
> $du = "sip:127.0.0.1:9";
> t_relay();
> exit;
>
> Then sending an OPTIONS resulted in the trace shown below.
>
> Cheers,
> Daniel
>
> U 2017/12/11 17:14:47.108430 127.0.0.1:56729 -> 127.0.0.1:5060
> OPTIONS sip:test@127.0.0.1 SIP/2.0.
> Via: SIP/2.0/UDP 192.168.178.84:62516;branch=z9hG4bK.3aaddf68;rport;alias.
> From: sip:sipsak@192.168.178.84:62516;tag=16d1c24.
> To: sip:test@127.0.0.1.
> Call-ID: 23927844(a)192.168.178.84.
> CSeq: 1 OPTIONS.
> Contact: sip:sipsak@192.168.178.84:62516.
> Content-Length: 0.
> Max-Forwards: 70.
> User-Agent: sipsak 0.9.7pre.
> Accept: text/plain.
> .
>
>
> U 2017/12/11 17:14:51.010251 127.0.0.1:5080 -> 127.0.0.1:9
> OPTIONS sip:test@127.0.0.1 SIP/2.0.
> Record-Route: <sip:127.0.0.1:5080;r2=on;lr>.
> Record-Route: <sip:127.0.0.1;r2=on;lr>.
> Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK61bd.
> b2882fea15c488761489f8ef588efbe1.0.
> Via: SIP/2.0/UDP 192.168.178.84:62516;received=127.0.0.1;branch=z9hG4bK.
> 3aaddf68;rport=56729;alias.
> From: sip:sipsak@192.168.178.84:62516;tag=16d1c24.
> To: sip:test@127.0.0.1.
> Call-ID: 23927844(a)192.168.178.84.
> CSeq: 1 OPTIONS.
> Contact: sip:sipsak@192.168.178.84:62516.
> Content-Length: 0.
> Max-Forwards: 69.
> User-Agent: sipsak 0.9.7pre.
> Accept: text/plain.
> .
>
> On 11.12.17 16:37, George Diamantopoulos wrote:
>
> Hello all,
>
> I have the following issue in my configuration, tested with 5.2.0-rc1 so
> far:
>
> At some point, I set the $fs pseudovariable to force a request to be
> relayed through a specific socket. Although this is honoured by kamailio
> (i.e. the request does indeed leave the kamailio host from the respective
> socket), the port number is not added to the Via and RR headers. As a
> result, all replies to the request, as well as all subsequent requests from
> the other SIP UA are relayed to the default port, 5060. Here's an example:
>
> SIP UAC to kamailio:
> INVITE 192.168.1.1:5060 ---> 192.168.1.254:5060
> Kamailio to UAS ($fs is set):
> INVITE 2.2.2.2:5066 ---> 3.3.3.3:5060
> Topmost Via in request relayed by kamailio is:
> SIP/2.0/UDP 2.2.2.2;branch=aaaaaaaaaaaaaa <- port 5066 is not added
> Topmost RR in request relayed by kamailio is:
> <sip:2.2.2.2;r2=on;lr;did=bbbbbbb;nat=yes> <- port 5066 is not added
> RESULT: Reply from UAS is sent to 2.2.2.2:5060
>
> Is this behaviour valid? Am I missing anything? Kamailio is configured to
> listen on both sockets on IP 2.2.2.2, namely: a) udp:2.2.2.2:5060 and b)
> 2.2.2.2:5066. Thanks.
>
> BR,
> George
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>
>
Hey
I'm trying to do some normalization on my Calling Number after Kamailio
chooses the Gateway in which it will deliver the request. So, i'm trying to
do the operation in the DISPATCH route. However, in this route,
msg_apply_changes() doesn't work and returns (-1).
I've tried to do this on a Branch route but Kamailio doesn't allow me to
use msg_apply_changes() there and otherwise changes won't be persistent.
Is there a way to modify $fU at this stage?
Cheers
Kamailio v5.1.0 is out – it comes with 9 new modules and a significant
set of improvements touching more than 90 existing modules.
You can read detailed release notes at:
* https://www.kamailio.org/w/kamailio-v5-1-0-release-notes/
Many thanks to all developers and community members that made possible
this release.
A consistent effort was directed to export most of the config functions
to the KEMI framework, allowing to write SIP routing logic in other
scripting languages executed by the embedded interpreters for Lua,
JavaScript, Python or Squirrel, with the option to reload the routing
script without restarting Kamailio.
Enjoy Kamailio v5.1.0!
Thank you for flying Kamailio!
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference 2018 - http://www.kamailioworld.com
Hello all,
I have the following issue in my configuration, tested with 5.2.0-rc1 so
far:
At some point, I set the $fs pseudovariable to force a request to be
relayed through a specific socket. Although this is honoured by kamailio
(i.e. the request does indeed leave the kamailio host from the respective
socket), the port number is not added to the Via and RR headers. As a
result, all replies to the request, as well as all subsequent requests from
the other SIP UA are relayed to the default port, 5060. Here's an example:
SIP UAC to kamailio:
INVITE 192.168.1.1:5060 ---> 192.168.1.254:5060
Kamailio to UAS ($fs is set):
INVITE 2.2.2.2:5066 ---> 3.3.3.3:5060
Topmost Via in request relayed by kamailio is:
SIP/2.0/UDP 2.2.2.2;branch=aaaaaaaaaaaaaa <- port 5066 is not added
Topmost RR in request relayed by kamailio is:
<sip:2.2.2.2;r2=on;lr;did=bbbbbbb;nat=yes> <- port 5066 is not added
RESULT: Reply from UAS is sent to 2.2.2.2:5060
Is this behaviour valid? Am I missing anything? Kamailio is configured to
listen on both sockets on IP 2.2.2.2, namely: a) udp:2.2.2.2:5060 and b)
2.2.2.2:5066. Thanks.
BR,
George
Hello,
Wanted to ask if you found something
________________________________
Alexandru Covalschi
VoIP Engineer and System Administrator
tel: +373 673 98 493
> 24 нояб. 2017 г., в 22:19, Alexandru Covalschi <568691(a)gmail.com> написал(а):
>
> Hello, sharing whole config except vars.cfg file, where values like API_PROTO, DBURL etc. are defined.
>
> <kamailio_504.cfg>
>
>
> ________________________________
> Alexandru Covalschi
> VoIP Engineer and System Administrator
> tel: +373 673 98 493
>
>> 24 нояб. 2017 г., в 13:21, Daniel-Constantin Mierla <miconda(a)gmail.com <mailto:miconda@gmail.com>> написал(а):
>>
>> Hello,
>>
>> can you provide here all the http_client_query(...) you have in your config and list in which route block are they used (like request_route, failure_route, ...)? You can replace IP addresses, usernames, passwords with other strings, but if you use any kamailio variables (e.g. $rU), let them in place.
>> Cheers,
>> Daniel
>>
>> On 23.11.17 20:54, Alexandru Covalschi wrote:
>>> sip:172.21.0.14:5060 <sip:172.21.0.14:5060> is the local address of the server, it seems like a bug in http_client, as I don't have such http_query call anywhere :/
>>> just re-checked
>>> Also the fact that it works perfectly on 4.4.6 tells that it's not a configuration issue
>>>
>>> ________________________________
>>> Alexandru Covalschi
>>> VoIP Engineer and System Administrator
>>> tel: +373 673 98 493
>>>
>>>> 23 нояб. 2017 г., в 16:59, Daniel-Constantin Mierla <miconda(a)gmail.com <mailto:miconda@gmail.com>> написал(а):
>>>>
>>>> There was a mistake in the exports structure, the name of the function with 4 parameter was http_query instead of http_client_query. I pushed a patch to fix it.
>>>> Then, related to the issue with cannot resolve the host, the debug messages show an invalid http url being used:
>>>>
>>>> Nov 21 04:18:20 ast1 /usr/sbin/kamailio[20804]: DEBUG: http_client [functions.c:146]: curL_query_url(): ****** ##### CURL URL [sip:172.21.0.14:5060 <sip:172.21.0.14:5060>]
>>>>
>>>> The it fails to do the dns stuff with it...
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>> On 22.11.17 22:38, Alexandru Covalschi wrote:
>>>>> Just wanted to ask if you need my help to test/check/etc.
>>>>>
>>>>> ________________________________
>>>>> Alexandru Covalschi
>>>>> VoIP Engineer and System Administrator
>>>>> tel: +373 673 98 493
>>>>>
>>>>>> 21 нояб. 2017 г., в 11:58, Alexandru Covalschi <568691(a)gmail.com <mailto:568691@gmail.com>> написал(а):
>>>>>>
>>>>>> Kamailio is actually starting, please take a look at that debug=4 log file: https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt <https://filebin.net/r54y3jkmzdyk9zak/syslog_http_client_query_failed.txt>
>>>>>> at line 1042 http_client module is successfully loading, but at line 12785 it fails to load http_client_query
>>>>>>
>>>>>> Also please check line 50385 in https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt <https://filebin.net/352vff41fwx7uowg/syslog_http_query_curl_6.txt>
>>>>>> I'm using http_query here with 5.0.4 http_client, you can see that http_client makes a request, but afterwards it returns curl error 6, but the weirdest thing is - at line 19887 I request token from the very same IP address, only url is changed, and it actually works fine.
>>>>>> ________________________________
>>>>>> Alexandru Covalschi
>>>>>> VoIP Engineer and System Administrator
>>>>>> tel: +373 673 98 493
>>>>>>
>>>>>>> 21 нояб. 2017 г., в 10:44, Daniel-Constantin Mierla <miconda(a)gmail.com <mailto:miconda@gmail.com>> написал(а):
>>>>>>>
>>>>>>> But then kamailio is not starting, or?
>>>>>>>
>>>>>>> Can you provide all the error message as they are printed in syslog file? File, line and other details are part of the logs message, allowing to identify the location in the source code where that happens ...
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Daniel
>>>>>>>
>>>>>>> On 21.11.17 09:38, Alexandru Covalschi wrote:
>>>>>>>> It is still one of the issues
>>>>>>>>
>>>>>>>> ________________________________
>>>>>>>> Alexandru Covalschi
>>>>>>>> VoIP Engineer and System Administrator
>>>>>>>> tel: +373 673 98 493
>>>>>>>>
>>>>>>>>> 21 нояб. 2017 г., в 9:40, Daniel-Constantin Mierla <miconda(a)gmail.com <mailto:miconda@gmail.com>> написал(а):
>>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> in your email in this thread, you said:
>>>>>>>>>
>>>>>>>>> > When I try to change http_query to http_client_query it fails to load with error "failed to find command http_client_query".
>>>>>>>>>
>>>>>>>>> Is it still the case, or that was sorted out?
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Daniel
>>>>>>>>>
>>>>>>>>> On 20.11.17 22:43, Alexandru Covalschi wrote:
>>>>>>>>>> Works ok on 4.4.6. So I suppose it's a weird 5.0.4 + my environment bug. I'm rolling back to 4.4.6 right now, will keep one 5.0.4 machine for testing (on debian 9)
>>>>>>>>>> Let me know if I can provide any dumps/cores etc.
>>>>>>>>>>
>>>>>>>>>> ________________________________
>>>>>>>>>> Alexandru Covalschi
>>>>>>>>>> VoIP Engineer and System Administrator
>>>>>>>>>> tel: +373 673 98 493
>>>>>>>>>>
>>>>>>>>>>> 20 нояб. 2017 г., в 23:29, Alexandru Covalschi <568691(a)gmail.com <mailto:568691@gmail.com>> написал(а):
>>>>>>>>>>>
>>>>>>>>>>> So the weirdest thing is Kamailio actually sends the request, but it returns curl error 6 in the answer variable. I have a plenty of clonned servers and same behaviour is on all of them, also just now tried on a fresh debian 9 - same result. I'm inside a virtual machine (vmware), but not sure it matters...
>>>>>>>>>>>
>>>>>>>>>>> ________________________________
>>>>>>>>>>> Alexandru Covalschi
>>>>>>>>>>> VoIP Engineer and System Administrator
>>>>>>>>>>> tel: +373 673 98 493
>>>>>>>>>>>
>>>>>>>>>>>> 20 нояб. 2017 г., в 22:37, Alexandru Covalschi <568691(a)gmail.com <mailto:568691@gmail.com>> написал(а):
>>>>>>>>>>>>
>>>>>>>>>>>> I often get WARNING: http_client [functions.c:281]: curL_query_url(): Couldn't resolve host, while I don't even use hostnames.
>>>>>>>>>>>> After I changed IP address to hostname (which I've added into /etc/hosts) nothing changed. It seems like a weird bug, but I've no idea - is it CURL or kamailio, but when I execute curl from shell it is working fine. I have google dns in resolve.conf and nslookup is also working ok.
>>>>>>>>>>>> Can anyone help me with that?
>>>>>>>>>>>>
>>>>>>>>>>>> ________________________________
>>>>>>>>>>>> Alexandru Covalschi
>>>>>>>>>>>> VoIP Engineer and System Administrator
>>>>>>>>>>>> tel: +373 673 98 493
>>>>>>>>>>>>
>>>>>>>>>>>>> 20 нояб. 2017 г., в 22:06, Alexandru Covalschi <568691(a)gmail.com <mailto:568691@gmail.com>> написал(а):
>>>>>>>>>>>>>
>>>>>>>>>>>>> t
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Kamailio (SER) - Users Mailing List
>>>>>>>>>> sr-users(a)lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>>>>>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Daniel-Constantin Mierla
>>>>>>>>> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>>>>>>>>> Kamailio Advanced Training - www.asipto.com <http://www.asipto.com/>
>>>>>>>>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com <http://www.kamailioworld.com/>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel-Constantin Mierla
>>>>>>> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>>>>>>> Kamailio Advanced Training - www.asipto.com <http://www.asipto.com/>
>>>>>>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com <http://www.kamailioworld.com/>
>>>>>
>>>>
>>>> --
>>>> Daniel-Constantin Mierla
>>>> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>>>> Kamailio Advanced Training - www.asipto.com <http://www.asipto.com/>
>>>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com <http://www.kamailioworld.com/>
>>
>> --
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>> Kamailio Advanced Training - www.asipto.com <http://www.asipto.com/>
>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com <http://www.kamailioworld.com/>