Re: [SR-Users] xhttp_prom - Adding new metrics for dispatcher list to monitor SIP trunk availability

2020-03-12 Thread Henning Westerholt
Hello,

It should be possible to use e.g. a timer route to periodically fetch the 
status from localhost with RPC commands and to feed this into the counters 
etc.. from xhttp_prom.

But the easier way is probably just to use an external collector.

Cheers,

Henning


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com

From: sr-users  On Behalf Of Jonathan 
Hunter
Sent: Tuesday, March 10, 2020 4:13 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] xhttp_prom - Adding new metrics for dispatcher list to 
monitor SIP trunk availability

Hi Guys,

We are running kamailio 5.3 in our dev environment with a view to using the 
xhttp_prom module, so that we can monitor using prometheous.

It works fine in terms of getting all the internal stats and groups, however is 
it possible to grab the dispatcher.list output/stats using the module?

I know there is a collector that does this and provides the dispatcher gateway 
trunk status, but wondered if it could be implemented using xhttp_prom, or if 
external code would be required to grab the states using rpc etc?

Many thanks

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


Re: [SR-Users] out of shm without any visible reason

2020-03-12 Thread Daniel-Constantin Mierla

On 12.03.20 09:09, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>>> DB access works fine from K worker processes during the time when
>>> insert is stuck in timer process.
>> Are new records inserted in acc table? I think there are some
>> tools/commands for mysql to inspect the state a database table, check
>> acc table and missed_calls, if you also use this one.
> Accounting records are inserted without problems from other calls to the
> same accounting table where the timer process tries to insert its
> record but hangs.

Try to install debugging symbols for libmariadb and maybe there will be
more hints in the backtace of what it does internally, which can improve
troubleshooting by searching on the web for similar cases.

And, as I said in previous email, try to investigate the status of mysql
server with specific commands and tools, if you can find any out there.
From mysql client API, we set the query timeout options.

Otherwise, I haven't encountered such a situation yet to have any other
hint to share specific for it.

Maybe you can try to use IP sockets for connecting to mysql server, if
the connection is done over unixsocket file. In some older versions, it
was mentioned that timeout options may not work if not on an IP connection.

What you can also try, is to change the database table type. What do you
have now, MyISAM, InnoDB or something else?

To know better the ecosystem, what is the operation system and
mysq/mariadb versions?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
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] xhttp_prom - Adding new metrics for dispatcher list to monitor SIP trunk availability

2020-03-12 Thread Jonathan Hunter
Thanks for reply Henning!

Yes I agree with the external collector, I am using it without issue will stick 
with it.

Many thanks


From: Henning Westerholt 
Sent: 12 March 2020 11:12
To: Kamailio (SER) - Users Mailing List 
Cc: Jonathan Hunter 
Subject: RE: xhttp_prom - Adding new metrics for dispatcher list to monitor SIP 
trunk availability


Hello,



It should be possible to use e.g. a timer route to periodically fetch the 
status from localhost with RPC commands and to feed this into the counters 
etc.. from xhttp_prom.



But the easier way is probably just to use an external collector.



Cheers,



Henning





--

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

Kamailio services – 
https://gilawa.com



From: sr-users  On Behalf Of Jonathan 
Hunter
Sent: Tuesday, March 10, 2020 4:13 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] xhttp_prom - Adding new metrics for dispatcher list to 
monitor SIP trunk availability



Hi Guys,



We are running kamailio 5.3 in our dev environment with a view to using the 
xhttp_prom module, so that we can monitor using prometheous.



It works fine in terms of getting all the internal stats and groups, however is 
it possible to grab the dispatcher.list output/stats using the module?



I know there is a collector that does this and provides the dispatcher gateway 
trunk status, but wondered if it could be implemented using xhttp_prom, or if 
external code would be required to grab the states using rpc etc?



Many thanks



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


Re: [SR-Users] out of shm without any visible reason

2020-03-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> > DB access works fine from K worker processes during the time when
> > insert is stuck in timer process.
> 
> Are new records inserted in acc table? I think there are some
> tools/commands for mysql to inspect the state a database table, check
> acc table and missed_calls, if you also use this one.

Accounting records are inserted without problems from other calls to the
same accounting table where the timer process tries to insert its
record but hangs.

-- Juha

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


Re: [SR-Users] unknown error messages

2020-03-12 Thread Henning Westerholt
Hello Juha,

the error message looks related to the TCP support in core. There was a 
mismatch in the internal TCP hash table, and it also could not send out a 
message on a (network) file descriptor. 

If you only saw it once it is probably not worth to dig that deep into it, 
might be also caused from some external factors.

Cheers,

Henning

-- 
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com 

-Original Message-
From: sr-users  On Behalf Of Juha Heinanen
Sent: Thursday, March 12, 2020 9:13 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] unknown error messages

Any idea where this kind of error message could come from:

Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: CRITICAL: 
[core/pass_fd.c:277]: receive_fd(): EOF on 61 Mar 12 07:16:17 rox2 
/usr/bin/sip-proxy[32058]: ERROR: 
[core/io_wait.h:607]: io_watch_del(): trying to delete already erased entry 61 
in the hash(-1, 0, 0x7f689c16a868) flags 0) Mar 12 07:16:17 rox2 
/usr/bin/sip-proxy[32058]: ERROR: 
[core/io_wait.h:607]: io_watch_del(): trying to delete already erased entry 64 
in the hash(-1, 0, 0x7f68c063b0f0) flags 0) Mar 12 07:16:17 rox2 
/usr/bin/sip-proxy[32058]: CRITICAL: 
[core/pass_fd.c:191]: send_fd(): sendmsg failed sending 79 on 64: Broken pipe 
(32) Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: ERROR: 
[core/tcp_main.c:4225]: send2child(): send_fd failed for 0x7f689c18a0b0 (flags 
0x4018), fd 79

Debug does not give any hints.

-- Juha

___
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


Re: [SR-Users] Use topos module to hide contact in OPTIONS request

2020-03-12 Thread Daniel-Constantin Mierla
Hello,

the module aimed at supporting topology hiding for calls. Is the OPTIONS
part of a dialog or out-of-dialog (like a keepalive request)?

Cheers,
Daniel

On 11.03.20 16:02, Enzo wrote:
> Hi all
> I have a problem with the topos module. The contact header in OPTIONS
> request is not changed. It is working fine with INVITE. Is there any
> special configuration with OPTIONS?
>  
> I am using:
> version: kamailio 5.3.2 (x86_64/linux) 7ba545
>  
> This is the debug log:
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_msg.c:934]: tps_request_sent(): handling outgoing
> request (0, 0)
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_msg.c:376]: tps_pack_message(): compacted headers -
> x_via1: [SIP/2.0/UDP
> 122.123.145.146;branch=z9hG4bK8ee.c6d59104d9f494f8ba1f75ed3f9ec8cf.0](79)
> - x_via2: [SIP/2.0/UDP
> 172.26.52.104:5060;branch=z9hG4bK00E0F5150A04105449BBEB83377A](73) -
> x_vbranch1: [z9hG4bK8ee.c6d59104d9f494f8ba1f75ed3f9ec8cf.0](45)
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_msg.c:485]: tps_pack_message(): compacted headers -
> a_rr: [](0) - b_rr: [](0) - s_rr: [](0)
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_msg.c:490]: tps_pack_message(): compacted headers -
> as_contact: [](0) - bs_contact: [](0)
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_storage.c:126]: tps_storage_lock_get(): tps lock
> get: 337
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos_redis [topos_redis_storage.c:764]:
> tps_redis_load_branch(): loading branch record for
> [b:x:z9hG4bK8ee.c6d59104d9f494f8ba1f75ed3f9ec8cf.0]
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos_redis [topos_redis_storage.c:782]:
> tps_redis_load_branch(): hmap with key
> [b:x:z9hG4bK8ee.c6d59104d9f494f8ba1f75ed3f9ec8cf.0] not found
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_storage.c:391]: tps_storage_link_msg(): downstream:
> yes - acontact: [sip:172.26.52.104:5060] - bcontact: []
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> WARNING: topos [tps_storage.c:434]: tps_storage_record(): no local
> address - do record routing for all initial requests
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> INFO: topos_redis [topos_redis_storage.c:163]:
> tps_redis_insert_dialog(): no uuid for this message
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> ERROR: topos [tps_storage.c:445]: tps_storage_record(): failed to store
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [tps_storage.c:138]: tps_storage_lock_release(): tps lock
> release: 337
> Mar 11 15:52:13 kamtest /usr/local/kamailio/sbin/kamailio[55606]:
> DEBUG: topos [topos_mod.c:449]: tps_msg_sent(): new outbound buffer
> generated
>
> This is the config I use:
> modparam("ndb_redis", "server", "name=srv8;addr=127.0.0.1;port=6379;db=8")
> modparam("topos", "storage", "redis")
> modparam("topos_redis", "serverid", "srv8")
> modparam("topos", "branch_expire", 14400)
> modparam("topos", "dialog_expire", 14400)
>  
> Best Regards
> Enzo
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
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] (no subject)

2020-03-12 Thread Henning Westerholt
Hello,

you need to provide some details about the errors (like output from log 
messages etc..) that we can help you here on this list.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: ahmed moghazy 
Sent: Thursday, March 12, 2020 8:56 AM
To: Henning Westerholt 
Subject: Re: [SR-Users] (no subject)


I want to know steps for that cause when i try this it give me error i dont 
know why ?!


On Mar 11, 2020, at 10:21 AM, Henning Westerholt 
mailto:h...@skalatan.de>> wrote:

Hello,

this could be done with a database query (e.g. with sqlops module). If you are 
looking for a dedicated interface, there is for example the group module:
https://kamailio.org/docs/modules/devel/modules/group.html

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of ahmed moghazy
Sent: Tuesday, March 10, 2020 8:53 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] (no subject)

If i want to make users in groups for example two Groups  group A and group B 
and each group has 4 users but users in group A couldn't Call  users in group B?



On Mar 3, 2020, at 10:36 PM, ahmed moghazy 
mailto:ahmed.m.mogh...@gmail.com>> wrote:
I generate those certificates and i put then in linphone source code i want to 
enable require_certficate=1 could you help me how and where to put the 
certificates and linphone peer return it ? , thank you




On Mar 3, 2020, at 10:52 AM, M S 
mailto:shaherya...@gmail.com>> wrote:

Any sip client will work with kamailio (as sip server) as long as it supports 
TLS and configured correctly. I mostly use Linphone, Xlite and some of my own 
sip clients that i have built over the years.

You simply need to follow the quick howto in tls module documentation (as i 
mentioned earlier) to generate client and server certificates. Then copy client 
cert along with CA to sip client, provide connection and authentication info 
and it should work fine.

For over simplified setup where you don't have client certificate or not sure 
how to configure one for any given sip client, you can disable 
"verify_certificate" option in tls module.

Hope this helps.


On Tue, 3 Mar 2020, 08:53 ahmed moghazy, 
mailto:ahmed.m.mogh...@gmail.com>> wrote:
I know that but i want voip program to be used with  kamailio using tls i you 
could suggest one , thank you
Sent from my iPhone



On Mar 3, 2020, at 5:54 AM, M S 
mailto:shaherya...@gmail.com>> wrote:

Dude again, RTFM!

The TLS module has a quick how-to generate client and server certificates. Both 
must be issued by same CA and server must have all issued certificates along 
with CA, CRL and private key. The whole directory structure and what to put 
where is listed, along with how to configure kamailio.


On Mon, 2 Mar 2020, 20:27 ahmed moghazy, 
mailto:ahmed.m.mogh...@gmail.com>> wrote:
I put my own certficate in /res/raw/rootca.pem in linphone
Sent from my iPhone



On Mar 2, 2020, at 7:40 PM, M S 
mailto:shaherya...@gmail.com>> wrote:

Please read the tls module documentation,

https://kamailio.org/docs/modules/devel/modules/tls.html#tls.p.require_certificate

when enabled it requires client to present certificate, but client does not 
have one, which is the likely cause of the problem.

Hope this helps.


On Mon, 2 Mar 2020, 14:34 ahmed moghazy, 
mailto:ahmed.m.mogh...@gmail.com>> wrote:
Hello sir ,
when i enabled tls module in kamailio and i made the configurations in tls.cfg,
kamailio always sent me that peer dont return certificate when i make 
requre_certficate=1
___
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
___
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
___
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

[SR-Users] unknown error messages

2020-03-12 Thread Juha Heinanen
Any idea where this kind of error message could come from:

Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: CRITICAL:  
[core/pass_fd.c:277]: receive_fd(): EOF on 61
Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: ERROR:  
[core/io_wait.h:607]: io_watch_del(): trying to delete already erased 
entry 61 in the hash(-1, 0, 0x7f689c16a868) flags 0)
Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: ERROR:  
[core/io_wait.h:607]: io_watch_del(): trying to delete already erased 
entry 64 in the hash(-1, 0, 0x7f68c063b0f0) flags 0)
Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: CRITICAL:  
[core/pass_fd.c:191]: send_fd(): sendmsg failed sending 79 on 64: Broken 
pipe (32)
Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: ERROR:  
[core/tcp_main.c:4225]: send2child(): send_fd failed for 0x7f689c18a0b0 
(flags 0x4018), fd 79

Debug does not give any hints.

-- Juha

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


Re: [SR-Users] out of shm without any visible reason

2020-03-12 Thread Daniel-Constantin Mierla

On 11.03.20 20:12, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> If it happens periodically, maybe you can track why: try to identify
>> apps accessing the database for back up, cdr generation, etc ... as well
>> as infrastructure maintenance operations (vm backup snapshot).
> DB access works fine from K worker processes during the time when
> insert is stuck in timer process.

Are new records inserted in acc table? I think there are some
tools/commands for mysql to inspect the state a database table, check
acc table and missed_calls, if you also use this one.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
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] Topoh and dialog track_cseq_updates

2020-03-12 Thread Daniel-Constantin Mierla
Hello,

is topoh module loaded before dialog? There might be an impact in the
order of masking/demasking and matching the callid.

Cheers,
Daniel

On 12.03.20 17:06, Aidar Kamalov wrote:
> Hello,
> I am trying to increase cseq in invite with credentials to 401
> Unauthorized, but with topoh.so module and mask_callid enabled it does
> not work.
> Are there any way to fix it?
>
> -- 
> Aydar A. Kamalov
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- 
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] Topoh and dialog track_cseq_updates

2020-03-12 Thread Aidar Kamalov
Hello,
I am trying to increase cseq in invite with credentials to 401
Unauthorized, but with topoh.so module and mask_callid enabled it does not
work.
Are there any way to fix it?

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


Re: [SR-Users] unknown error messages

2020-03-12 Thread Juha Heinanen
Henning Westerholt writes:

> If you only saw it once it is probably not worth to dig that deep into
> it, might be also caused from some external factors.

It has appeared several times and may be related to json request.
Perhaps tcp connection is broken before K has delivered the result.

-- Juha

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


Re: [SR-Users] out of shm without any visible reason

2020-03-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> Try to install debugging symbols for libmariadb and maybe there will be
> more hints in the backtace of what it does internally, which can improve
> troubleshooting by searching on the web for similar cases.

I did that already earlier when I reported about similar issue, which
made K totally unresponsive for a long period of time.  Nothing was
found from the backtrace.

> What you can also try, is to change the database table type. What do you
> have now, MyISAM, InnoDB or something else?

DB type is InnoDB.

> To know better the ecosystem, what is the operation system and
> mysq/mariadb versions?

Latest stable Debian 10 that comes with mariadb 10.3.

On the positive side, so far the issue has not appeared after I
backported your db_cluster async insert patch to 5.3.  Perhaps there was
some issue in falling back to normal insert.

-- Juha

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