Re: [SR-Users] kamctl rm alice

2017-12-12 Thread Daniel-Constantin Mierla
Hello,

what version of kamailio do you use?

Cheers,
Daniel


On 13.12.17 08:21, Fatih Yıldız wrote:
> Hello all,
>
> I'm new here and trying to test kamailio. After creating users, I
> noticed that I made a mistake and create new users. Then I wanted to
> delete old users but no luck. When I try to delete, it was giving me 2
> different errors. I found a way to fix one or skip one, I don't know.
> It was about CTLENGINE parameter and I uncommented it. :) But second
> error says that
>
> "ERROR: This command requires a database engine - none was loaded"
>
> I checked the config files if there is something written like database
> engine. I found DBENGINE parameter in kamctl file and it was set to
> MYSQL. Below are the used parameters in kamctl. Could you please check
> if I'm missing something here? I plan to make some test calls in my
> local test environment and I installed kamailio 5.0.4 on ubuntu by
> using Docker. Any help would be appreciated, thanks in advance.
>
> SIP_DOMAIN=192.168.99.100
> DBENGINE=MYSQL
> DBHOST=localhost
> DBNAME=kamailio
> DBRWUSER="root"
> DBRPW="password"
> DBROUSER="root"
> DBROPW="password"
> ALIASES_TYPE="db"
> CTLENGINE="FIFO"
> OSER_INFO="FIFO"
> VERBOSE=1
> PID_FILE="somewhere"
>
> **
>
> ***
> *
>
> *Fatih Yıldız_
> _**Delivery Engineer,*
>
> *Phone *:+90 212 285 7575 (ext 117)
> *Skype*  :fatihyldz1
> *Team*   : d...@defne.com.tr 
> *HelpDesk*:+90 555 996 96 12
>
>
>  
>
> This communication is confidential. We only send and receive email on
> the basis of the terms set out at defne email disclaimer
> 
>
> Think before you speak. Read before you think. Think before you print.
> **
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@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

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] kamctl rm alice

2017-12-12 Thread Fatih Yıldız
Hello all,

I'm new here and trying to test kamailio. After creating users, I noticed
that I made a mistake and create new users. Then I wanted to delete old
users but no luck. When I try to delete, it was giving me 2 different
errors. I found a way to fix one or skip one, I don't know. It was about
CTLENGINE parameter and I uncommented it. :) But second error says that

"ERROR: This command requires a database engine - none was loaded"

I checked the config files if there is something written like database
engine. I found DBENGINE parameter in kamctl file and it was set to MYSQL.
Below are the used parameters in kamctl. Could you please check if I'm
missing something here? I plan to make some test calls in my local test
environment and I installed kamailio 5.0.4 on ubuntu by using Docker. Any
help would be appreciated, thanks in advance.

SIP_DOMAIN=192.168.99.100
DBENGINE=MYSQL
DBHOST=localhost
DBNAME=kamailio
DBRWUSER="root"
DBRPW="password"
DBROUSER="root"
DBROPW="password"
ALIASES_TYPE="db"
CTLENGINE="FIFO"
OSER_INFO="FIFO"
VERBOSE=1
PID_FILE="somewhere"


*Fatih Yıldız*
*Delivery Engineer,*

*Phone *: +90 212 285 7575 (ext 117)
*Skype*  : fatihyldz1
*Team*   : d...@defne.com.tr
*HelpDesk*: +90 555 996 96 12




This communication is confidential. We only send and receive email on the
basis of the terms set out at defne email disclaimer


Think before you speak. Read before you think. Think before you print.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Exec - call python script with arguments

2017-12-12 Thread Daniel W. Graham
This ended up being a log file permissions issue. However this worked with root 
permission only - exec_msg("echo ‘TEST’ > /usr/local/etc/kamailio/test.txt");
This syntax was correct - exec_msg("/usr/local/etc/kamailio/script.py ‘arg1’ 
‘arg2’ ‘arg3’");
Thanks for the input.
-dan

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of 
otron2...@gmail.com
Sent: Monday, December 11, 2017 10:08 AM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Exec - call python script with arguments

Probably not the problem though it could be. ...try:

"python /usr/local/etc/kamailio/script.py arg1 arg2 arg3"

instead--kamailio doesn't have your shell env and might not pass the script to 
python even if the script has the #! declaration.

Also, if you pasted the exact command I think there's no space between .py and 
arg1 (or that could just be my phone).

Hth.


Sent from Samsung Mobile



 Original message 
From: "Daniel W. Graham" mailto:d...@cmsinter.net>>
Date: 12/10/2017 1:04 PM (GMT-06:00)
To: "Kamailio (SER) - Users Mailing List" 
mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] Exec - call python script with arguments

Trying to call a python script using exec_msg and haven’t had any luck.

The following works:
exec_msg("echo ‘TEST’ > /usr/local/etc/kamailio/test.txt");

The following works from shell:
/usr/local/etc/kamailio/script.py arg1 arg2 arg3

The following does not work from kamailio:
exec_msg("/usr/local/etc/kamailio/script.py arg1 arg2 arg3");

(The arguments are just strings for test purposes)

Kamailio is running as kamailio user


Permissions:
755 script.py

Any idea what could be going wrong?

-dan

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Unable to enable TLS on Kamailio

2017-12-12 Thread Tomi Hakkarainen
Hello,

I finally got Kamailio to start with TLS.
I tried with multiple openssl versions last with 
openssl version
OpenSSL 1.1.0g  2 Nov 2017

also updated Kamailio to 5.0.4 from Suse repo's
and had no luck with those two.

I decided to compile Kamailio 5.1 and with little fling with database I think I 
overcame the TLS starting trouble… 
Now it cranshes as it cannot connect to Asterisk DB -> will jack with that 
tomorrow.

Thank you for your guidance as with it I focused on the openssl and finally 
have I hope working setup...

Regards,
 Tomi

> On 12 Dec 2017, at 10.26, Daniel-Constantin Mierla  wrote:
> 
> 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 
> github.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/cfg.y:1642]: yyparse(): loading modules under 
>> /usr/lib64/kamailio/modules/
>> loading modules under config path: /usr/lib64/kamailio/modules/
>>  0(11336) DEBUG:  [core/cfg.y:1623]: yyparse(): loading module tls.so
>>  0(11336) DEBUG:  [core/sr_module.c:575]: load_module(): trying to 
>> load 
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:189]: qm_malloc_init(): 
>> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:191]: qm_malloc_init(): 
>> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:193]: qm_malloc_init(): 
>> qm_malloc_init(0x7f6e001cb000, 67108864), start=0x7f6e001cb000
>>  0(11336) DEBUG:  [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/sr_module.c:607]: load_module(): 
>> /usr/lib64/kamailio/modules/tls.so: mod_register failed
>>  0(11336) CRITICAL:  [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@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 
> 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] newbie question - routing sip-calls

2017-12-12 Thread Daniel-Constantin Mierla
Hello,

alias_db module might help you in this case. If you look at default
config file, this module can be enabled with:

#!define WITH_ALIASDB

You need to set 21 as alias for wbdemo.

Cheers,
Daniel


On 12.12.17 13:57, thomas peterseil wrote:
> 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
> wbd...@zipdx.com
>
> thank you so much for your help!
> best regards,
> thomas peterseil
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@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


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Unable to enable TLS on Kamailio

2017-12-12 Thread Daniel-Constantin Mierla
Can you actually explain better what is the relation between your
message and the issue discussed on this email thread? Maybe I didn't get
it right, but the bug that didn't allow setting a memory manager has
nothing to do with how good or bad a memory manager implementation is
from security and safety points of view. Your suggestion to use jemalloc
or whatever else memory manager is not possible in that version of
libssl, because that version simply doesn't allow setting a memory manager.

The bug was fixed in libssl, but some distros distributed the broken
version, that's the reason it is required to use an older or newer
version than the affected ones.

Cheers,
Daniel

On 12.12.17 18:01, otron2...@gmail.com wrote:
>
> 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 
> Date: 12/12/2017 2:26 AM (GMT-06:00)
> To: "Kamailio (SER) - Users Mailing List"
> ,Tomi Hakkarainen 
> 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/cfg.y:1642]: yyparse(): loading modules
>> under /usr/lib64/kamailio/modules/
>> loading modules under config path: /usr/lib64/kamailio/modules/
>>  0(11336) DEBUG:  [core/cfg.y:1623]: yyparse(): loading module
>> tls.so
>>  0(11336) DEBUG:  [core/sr_module.c:575]: load_module(): trying
>> to load 
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:189]: qm_malloc_init():
>> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:191]: qm_malloc_init():
>> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:193]: qm_malloc_init():
>> qm_malloc_init(0x7f6e001cb000, 67108864), start=0x7f6e001cb000
>>  0(11336) DEBUG:  [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/sr_module.c:607]: load_module():
>> /usr/lib64/kamailio/modules/tls.so: mod_register failed
>>  0(11336) CRITICAL:  [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
>>
>>
>>
>

Re: [SR-Users] Unable to enable TLS on Kamailio

2017-12-12 Thread otron2...@gmail.com

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  
Date: 12/12/2017  2:26 AM  (GMT-06:00) 
To: "Kamailio (SER) - Users Mailing List" ,Tomi 
Hakkarainen  
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/cfg.y:1642]: yyparse(): loading modules   
under /usr/lib64/kamailio/modules/
loading modules under config path: /usr/lib64/kamailio/modules/
 0(11336) DEBUG:  [core/cfg.y:1623]: yyparse(): loading module tls.so
 0(11336) DEBUG:  [core/sr_module.c:575]: load_module(): trying to load 

 0(11336) DEBUG:  [core/mem/q_malloc.c:189]: qm_malloc_init(): 
qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
 0(11336) DEBUG:  [core/mem/q_malloc.c:191]: qm_malloc_init(): 
qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
 0(11336) DEBUG:  [core/mem/q_malloc.c:193]: qm_malloc_init(): 
qm_malloc_init(0x7f6e001cb000, 67108864), start=0x7f6e001cb000
 0(11336) DEBUG:  [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/sr_module.c:607]: load_module():   
/usr/lib64/kamailio/modules/tls.so: mod_register failed
 0(11336) CRITICAL:  [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@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___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Flow Diagram for WebRTC Client1 => WebRTC Client2 (via Kamailio and Asterisk)

2017-12-12 Thread Wilkins, Steve
Hello All,

I am looking for a Diagram or such that shows the flow of SIP traffic for a 
WebRTC Client1 => WebRTC Client2 call  using Kamailio in front of Asterisk.

I am unable to get Asterisk to find the correct registered clients, which are 
registered in Kamailio and am hoping verifying the flow will help give me a 
clue as to what is going on.  E.g. Using chrome and tryit-pjsip I have Client1, 
and Client2 registered in Kamailio. However when I try to connect Client1 to 
Client2 (make a call), Asterisk has no clue where Client1 and Cleint2 are 
registered to.

Thank you!
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dispatcher flow regarding weight and priority.

2017-12-12 Thread Joel Serrano
Yeah I thought it might be like that!

Thanks for clarifying this ;)

Cheers,
Joel.

On Mon, Dec 11, 2017 at 06:39 Dmitri Savolainen 
wrote:

> Hi, Joel!
>
> You may  call ds_select_dst for two sets:
> set 1 with 1.1.1.1  ds_select_dst("1", "4")
> set 2  with 2.2.2.2 and 3.3.3.3. If set1 is down (ds_select_dst("1",
> "4")==false)  then try ds_select_dst("2", "9")
>
>
>
>
> 2017-12-07 20:47 GMT+03:00 Joel Serrano :
>
>> 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.
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Savolainen Dmitri
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] newbie question - routing sip-calls

2017-12-12 Thread thomas peterseil
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
wbd...@zipdx.com

thank you so much for your help!
best regards,
thomas peterseil

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Unable to enable TLS on Kamailio

2017-12-12 Thread Tomi Hakkarainen
Hi,

Thank you for the reply.
I have read  issue #770 thats the reason I compiled newer openssl on that 
machine 1.0.2j-fips -> 1.0.2n
but I think do not understand this problem properly.


Tomi

> On 12 Dec 2017, at 10.26, Daniel-Constantin Mierla  wrote:
> 
> 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/cfg.y:1642]: yyparse(): loading modules under 
>> /usr/lib64/kamailio/modules/
>> loading modules under config path: /usr/lib64/kamailio/modules/
>>  0(11336) DEBUG:  [core/cfg.y:1623]: yyparse(): loading module tls.so
>>  0(11336) DEBUG:  [core/sr_module.c:575]: load_module(): trying to 
>> load 
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:189]: qm_malloc_init(): 
>> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:191]: qm_malloc_init(): 
>> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>>  0(11336) DEBUG:  [core/mem/q_malloc.c:193]: qm_malloc_init(): 
>> qm_malloc_init(0x7f6e001cb000, 67108864), start=0x7f6e001cb000
>>  0(11336) DEBUG:  [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/sr_module.c:607]: load_module(): 
>> /usr/lib64/kamailio/modules/tls.so: mod_register failed
>>  0(11336) CRITICAL:  [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@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 
> 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] pua.publish using RPC

2017-12-12 Thread Daniel-Constantin Mierla
It seems that ctl module doesn't implement async (delayed response)
support for rpc commands. You have to try with xmlrpc or jsonrpc via
http/https.

Cheers,
Daniel


On 11.12.17 14:59, Володимир Іванець wrote:
> I was trying to execute *kamcmd pua.publish* followed by space
> separated parameter values.
>
> Thank you!
>
> 2017-12-11 15:28 GMT+02:00 Daniel-Constantin Mierla  >:
>
> Hello,
>
> how do you execute the command?
>
> IIRC, the async mode is available via xmlrpc module (over
> http/https), not sure if the other rpc transports were enhanced
> for it.
>
> Cheers,
> Daniel
>
>
> On 11.12.17 12:54, Володимир Іванець wrote:
>> Hello!
>>
>> I'm using Kamailio version 5.0.4. I was trying to use pua.publish
>> command from pua_rpc module but constantly getting "error: 600 -
>> Reply wait/async mode not supported by this rpc transport" reply.
>> Can someone please tell what is the correct syntax for
>> pua.publish command?
>>
>> Thanks a lot!
>>
>> 2017-02-09 10:33 GMT+02:00 Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>>:
>>
>> Hello,
>>
>> there is a new pua_rpc module that should have the rpc command.
>>
>> But do you want to wait for the reply of the publish? Or just
>> send and
>> forget?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 08/02/2017 08:46, Alex Balashov wrote:
>> > 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
>> >
>>
>> --
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda  --
>> www.linkedin.com/in/miconda 
>> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22
>> (USA) - www.asipto.com 
>> Kamailio World Conference - May 8-10, 2017 -
>> www.kamailioworld.com 
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
>> mailing list
>> sr-us...@lists.sip-router.org
>> 
>> http://lists.sip-router.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 
> 
>
>

-- 
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

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] blf with kamailio not sending NOTIFY

2017-12-12 Thread Daniel-Constantin Mierla
Hello,

check to see if you have active_watchers records and be sure calls are
initiated after subscription.

To troubleshoot more, start kamailio with debug=3 inside kamailio.cfg
and look at debug messages printed in syslog. You should get better idea
about what happens there.

Cheers,
Daniel


On 11.12.17 17:27, Ravi Kuru wrote:
> Hi,
>
> I set up BLF but not working, phone sending SUBSCRIBE message then
> kamailio is sending 202 OK but not sending NOTIFY message.
> What could be the issue.
>
> Last login: Mon Dec 11 10:56:53 on ttys000
>
> raveechdransmbp:~ rkuru$ ssh -p44422 kuru.ravi@67.227.65.10
> 
>
> kuru.ravi@67.227.65.10 's password: 
>
> Last login: Sun Dec 10 10:25:45 2017 from 216.123.66.49
>
> [kuru.ravi@rpx1 ~]$ su -
>
> Password: 
>
> Last login: Sun Dec 10 10:25:53 EST 2017 on pts/0
>
> [root@rpx1 ~]# cd /usr/local/etc/kamailio/
>
> [root@rpx1 kamailio]# vi kamailio.cfg
>
> [root@rpx1 kamailio]# vi 
>
> [root@rpx1 kamailio]# cd
>
> [root@rpx1 ~]# vi a
>
>
>
>
>

-- 
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

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio does not add port number to addresses in Via, Record-Route headers

2017-12-12 Thread Daniel-Constantin Mierla
OK -- good it was sorted out.

Cheers,
Daniel


On 12.12.17 02:22, George Diamantopoulos wrote:
> 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
> mailto:mico...@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@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: .
> Record-Route: .
> 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@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=aa    <- port 5066 is not
>> added
>> Topmost RR in request relayed by kamailio is:
>>     <- 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 List
>> sr-users@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 
> 
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/c

Re: [SR-Users] Unable to enable TLS on Kamailio

2017-12-12 Thread Daniel-Constantin Mierla
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/cfg.y:1642]: yyparse(): loading modules
> under /usr/lib64/kamailio/modules/
> loading modules under config path: /usr/lib64/kamailio/modules/
>  0(11336) DEBUG:  [core/cfg.y:1623]: yyparse(): loading module
> tls.so
>  0(11336) DEBUG:  [core/sr_module.c:575]: load_module(): trying
> to load 
>  0(11336) DEBUG:  [core/mem/q_malloc.c:189]: qm_malloc_init():
> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>  0(11336) DEBUG:  [core/mem/q_malloc.c:191]: qm_malloc_init():
> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>  0(11336) DEBUG:  [core/mem/q_malloc.c:193]: qm_malloc_init():
> qm_malloc_init(0x7f6e001cb000, 67108864), start=0x7f6e001cb000
>  0(11336) DEBUG:  [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/sr_module.c:607]: load_module():
> /usr/lib64/kamailio/modules/tls.so: mod_register failed
>  0(11336) CRITICAL:  [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@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

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users