Re: [SR-Users] kamcmd htable.reload propertiesHash problem

2018-08-02 Thread Ginhoux, Patrick
Hi Henning,

 

Instead of installing a new server, I tried to upgrade the one running the
5.0.1 level. It has the following packages installed: 

 

kamailio-perl-5.0.1-1.1.x86_64

kamailio-5.0.1-1.1.x86_64

kamailio-mysql-5.0.1-1.1.x86_64

kamailio-snmpstats-5.0.1-1.1.x86_64

 

So I have download the 5.0.7 packages into a separate folder:
kamailio-rpms_5.0.7

 

kamailio-5.0.7-1.el7.x86_64.rpm 

kamailio-mysql-5.0.7-1.el7.x86_64.rpm

kamailio-perl-5.0.7-1.el7.x86_64.rpm

kamailio-snmpstats-5.0.7-1.el7.x86_64.rpm

kamailio-ims-5.0.7-1.el7.x86_64.rpm

 

The update command “rpm -Uvh --force kamailio*” detects a dependency on the
mod_perl package :

 

warning: kamailio-5.0.7-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key
ID 941fdbdd: NOKEY

error: Failed dependencies:

mod_perl is needed by kamailio-perl-5.0.7-1.el7.x86_64

 

I try to find this mod_perl package but it does no longer exist for RedHat
7. We can find multiple articles referencing this change in RHEL.

It seems there is an alternative way to get this module in a EPEL repository
(https://huntingbears.nl/2013/12/17/no-mod_perl-in-rhel-7-and-centos-7/).

 

It is to me a huge work to simply update my current Kamailio to 5.0.7.

 

Does this mod_perl change makes sense to you ? 

Have you an idea to get rid of this dependency?

 

Thank in advance for your suggestion .

 

Cordialement.

Patrick GINHOUX 

Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 | patrick.ginh...@unisys.com

 

-Message d'origine-
De : Ginhoux, Patrick 
Envoyé : jeudi 2 août 2018 09:33
À : 'Henning Westerholt' 
Cc : sr-users@lists.kamailio.org
Objet : RE: [SR-Users] kamcmd htable.reload propertiesHash problem

 

Hi Henning,

 

Thanks for your review.

 

As you said, that's strange behavior.

 

So I'm going to upgrade to 5.0.7, the time to set up a server. I'll keep you

posted asap.

 

Cordialement.

Patrick GINHOUX 

Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 |
 patrick.ginh...@unisys.com

 

-Message d'origine-

De : Henning Westerholt <  h...@kamailio.org> 

Envoyé : jeudi 2 août 2018 09:02

À :   sr-users@lists.kamailio.org

Cc : Ginhoux, Patrick < 
patrick.ginh...@fr.unisys.com>

Objet : Re: [SR-Users] kamcmd htable.reload propertiesHash problem

 

Am Dienstag, 24. Juli 2018, 10:20:01 CEST schrieb Ginhoux, Patrick:

> 

> I run Kamailio 5.0.1 with MariaDB database.

> 

> There is no issue at the initialization, meaning the db is opened by

> kamailio and the hash tables loaded from the db tables.

 

Hello Patrick,

 

this is strange. Normally if it can initialize correctly during startup,

then 

it also should be able to use the database later on. 

 

I did a quick check of the htable module in the repository. There have been

a 

few fixes related to rpc commands and also a bit related to the database in 

the last year. But I did not saw from the git logs anything like you 

described.

 

Nevertheless, you should try to setup the latest 5.0 release (5.0.7) - maybe

 

on a test system and see if the error is also happening there. There should

be 

no changes in database or configuration comparing to 5.0.1.

 

Best regards,

 

Henning

 

> Example:

> 

> # kamcmd htable.dump propertiesHash

> [..]

> 

> But the htable.reload command fails:

> 

> error: 500 - Failed to open htable db connection

> 

> 

> 

> The Kamailio log reports that it can't connect the db :

> 

> DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG:

> io_watch_add(0x7f68c74ab300, 10, 3, 0xdc9410), fd_no=1

> 

> DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read:

> new connection (1) on /var/run/kamailio//kamailio_ctl

> 

> DEBUG:  [core/sr_module.c:694]: find_mod_export_record():

> find_export_record: found  in module db_mysql

> [/usr/lib64/kamailio/modules/db_mysql.so]

> 

> DEBUG:  [db.c:209]: db_bind_mod(): using db bind api for db_mysql

> 

> DEBUG:  [db.c:314]: db_do_init2(): connection 0x7f68cc354c10 not

found

> in pool

> 

> DEBUG: db_mysql [km_my_con.c:98]: db_mysql_new_connection(): opening

> connection: mysql://:@/siprouter

> 

> ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver

error:

> Can't connect to local MySQL server through socket

> '/var/lib/mysql/mysql.sock' (2 "No such file or directory")

> 

> ERROR:  [db.c:318]: db_do_init2(): could not add connection to the

> pool

> 

> ERROR: htable [ht_db.c:92]: ht_db_open_con(): failed to connect to the

> database

> 

> 

> 

> My local db is located at /myqdata/mysiprdb/data where is the

mysiprdb.sock

> file. But the log shows that Kamailio is looking for

> /var/lib/mysql/mysql.sock.

> 

> 

> 

> Does this error make sense to you ?

> 

> Is it possible to fix this problem by configuration in Kamailio ?

> 

> 

> 

> My kamailio.cfg script contains :

> 

> 

> 

> 

[SR-Users] get_out_socket(): no socket found

2018-08-02 Thread Ilie Soltanici
Daniel,

Not, those IP are in a different subnet. There is a firewall - running on a
different device. Ping and SIP Messages are going very well from 2.2.2.2 to
8.8.8.8. I was able to solve this issue by disabling mhomed and set
"listen" external interface with IP address 2.2.2.2 on top in the
configuration file. Now, Kamailio is starting without any errors and is
registering to the upstream provider, but I just I am wondering if it's
possible to specify an outgoing socket for uac module in the configuration
file?
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] DMQ problems

2018-08-02 Thread Henning Westerholt
Am Donnerstag, 2. August 2018, 20:33:28 CEST schrieb Paolo Visintin - 
evosip.cloud:
> I am able to see
> 0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding
> DMQ node A host dmq-router-service=sip:42.100.109.113:5062
> 
> but in tcpdump no DNS query
> 
> Also doing a loop of  "kamcmd dns.lookup A dmq-router-service.paolo.svc.c
> luster.local" and starting kamailio at the same time the result is always
> the correct ip, no 42.100.109.113 coming up so this is very strange!

Hello,

without looking too much into that, I have two remarks which may worth 
investigating:

- for DNS names in the configuration file Kamailio does a lookup during 
startup and "compiles" this to structure which is evaluated during run time

- there is also a DNS caching functionality, which could cause something like 
you observed. You can deactivate this with a core variable, I think.

Best regards,

Henning

 
> 2018-08-02 15:29 GMT+02:00 Charles Chance :
> > Hi Paolo,
> > 
> > kamailio "resolves" A host but does not query the DNS
> > 
> > 
> > What do you mean by this?
> > 
> > I am not overly familiar with Kamailio's DNS internals, but what do you
> > see if you run the following commands?
> > 
> > kamcmd dns.lookup SRV _sip._udp.dmq-router-service.paolo.svc.cluster.local
> > 
> > kamcmd dns.lookup A dmq-router-service.paolo.svc.cluster.local
> > 
> > Cheers,
> > 
> > Charles
> > 
> > 
> > On 2 August 2018 at 13:27, Paolo Visintin - evosip.cloud <
> > 
> > paolo.visintin@evosip.cloud> wrote:
> >> Hello again!
> >> Another interesting thing found running in debug=3
> >> 
> >> 0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding
> >> DMQ node A host dmq-router-service=sip:42.100.109.113:5062
> >> 
> >> so , kamailio "resolves" A host but does not query the DNS
> >> this is dump of dns request inside kamailio container:
> >> 
> >> 147   0.597474  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0xf31d
> >> SRV dmq-router-service.paolo.svc.cluster.local
> >> 151   0.598306   10.96.0.10 → 10.42.1.251  DNS 155 Standard query
> >> response 0xf31d SRV dmq-router-service.paolo.svc.cluster.local SRV 10
> >> 100 0 3934376365383035.dmq-router-service.paolo.svc.cluster.local A
> >> 172.28.0.240
> >> 156   0.598538  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0x1904
> >> A dmq-router-service.paolo.svc.cluster.local
> >> 163   0.599275   10.96.0.10 → 10.42.1.251  DNS 118 Standard query
> >> response 0x1904 A dmq-router-service.paolo.svc.cluster.local A
> >> 172.28.0.240
> >> 
> >> 
> >> 
> >> *Paolo Visintin*
> >> *CTO*
> >> evosip.cloud
> >> [image: Risultati immagini per evosip]
> >> 
> >> 2018-08-02 0:24 GMT+02:00 Paolo Visintin - evosip.cloud <
> >> 
> >> paolo.visintin@evosip.cloud>:
> >>> Hello Charles,
> >>> sorry for late reply, we've had some issues rebuilding docker images
> >>> with kamailo nightly build!
> >>> 
> >>> We are running on our local, private on premise kubernetes cluster so
> >>> connections from outside is simply impossible (in dev we are using a
> >>> "closed" network system)
> >>> 
> >>> I've just tried to :
> >>> - open a tcpdump trace in the instance tracing only the DMQ port defined
> >>> [5062] - (tcpdump -i eth0 port 5062)
> >>> - packet coming from nowhere
> >>> - started kamailio ($kamailio -f $PATH_KAMAILIO_CFG -m 512 -DD -E -e)
> >>> - seeing this in tcpdump :
> >>> 
> >>> root@router-0:/# tcpdump -i eth0 port 5062
> >>> tcpdump: verbose output suppressed, use -v or -vv for full protocol
> >>> decode
> >>> listening on eth0, link-type EN10MB (Ethernet), capture size 262144
> >>> bytes
> >>> 22:06:44.966991 IP router-0.router.paolo.svc.cluster.local.5062 >
> >>> 42.100.109.113.5062: UDP, length 497
> >>> 22:06:45.572084 IP router-0.router.paolo.svc.cluster.local.5062 >
> >>> 42.100.109.113.5062: UDP, length 497
> >>> 22:06:46.571875 IP router-0.router.paolo.svc.cluster.local.5062 >
> >>> 42.100.109.113.5062: UDP, length 497
> >>> 
> >>> so seems that kamailio is trying to contact the foreign ip
> >>> 
> >>> if i check inside the configuration:
> >>> modparam("dmq", "server_address", DMQ_SERVER_ADDRESS)
> >>> modparam("dmq", "notification_address", DMQ_NOTIFICATION_ADDRESS)
> >>> modparam("dmq", "multi_notify", 1)
> >>> modparam("dmq", "num_workers", 4)
> >>> modparam("dmq", "ping_interval", 15)
> >>> 
> >>> 
> >>> ...
> >>> 
> >>>   if(is_method("KDMQ") && dst_port == DMQ_PORT){
> >>>   
> >>> dmq_handle_message();
> >>> exit;
> >>>   
> >>>   }
> >>> 
> >>> and in DMQ_NOTIFICATION_ADDRESS I have :
> >>> #!define DMQ_NOTIFICATION_ADDRESS "sip:dmq-router-service:5062"
> >>> 
> >>> dmq-router-service DNS resolves:
> >>> > dmq-router-service.paolo.svc.cluster.local
> >>> 
> >>> Server: 10.96.0.10
> >>> Address: 10.96.0.10#53
> >>> 
> >>> Non-authoritative answer:
> >>> Name: dmq-router-service.paolo.svc.cluster.local
> >>> Address: 172.28.0.240
> >>> 
> >>> 
> >>> so -nowhere- i am able to find 42.100.109.113
> >>> 
> >>> 
> >>> and in kamailio log:
> >>> 

Re: [SR-Users] DMQ problems

2018-08-02 Thread Paolo Visintin - evosip.cloud
Hi Charles,
when I say kamailio "resolves" but does not query DNS I mean that in DEBUG
I am able to see
0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding
DMQ node A host dmq-router-service=sip:42.100.109.113:5062

but in tcpdump no DNS query

Also doing a loop of  "kamcmd dns.lookup A dmq-router-service.paolo.svc.c
luster.local" and starting kamailio at the same time the result is always
the correct ip, no 42.100.109.113 coming up so this is very strange!

Cheers

*Paolo Visintin*
*CTO*
evosip.cloud
[image: Risultati immagini per evosip]

2018-08-02 15:29 GMT+02:00 Charles Chance :

> Hi Paolo,
>
> kamailio "resolves" A host but does not query the DNS
>
>
> What do you mean by this?
>
> I am not overly familiar with Kamailio's DNS internals, but what do you
> see if you run the following commands?
>
> kamcmd dns.lookup SRV _sip._udp.dmq-router-service.paolo.svc.cluster.local
>
> kamcmd dns.lookup A dmq-router-service.paolo.svc.cluster.local
>
> Cheers,
>
> Charles
>
>
> On 2 August 2018 at 13:27, Paolo Visintin - evosip.cloud <
> paolo.visintin@evosip.cloud> wrote:
>
>> Hello again!
>> Another interesting thing found running in debug=3
>>
>> 0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding
>> DMQ node A host dmq-router-service=sip:42.100.109.113:5062
>>
>> so , kamailio "resolves" A host but does not query the DNS
>> this is dump of dns request inside kamailio container:
>>
>> 147   0.597474  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0xf31d
>> SRV dmq-router-service.paolo.svc.cluster.local
>> 151   0.598306   10.96.0.10 → 10.42.1.251  DNS 155 Standard query
>> response 0xf31d SRV dmq-router-service.paolo.svc.cluster.local SRV 10
>> 100 0 3934376365383035.dmq-router-service.paolo.svc.cluster.local A
>> 172.28.0.240
>> 156   0.598538  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0x1904
>> A dmq-router-service.paolo.svc.cluster.local
>> 163   0.599275   10.96.0.10 → 10.42.1.251  DNS 118 Standard query
>> response 0x1904 A dmq-router-service.paolo.svc.cluster.local A
>> 172.28.0.240
>>
>>
>>
>> *Paolo Visintin*
>> *CTO*
>> evosip.cloud
>> [image: Risultati immagini per evosip]
>>
>> 2018-08-02 0:24 GMT+02:00 Paolo Visintin - evosip.cloud <
>> paolo.visintin@evosip.cloud>:
>>
>>>
>>> Hello Charles,
>>> sorry for late reply, we've had some issues rebuilding docker images
>>> with kamailo nightly build!
>>>
>>> We are running on our local, private on premise kubernetes cluster so
>>> connections from outside is simply impossible (in dev we are using a
>>> "closed" network system)
>>>
>>> I've just tried to :
>>> - open a tcpdump trace in the instance tracing only the DMQ port defined
>>> [5062] - (tcpdump -i eth0 port 5062)
>>> - packet coming from nowhere
>>> - started kamailio ($kamailio -f $PATH_KAMAILIO_CFG -m 512 -DD -E -e)
>>> - seeing this in tcpdump :
>>>
>>> root@router-0:/# tcpdump -i eth0 port 5062
>>> tcpdump: verbose output suppressed, use -v or -vv for full protocol
>>> decode
>>> listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
>>> 22:06:44.966991 IP router-0.router.paolo.svc.cluster.local.5062 >
>>> 42.100.109.113.5062: UDP, length 497
>>> 22:06:45.572084 IP router-0.router.paolo.svc.cluster.local.5062 >
>>> 42.100.109.113.5062: UDP, length 497
>>> 22:06:46.571875 IP router-0.router.paolo.svc.cluster.local.5062 >
>>> 42.100.109.113.5062: UDP, length 497
>>>
>>> so seems that kamailio is trying to contact the foreign ip
>>>
>>> if i check inside the configuration:
>>> modparam("dmq", "server_address", DMQ_SERVER_ADDRESS)
>>> modparam("dmq", "notification_address", DMQ_NOTIFICATION_ADDRESS)
>>> modparam("dmq", "multi_notify", 1)
>>> modparam("dmq", "num_workers", 4)
>>> modparam("dmq", "ping_interval", 15)
>>>
>>>
>>> ...
>>>
>>>   if(is_method("KDMQ") && dst_port == DMQ_PORT){
>>> dmq_handle_message();
>>> exit;
>>>   }
>>>
>>>
>>> and in DMQ_NOTIFICATION_ADDRESS I have :
>>> #!define DMQ_NOTIFICATION_ADDRESS "sip:dmq-router-service:5062"
>>>
>>> dmq-router-service DNS resolves:
>>> > dmq-router-service.paolo.svc.cluster.local
>>> Server: 10.96.0.10
>>> Address: 10.96.0.10#53
>>>
>>> Non-authoritative answer:
>>> Name: dmq-router-service.paolo.svc.cluster.local
>>> Address: 172.28.0.240
>>>
>>>
>>> so -nowhere- i am able to find 42.100.109.113
>>>
>>>
>>> and in kamailio log:
>>> 13(821) ERROR: dmq [notification_peer.c:599]:
>>> notification_resp_callback_f(): deleting server sip:42.100.109.113:5062
>>> because of failed request
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Paolo
>>>
>>> 2018-07-26 18:14 GMT+02:00 Charles Chance >> >:
>>>
 Hi Aleksandar,

 The initial depopulation of the nodes (following a period of 'pending'
 state) is due to no response being received from them. Are you able to
 trace the messages to/from one of them to confirm what is happening there?

 As for the unrecognised IP, I'm afraid I can't answer that one. It must
 be coming from somewhere - it's just a case 

Re: [SR-Users] 5.1 compilation error on Centos 7

2018-08-02 Thread Henning Westerholt
Am Donnerstag, 2. August 2018, 12:55:32 CEST schrieb Wilkins, Steve:
> I started getting the following error while trying to compile Kamailio 5.1+
> on Centos 7
> 
> CC (gcc) [M db_mysql.so]my_fld.o
> In file included from my_fld.c:22:0:
> my_fld.h:37:2: error: unknown type name 'my_bool'
>   my_bool is_null;
> 
> Has anyone seen this before.

Hello,

this looks the same like this issue:

https://github.com/kamailio/kamailio/issues/1602

Do you have the development headers for mysql installed? Maybe there was a 
change in the packaging, e.g. a split or something like this?

Best regards,

Henning
-- 
Henning Westerholt
https://skalatan.de/blog/

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


Re: [SR-Users] DMQ mem leak issues

2018-08-02 Thread Rogelio Perez
Thanks Charles, it's working now.
I'm deploying to production and confirming results soon.

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


Re: [SR-Users] DMQ mem leak issues

2018-08-02 Thread Charles Chance
Hi Rogelio,

No need to test with method/$rm - the is_method() regression is now fixed.

If you pull the latest master you should be able to test Daniel's patch
again.

Cheers,

Charles


On 2 August 2018 at 13:27, Charles Chance 
wrote:

> Hi Paolo,
>
> How strange...it really shouldn’t (and has never done so for us):
> https://www.kamailio.org/wiki/cookbooks/devel/core#method
>
> Either way, $rm is also fine.
>
> Rogelio - to clarify, my aim here is simply to establish if something
> other than is_method() works in your case.
>
> Best,
>
> Charles
>
>
> On Thu, 2 Aug 2018 at 13:07, Paolo Visintin - evosip.cloud
>  wrote:
>
>> Hi Charles,
>> method == "KDMQ" says "syntax error"
>>
>> we solved using if($rm == "KDMQ")
>>
>> Cheers
>>
>>
>>
>> *Paolo Visintin*
>> *CTO*
>> evosip.cloud
>> [image: Risultati immagini per evosip]
>>
>> 2018-08-02 9:43 GMT+02:00 Charles Chance :
>>
>>> Again out of interest, what happens if you change it to:
>>>
>>> if (method == “KDMQ”) {
>>> ...
>>>
>>> Cheers,
>>>
>>> Charles
>>>
>>>
>>> On Thu, 2 Aug 2018 at 04:45, Rogelio Perez  wrote:
>>>
 Charles, here you go:

 ### Routing Logic 

 # Main SIP request routing logic
 # - processing of any incoming SIP request starts with this route
 # - note: this is the same as route { ... }
 request_route {

   # per request initial checks
   route(REQINIT);

   #!ifdef ENABLE_KDMQ
   # Handle Kamailio DQM messages
   if (is_method("KDMQ")) {
 dmq_handle_message();
   }
   #!endif

>>> --
>>> *Charles Chance*
>>> Managing Director
>>>
>>> t. 0330 120 1200m. 07932 063 891
>>>
>>> Sipcentric Ltd. Company registered in England & Wales no. 7365592. 
>>> Registered
>>> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
>>> Birmingham Science Park, Birmingham B7 4BB.
>>>
>>
>>> ___
>>> 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
>>
> --
> *Charles Chance*
> Managing Director
>
> t. 0330 120 1200m. 07932 063 891
>

-- 
Sipcentric Ltd.
Company registered in England & Wales no. 
7365592. Registered
office: Faraday Wharf, Innovation 
Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] is_method not matching message type KDMQ breaking DMQ bus. (master branch)

2018-08-02 Thread Charles Chance
Hi,

This should fix:

https://github.com/kamailio/kamailio/pull/1611

Please confirm either way.

Cheers,

Charles

On Tue, 31 Jul 2018 at 18:25, Charles Chance 
wrote:

> Hello,
>
> I have checked and it is a problem with is_method() not matching "KDMQ"
> (there is no method definition to match when parsing the message first
> line). This is not a DMQ issue specifically, and 'if (method == "KDMQ")'
> works just fine. I'm sure it _used_ to work (in fact, it's documented!) -
> although I may be totally mistaken, since everywhere we use ‘method’.
>
> I will try to see later if something changed anywhere in textops or core,
> but in the meantime I suggest using ‘method’ for now.
>
> Cheers,
>
> Charles
>
>
> On 31 July 2018 at 18:08, Joel Serrano  wrote:
>
>> Hi Asgaroth,
>>
>> I'm using dmq and I haven't seen a msg get passed this:
>>
>> # Handles DMQ messages
>> if (is_method("KDMQ")) {
>> dmq_handle_message();
>> }
>>
>> That said, just to make sure it's not some work-in-progress happening on
>> master branch, give it a try on latest stable release (v5.1.4) to see if
>> you find the same behavior. I haven't tried on master but on v5.1.4 I'm not
>> seeing that behavior.
>>
>> Are you manually replicating stuff using dmq functions or are you taking
>> advantage of auto-replication using modparam enable_dmq=1 on certain
>> modules?
>>
>> Joel.
>>
>>
>>
>>
>> On Tue, Jul 31, 2018 at 9:01 AM, Asgaroth <00asgarot...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I've come across and oddity whereby my is_method("KDMQ") checks are not
>>> matching.
>>>
>>> I'm testing with kamailio master:
>>>
>>> version: kamailio 5.2.0-dev6 (x86_64/linux) a16272
>>> 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_URI_SIZE 1024,
>>> BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>>> id: a16272
>>> compiled on 15:27:21 Jul 31 2018 with gcc 7.3.1
>>>
>>> Sample routing logic:
>>>
>>> request_route {
>>> route("InitialMessageChecks");
>>> exit;
>>> }
>>>
>>>
>>> route[InitialMessageChecks] {
>>> xlog("L_INFO", "Received message type $rm from $si:$sp on $Ri:$Rp");
>>>
>>> if ( is_method("KDMQ") ) { xlog("L_INFO", "KDMQ check passed."); }
>>> if ( is_method("OPTIONS") ) { xlog("L_INFO", "OPTIONS check
>>> passed."); }
>>> if ( is_method("SUBSCRIBE") ) { xlog("L_INFO", "SUBSCRIBE check
>>> passed."); }
>>>
>>> }
>>>
>>> In the logs I am only receiving the 1st log line in the initial message
>>> checks route for message types of KDMQ, eg:
>>>
>>> INFO: 

Re: [SR-Users] DMQ problems

2018-08-02 Thread Charles Chance
Hi Paolo,

kamailio "resolves" A host but does not query the DNS


What do you mean by this?

I am not overly familiar with Kamailio's DNS internals, but what do you see
if you run the following commands?

kamcmd dns.lookup SRV _sip._udp.dmq-router-service.paolo.svc.cluster.local

kamcmd dns.lookup A dmq-router-service.paolo.svc.cluster.local

Cheers,

Charles


On 2 August 2018 at 13:27, Paolo Visintin - evosip.cloud <
paolo.visintin@evosip.cloud> wrote:

> Hello again!
> Another interesting thing found running in debug=3
>
> 0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding
> DMQ node A host dmq-router-service=sip:42.100.109.113:5062
>
> so , kamailio "resolves" A host but does not query the DNS
> this is dump of dns request inside kamailio container:
>
> 147   0.597474  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0xf31d
> SRV dmq-router-service.paolo.svc.cluster.local
> 151   0.598306   10.96.0.10 → 10.42.1.251  DNS 155 Standard query response
> 0xf31d SRV dmq-router-service.paolo.svc.cluster.local SRV 10 100 0
> 3934376365383035.dmq-router-service.paolo.svc.cluster.local A 172.28.0.240
> 156   0.598538  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0x1904 A
> dmq-router-service.paolo.svc.cluster.local
> 163   0.599275   10.96.0.10 → 10.42.1.251  DNS 118 Standard query response
> 0x1904 A dmq-router-service.paolo.svc.cluster.local A 172.28.0.240
>
>
>
> *Paolo Visintin*
> *CTO*
> evosip.cloud
> [image: Risultati immagini per evosip]
>
> 2018-08-02 0:24 GMT+02:00 Paolo Visintin - evosip.cloud <
> paolo.visintin@evosip.cloud>:
>
>>
>> Hello Charles,
>> sorry for late reply, we've had some issues rebuilding docker images with
>> kamailo nightly build!
>>
>> We are running on our local, private on premise kubernetes cluster so
>> connections from outside is simply impossible (in dev we are using a
>> "closed" network system)
>>
>> I've just tried to :
>> - open a tcpdump trace in the instance tracing only the DMQ port defined
>> [5062] - (tcpdump -i eth0 port 5062)
>> - packet coming from nowhere
>> - started kamailio ($kamailio -f $PATH_KAMAILIO_CFG -m 512 -DD -E -e)
>> - seeing this in tcpdump :
>>
>> root@router-0:/# tcpdump -i eth0 port 5062
>> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
>> listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
>> 22:06:44.966991 IP router-0.router.paolo.svc.cluster.local.5062 >
>> 42.100.109.113.5062: UDP, length 497
>> 22:06:45.572084 IP router-0.router.paolo.svc.cluster.local.5062 >
>> 42.100.109.113.5062: UDP, length 497
>> 22:06:46.571875 IP router-0.router.paolo.svc.cluster.local.5062 >
>> 42.100.109.113.5062: UDP, length 497
>>
>> so seems that kamailio is trying to contact the foreign ip
>>
>> if i check inside the configuration:
>> modparam("dmq", "server_address", DMQ_SERVER_ADDRESS)
>> modparam("dmq", "notification_address", DMQ_NOTIFICATION_ADDRESS)
>> modparam("dmq", "multi_notify", 1)
>> modparam("dmq", "num_workers", 4)
>> modparam("dmq", "ping_interval", 15)
>>
>>
>> ...
>>
>>   if(is_method("KDMQ") && dst_port == DMQ_PORT){
>> dmq_handle_message();
>> exit;
>>   }
>>
>>
>> and in DMQ_NOTIFICATION_ADDRESS I have :
>> #!define DMQ_NOTIFICATION_ADDRESS "sip:dmq-router-service:5062"
>>
>> dmq-router-service DNS resolves:
>> > dmq-router-service.paolo.svc.cluster.local
>> Server: 10.96.0.10
>> Address: 10.96.0.10#53
>>
>> Non-authoritative answer:
>> Name: dmq-router-service.paolo.svc.cluster.local
>> Address: 172.28.0.240
>>
>>
>> so -nowhere- i am able to find 42.100.109.113
>>
>>
>> and in kamailio log:
>> 13(821) ERROR: dmq [notification_peer.c:599]:
>> notification_resp_callback_f(): deleting server sip:42.100.109.113:5062
>> because of failed request
>>
>>
>>
>> Cheers,
>>
>> Paolo
>>
>> 2018-07-26 18:14 GMT+02:00 Charles Chance 
>> :
>>
>>> Hi Aleksandar,
>>>
>>> The initial depopulation of the nodes (following a period of 'pending'
>>> state) is due to no response being received from them. Are you able to
>>> trace the messages to/from one of them to confirm what is happening there?
>>>
>>> As for the unrecognised IP, I'm afraid I can't answer that one. It must
>>> be coming from somewhere - it's just a case of finding out where. Following
>>> the initial population/depopulation of the node list, DMQ simply repeats
>>> the process over and over until it eventually connects to one or more other
>>> nodes. Are you running on a public cloud somewhere or is it your own,
>>> locally running Kubernetes cluster?
>>>
>>> Cheers,
>>>
>>> Charles
>>>
>>>
>>> On 26 July 2018 at 15:30, Aleksandar Sosic 
>>> wrote:
>>>
 Hi Charles,

 We're so glad about the improvements you just committed! Thanks!

 Now I'm using the latest nightly: 5.2.0~dev6+0~20180726010431.11
 65+xenial
 Kamailio starts even if the DNS record does not exist at first, that's
 great. I'm having this nodes up and running:
 ```
 proxy-66f79498cc-8ws6d

Re: [SR-Users] Method Destination Variable

2018-08-02 Thread Duarte Rocha
That is perfect. Thanks a lot.

2018-08-01 17:09 GMT+01:00 Duarte Rocha :

> Greetings,
>
> I thought about that but i wasn't sure it would be safe. But, in this
> case, the Request-URI domain will be the only place where Kamailio will
> look to find out the destination right within the dialog right? I'm going
> the statelless way, so that might be the correct answer.
>
> Thanks for your help
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ problems

2018-08-02 Thread Paolo Visintin - evosip.cloud
Hello again!
Another interesting thing found running in debug=3

0(710) DEBUG: dmq [notification_peer.c:240]: get_dmq_host_list(): adding
DMQ node A host dmq-router-service=sip:42.100.109.113:5062

so , kamailio "resolves" A host but does not query the DNS
this is dump of dns request inside kamailio container:

147   0.597474  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0xf31d
SRV dmq-router-service.paolo.svc.cluster.local
151   0.598306   10.96.0.10 → 10.42.1.251  DNS 155 Standard query response
0xf31d SRV dmq-router-service.paolo.svc.cluster.local SRV 10 100 0
3934376365383035.dmq-router-service.paolo.svc.cluster.local A 172.28.0.240
156   0.598538  10.42.1.251 → 10.96.0.10   DNS 102 Standard query 0x1904 A
dmq-router-service.paolo.svc.cluster.local
163   0.599275   10.96.0.10 → 10.42.1.251  DNS 118 Standard query response
0x1904 A dmq-router-service.paolo.svc.cluster.local A 172.28.0.240



*Paolo Visintin*
*CTO*
evosip.cloud
[image: Risultati immagini per evosip]

2018-08-02 0:24 GMT+02:00 Paolo Visintin - evosip.cloud <
paolo.visintin@evosip.cloud>:

>
> Hello Charles,
> sorry for late reply, we've had some issues rebuilding docker images with
> kamailo nightly build!
>
> We are running on our local, private on premise kubernetes cluster so
> connections from outside is simply impossible (in dev we are using a
> "closed" network system)
>
> I've just tried to :
> - open a tcpdump trace in the instance tracing only the DMQ port defined
> [5062] - (tcpdump -i eth0 port 5062)
> - packet coming from nowhere
> - started kamailio ($kamailio -f $PATH_KAMAILIO_CFG -m 512 -DD -E -e)
> - seeing this in tcpdump :
>
> root@router-0:/# tcpdump -i eth0 port 5062
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
> 22:06:44.966991 IP router-0.router.paolo.svc.cluster.local.5062 >
> 42.100.109.113.5062: UDP, length 497
> 22:06:45.572084 IP router-0.router.paolo.svc.cluster.local.5062 >
> 42.100.109.113.5062: UDP, length 497
> 22:06:46.571875 IP router-0.router.paolo.svc.cluster.local.5062 >
> 42.100.109.113.5062: UDP, length 497
>
> so seems that kamailio is trying to contact the foreign ip
>
> if i check inside the configuration:
> modparam("dmq", "server_address", DMQ_SERVER_ADDRESS)
> modparam("dmq", "notification_address", DMQ_NOTIFICATION_ADDRESS)
> modparam("dmq", "multi_notify", 1)
> modparam("dmq", "num_workers", 4)
> modparam("dmq", "ping_interval", 15)
>
>
> ...
>
>   if(is_method("KDMQ") && dst_port == DMQ_PORT){
> dmq_handle_message();
> exit;
>   }
>
>
> and in DMQ_NOTIFICATION_ADDRESS I have :
> #!define DMQ_NOTIFICATION_ADDRESS "sip:dmq-router-service:5062"
>
> dmq-router-service DNS resolves:
> > dmq-router-service.paolo.svc.cluster.local
> Server: 10.96.0.10
> Address: 10.96.0.10#53
>
> Non-authoritative answer:
> Name: dmq-router-service.paolo.svc.cluster.local
> Address: 172.28.0.240
>
>
> so -nowhere- i am able to find 42.100.109.113
>
>
> and in kamailio log:
> 13(821) ERROR: dmq [notification_peer.c:599]:
> notification_resp_callback_f(): deleting server sip:42.100.109.113:5062
> because of failed request
>
>
>
> Cheers,
>
> Paolo
>
> 2018-07-26 18:14 GMT+02:00 Charles Chance :
>
>> Hi Aleksandar,
>>
>> The initial depopulation of the nodes (following a period of 'pending'
>> state) is due to no response being received from them. Are you able to
>> trace the messages to/from one of them to confirm what is happening there?
>>
>> As for the unrecognised IP, I'm afraid I can't answer that one. It must
>> be coming from somewhere - it's just a case of finding out where. Following
>> the initial population/depopulation of the node list, DMQ simply repeats
>> the process over and over until it eventually connects to one or more other
>> nodes. Are you running on a public cloud somewhere or is it your own,
>> locally running Kubernetes cluster?
>>
>> Cheers,
>>
>> Charles
>>
>>
>> On 26 July 2018 at 15:30, Aleksandar Sosic 
>> wrote:
>>
>>> Hi Charles,
>>>
>>> We're so glad about the improvements you just committed! Thanks!
>>>
>>> Now I'm using the latest nightly: 5.2.0~dev6+0~20180726010431.11
>>> 65+xenial
>>> Kamailio starts even if the DNS record does not exist at first, that's
>>> great. I'm having this nodes up and running:
>>> ```
>>> proxy-66f79498cc-8ws6d3/3   Running   0
>>> 4m172.28.1.4
>>> proxy-66f79498cc-b68dd3/3   Running   0
>>> 4m172.28.1.5
>>> proxy-66f79498cc-lhbxg3/3   Running   0
>>> 4m172.28.1.6
>>> proxy-66f79498cc-png6p3/3   Running   0
>>> 4m172.28.1.7
>>> ```
>>>
>>> In those 4-5 minutes I've experienced a population and depopulation of
>>> the dmq nodes.
>>>
>>> For example:
>>> ```
>>> kamcmd> dmq.list_nodes
>>> {
>>> host: 172.28.1.4
>>> port: 5061
>>> resolved_ip: 172.28.1.4
>>> status: pending
>>> last_notification: 0
>>> local: 0
>>> }
>>> {
>>> 

Re: [SR-Users] DMQ mem leak issues

2018-08-02 Thread Charles Chance
Hi Paolo,

How strange...it really shouldn’t (and has never done so for us):
https://www.kamailio.org/wiki/cookbooks/devel/core#method

Either way, $rm is also fine.

Rogelio - to clarify, my aim here is simply to establish if something other
than is_method() works in your case.

Best,

Charles


On Thu, 2 Aug 2018 at 13:07, Paolo Visintin - evosip.cloud
 wrote:

> Hi Charles,
> method == "KDMQ" says "syntax error"
>
> we solved using if($rm == "KDMQ")
>
> Cheers
>
>
>
> *Paolo Visintin*
> *CTO*
> evosip.cloud
> [image: Risultati immagini per evosip]
>
> 2018-08-02 9:43 GMT+02:00 Charles Chance :
>
>> Again out of interest, what happens if you change it to:
>>
>> if (method == “KDMQ”) {
>> ...
>>
>> Cheers,
>>
>> Charles
>>
>>
>> On Thu, 2 Aug 2018 at 04:45, Rogelio Perez  wrote:
>>
>>> Charles, here you go:
>>>
>>> ### Routing Logic 
>>>
>>> # Main SIP request routing logic
>>> # - processing of any incoming SIP request starts with this route
>>> # - note: this is the same as route { ... }
>>> request_route {
>>>
>>>   # per request initial checks
>>>   route(REQINIT);
>>>
>>>   #!ifdef ENABLE_KDMQ
>>>   # Handle Kamailio DQM messages
>>>   if (is_method("KDMQ")) {
>>> dmq_handle_message();
>>>   }
>>>   #!endif
>>>
>> --
>> *Charles Chance*
>> Managing Director
>>
>> t. 0330 120 1200m. 07932 063 891
>>
>> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
>> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
>> Birmingham Science Park, Birmingham B7 4BB.
>>
>
>> ___
>> 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
>
-- 
*Charles Chance*
Managing Director

t. 0330 120 1200m. 07932 063 891

-- 
Sipcentric Ltd.
Company registered in England & Wales no. 
7365592. Registered
office: Faraday Wharf, Innovation 
Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ mem leak issues

2018-08-02 Thread Paolo Visintin - evosip.cloud
Hi Charles,
method == "KDMQ" says "syntax error"

we solved using if($rm == "KDMQ")

Cheers



*Paolo Visintin*
*CTO*
evosip.cloud
[image: Risultati immagini per evosip]

2018-08-02 9:43 GMT+02:00 Charles Chance :

> Again out of interest, what happens if you change it to:
>
> if (method == “KDMQ”) {
> ...
>
> Cheers,
>
> Charles
>
>
> On Thu, 2 Aug 2018 at 04:45, Rogelio Perez  wrote:
>
>> Charles, here you go:
>>
>> ### Routing Logic 
>>
>> # Main SIP request routing logic
>> # - processing of any incoming SIP request starts with this route
>> # - note: this is the same as route { ... }
>> request_route {
>>
>>   # per request initial checks
>>   route(REQINIT);
>>
>>   #!ifdef ENABLE_KDMQ
>>   # Handle Kamailio DQM messages
>>   if (is_method("KDMQ")) {
>> dmq_handle_message();
>>   }
>>   #!endif
>>
> --
> *Charles Chance*
> Managing Director
>
> t. 0330 120 1200m. 07932 063 891
>
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> Birmingham Science Park, Birmingham B7 4BB.
>
> ___
> 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] 5.1 compilation error on Centos 7

2018-08-02 Thread Wilkins, Steve
Hello all,

I started getting the following error while trying to compile Kamailio 5.1+ on 
Centos 7

CC (gcc) [M db_mysql.so]my_fld.o
In file included from my_fld.c:22:0:
my_fld.h:37:2: error: unknown type name 'my_bool'
  my_bool is_null;

Has anyone seen this before.

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] DMQ mem leak issues

2018-08-02 Thread Charles Chance
Again out of interest, what happens if you change it to:

if (method == “KDMQ”) {
...

Cheers,

Charles


On Thu, 2 Aug 2018 at 04:45, Rogelio Perez  wrote:

> Charles, here you go:
>
> ### Routing Logic 
>
> # Main SIP request routing logic
> # - processing of any incoming SIP request starts with this route
> # - note: this is the same as route { ... }
> request_route {
>
>   # per request initial checks
>   route(REQINIT);
>
>   #!ifdef ENABLE_KDMQ
>   # Handle Kamailio DQM messages
>   if (is_method("KDMQ")) {
> dmq_handle_message();
>   }
>   #!endif
>
-- 
*Charles Chance*
Managing Director

t. 0330 120 1200m. 07932 063 891

-- 
Sipcentric Ltd.
Company registered in England & Wales no. 
7365592. Registered
office: Faraday Wharf, Innovation 
Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamcmd htable.reload propertiesHash problem

2018-08-02 Thread Ginhoux, Patrick
Hi Henning,

Thanks for your review.

As you said, that's strange behavior.

So I'm going to upgrade to 5.0.7, the time to set up a server. I'll keep you
posted asap.

Cordialement.
Patrick GINHOUX 
Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 | patrick.ginh...@unisys.com

-Message d'origine-
De : Henning Westerholt  
Envoyé : jeudi 2 août 2018 09:02
À : sr-users@lists.kamailio.org
Cc : Ginhoux, Patrick 
Objet : Re: [SR-Users] kamcmd htable.reload propertiesHash problem

Am Dienstag, 24. Juli 2018, 10:20:01 CEST schrieb Ginhoux, Patrick:
> 
> I run Kamailio 5.0.1 with MariaDB database.
> 
> There is no issue at the initialization, meaning the db is opened by
> kamailio and the hash tables loaded from the db tables.

Hello Patrick,

this is strange. Normally if it can initialize correctly during startup,
then 
it also should be able to use the database later on. 

I did a quick check of the htable module in the repository. There have been
a 
few fixes related to rpc commands and also a bit related to the database in 
the last year. But I did not saw from the git logs anything like you 
described.

Nevertheless, you should try to setup the latest 5.0 release (5.0.7) - maybe

on a test system and see if the error is also happening there. There should
be 
no changes in database or configuration comparing to 5.0.1.

Best regards,

Henning

> Example:
> 
> # kamcmd htable.dump propertiesHash
> [..]
> 
> But the htable.reload command fails:
> 
> error: 500 - Failed to open htable db connection
> 
> 
> 
> The Kamailio log reports that it can't connect the db :
> 
> DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG:
> io_watch_add(0x7f68c74ab300, 10, 3, 0xdc9410), fd_no=1
> 
> DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read:
> new connection (1) on /var/run/kamailio//kamailio_ctl
> 
> DEBUG:  [core/sr_module.c:694]: find_mod_export_record():
> find_export_record: found  in module db_mysql
> [/usr/lib64/kamailio/modules/db_mysql.so]
> 
> DEBUG:  [db.c:209]: db_bind_mod(): using db bind api for db_mysql
> 
> DEBUG:  [db.c:314]: db_do_init2(): connection 0x7f68cc354c10 not
found
> in pool
> 
> DEBUG: db_mysql [km_my_con.c:98]: db_mysql_new_connection(): opening
> connection: mysql://:@/siprouter
> 
> ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver
error:
> Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
> 
> ERROR:  [db.c:318]: db_do_init2(): could not add connection to the
> pool
> 
> ERROR: htable [ht_db.c:92]: ht_db_open_con(): failed to connect to the
> database
> 
> 
> 
> My local db is located at /myqdata/mysiprdb/data where is the
mysiprdb.sock
> file. But the log shows that Kamailio is looking for
> /var/lib/mysql/mysql.sock.
> 
> 
> 
> Does this error make sense to you ?
> 
> Is it possible to fix this problem by configuration in Kamailio ?
> 
> 
> 
> My kamailio.cfg script contains :
> 
> 
> 
> # - htable
> 
> modparam("htable", "db_url", "mysql://[kamailio]/siprouter")
> 
> 
> 
> modparam("htable", "fetch_rows", 1000)
> 
> modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
> 
> modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
> 
> modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
> 
> modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")
> 
> 
> 
> In the /myqdata/mysiprdb/data/my.cnf, I added the following entries for
> Kamailio:
> 
> [kamailio]
> 
> socket = /myqdata/mysiprdb/data/mysiprdb.sock
> 
> user = siprouter
> 
> password = ##
> 
> default-character-set = utf8
> 
> 
> 
> Thanks all for help.
> 
> 
> 
> Cordialement.
> 
> Patrick GINHOUX


-- 
Henning Westerholt
https://skalatan.de/blog/


smime.p7s
Description: S/MIME cryptographic signature
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamcmd htable.reload propertiesHash problem

2018-08-02 Thread Henning Westerholt
Am Dienstag, 24. Juli 2018, 10:20:01 CEST schrieb Ginhoux, Patrick:
> 
> I run Kamailio 5.0.1 with MariaDB database.
> 
> There is no issue at the initialization, meaning the db is opened by
> kamailio and the hash tables loaded from the db tables.

Hello Patrick,

this is strange. Normally if it can initialize correctly during startup, then 
it also should be able to use the database later on. 

I did a quick check of the htable module in the repository. There have been a 
few fixes related to rpc commands and also a bit related to the database in 
the last year. But I did not saw from the git logs anything like you 
described.

Nevertheless, you should try to setup the latest 5.0 release (5.0.7) - maybe 
on a test system and see if the error is also happening there. There should be 
no changes in database or configuration comparing to 5.0.1.

Best regards,

Henning

> Example:
> 
> # kamcmd htable.dump propertiesHash
> [..]
> 
> But the htable.reload command fails:
> 
> error: 500 - Failed to open htable db connection
> 
> 
> 
> The Kamailio log reports that it can't connect the db :
> 
> DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG:
> io_watch_add(0x7f68c74ab300, 10, 3, 0xdc9410), fd_no=1
> 
> DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read:
> new connection (1) on /var/run/kamailio//kamailio_ctl
> 
> DEBUG:  [core/sr_module.c:694]: find_mod_export_record():
> find_export_record: found  in module db_mysql
> [/usr/lib64/kamailio/modules/db_mysql.so]
> 
> DEBUG:  [db.c:209]: db_bind_mod(): using db bind api for db_mysql
> 
> DEBUG:  [db.c:314]: db_do_init2(): connection 0x7f68cc354c10 not found
> in pool
> 
> DEBUG: db_mysql [km_my_con.c:98]: db_mysql_new_connection(): opening
> connection: mysql://:@/siprouter
> 
> ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error:
> Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
> 
> ERROR:  [db.c:318]: db_do_init2(): could not add connection to the
> pool
> 
> ERROR: htable [ht_db.c:92]: ht_db_open_con(): failed to connect to the
> database
> 
> 
> 
> My local db is located at /myqdata/mysiprdb/data where is the mysiprdb.sock
> file. But the log shows that Kamailio is looking for
> /var/lib/mysql/mysql.sock.
> 
> 
> 
> Does this error make sense to you ?
> 
> Is it possible to fix this problem by configuration in Kamailio ?
> 
> 
> 
> My kamailio.cfg script contains :
> 
> 
> 
> # - htable
> 
> modparam("htable", "db_url", "mysql://[kamailio]/siprouter")
> 
> 
> 
> modparam("htable", "fetch_rows", 1000)
> 
> modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
> 
> modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
> 
> modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
> 
> modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")
> 
> 
> 
> In the /myqdata/mysiprdb/data/my.cnf, I added the following entries for
> Kamailio:
> 
> [kamailio]
> 
> socket = /myqdata/mysiprdb/data/mysiprdb.sock
> 
> user = siprouter
> 
> password = ##
> 
> default-character-set = utf8
> 
> 
> 
> Thanks all for help.
> 
> 
> 
> Cordialement.
> 
> Patrick GINHOUX


-- 
Henning Westerholt
https://skalatan.de/blog/

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


Re: [SR-Users] kamcmd htable.reload propertiesHash problem

2018-08-02 Thread Ginhoux, Patrick
Does anybody encounter a problem with the kamcmd htable.reload
propertiesHash command ?

 

Cordialement.

Patrick GINHOUX 

Unisys | +33 1 46 69 52 12 | +33 6 60 32 24 74 | patrick.ginh...@unisys.com

 

De : sr-users  De la part de Ginhoux,
Patrick
Envoyé : mardi 24 juillet 2018 10:20
À : Kamailio (SER) - Users Mailing List 
Objet : [SR-Users] kamcmd htable.reload propertiesHash problem

 

Hi,

 

I run Kamailio 5.0.1 with MariaDB database.

 

There is no issue at the initialization, meaning the db is opened by
kamailio and the hash tables loaded from the db tables.

Example:

# kamcmd htable.dump propertiesHash

{

entry: 1

size: 1

slot: {

item: {

name: cfg.env

 

But the htable.reload command fails:

error: 500 - Failed to open htable db connection

 

The Kamailio log reports that it can’t connect the db :

DEBUG: ctl [../../core/io_wait.h:380]: io_watch_add(): DBG:
io_watch_add(0x7f68c74ab300, 10, 3, 0xdc9410), fd_no=1

DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read:
new connection (1) on /var/run/kamailio//kamailio_ctl

DEBUG:  [core/sr_module.c:694]: find_mod_export_record():
find_export_record: found  in module db_mysql
[/usr/lib64/kamailio/modules/db_mysql.so]

DEBUG:  [db.c:209]: db_bind_mod(): using db bind api for db_mysql

DEBUG:  [db.c:314]: db_do_init2(): connection 0x7f68cc354c10 not found
in pool

DEBUG: db_mysql [km_my_con.c:98]: db_mysql_new_connection(): opening
connection: mysql://:@/siprouter

ERROR: db_mysql [km_my_con.c:124]: db_mysql_new_connection(): driver error:
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2 "No such file or directory")

ERROR:  [db.c:318]: db_do_init2(): could not add connection to the
pool

ERROR: htable [ht_db.c:92]: ht_db_open_con(): failed to connect to the
database

 

My local db is located at /myqdata/mysiprdb/data where is the mysiprdb.sock
file. But the log shows that Kamailio is looking for
/var/lib/mysql/mysql.sock.

 

Does this error make sense to you ?

Is it possible to fix this problem by configuration in Kamailio ?

 

My kamailio.cfg script contains :

 

# - htable

modparam("htable", "db_url", "mysql://[kamailio]/siprouter")

 

modparam("htable", "fetch_rows", 1000)

modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")

modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")

modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")

modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;") 

 

In the /myqdata/mysiprdb/data/my.cnf, I added the following entries for
Kamailio:

[kamailio]

socket = /myqdata/mysiprdb/data/mysiprdb.sock

user = siprouter

password = ##

default-character-set = utf8

 

Thanks all for help.

 

Cordialement.

Patrick GINHOUX

 



smime.p7s
Description: S/MIME cryptographic signature
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] get_out_socket(): no socket found

2018-08-02 Thread Daniel-Constantin Mierla
Are 2.2.2.2 and 8.8.8.8 in the same subnet? Is there any firewall? Can you
do ping or send a sip packet between the two servers using sipsak?

Cheers,
Daniel

On Wed, Aug 1, 2018 at 4:14 PM, Ilie Soltanici  wrote:

> Daniel,
> Yes, IP Address has been edited, 2.2.2.2 and 8.8.8.8 are not real IP
> Address-es, this is just to show that those IP are external IP's.
>
> Regards,
> Ilie
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] get_out_socket(): no socket found

2018-08-02 Thread Ilie Soltanici
Daniel,
Yes, IP Address has been edited, 2.2.2.2 and 8.8.8.8 are not real IP
Address-es, this is just to show that those IP are external IP's.

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