[SR-Users] mem_join_free flag in kamailio 5.6 deb

2024-02-20 Thread Arsen Semenov via sr-users
Hello!

I have an issue with kamailio 5.6.5 after some time of flying there are
errors in logs:

 [core/mem/q_malloc.c:297]: qm_find_free():
> qm_find_free(0x7fc79c286010, 536); Free fragment not found!


mem_join=1 by default, but it seems that MEM_JOIN_FREE flag is not defined
in this build

kamailio -I
> Print out of kamailio internals
>   Version: kamailio 5.6.5 (x86_64/linux)
>   Default config: /etc/kamailio/kamailio.cfg
>   Default paths to modules: /usr/lib/x86_64-linux-gnu/kamailio/modules
>   Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST,
> HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
>   MAX_RECV_BUFFER_SIZE=262144
>   MAX_URI_SIZE=1024
>   BUF_SIZE=65535
>   DEFAULT PKG_SIZE=8MB
>   DEFAULT SHM_SIZE=64MB
>   ADAPTIVE_WAIT_LOOPS=1024
>   TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select
>   Source code revision ID: unknown
>   Compiled with: gcc 10.2.1
>   Compiled architecture: x86_64
>   Compiled on:
> OS Debian 11 bullseye



However I noticed the flag exists in 5.7 installed from deb

Print out of kamailio internals
>   Version: kamailio 5.7.4 (x86_64/linux)
>   Default config: /etc/kamailio/kamailio.cfg
>   Default paths to modules: /usr/lib/x86_64-linux-gnu/kamailio/modules
>   Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC,
> *MEM_JOIN_FREE*, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
>   MAX_RECV_BUFFER_SIZE=262144
>   MAX_URI_SIZE=1024
>   BUF_SIZE=65535
>   DEFAULT PKG_SIZE=8MB
>   DEFAULT SHM_SIZE=64MB
>   ADAPTIVE_WAIT_LOOPS=1024
>   TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select
>   Source code revision ID: unknown
>   Compiled with: gcc 10.2.1
>   Compiled architecture: x86_64
>   Compiled on:

OS Debian 11 bullseye



and now, what got me bit confused is that when I build 5.6.5 from source
"make printcdefs" gives me this flag, alongside with other flags which I do
not see later in "kamailio -v" output.

So I am not sure whether this flag was defined during 5.6.5 deb build time
or it has been somehow lost?
So I need your advice.


Regards,
Arsen
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: STIR/SHAKEN with Kamailio

2023-10-18 Thread Arsen Semenov via sr-users
Hello,

I use Kamailio + secsipid module to implement France MAN programm which is
a slightly different from US STIR/SHAKEN framework but aims the same goal.
And yes, have it as a 3rd party service accessible via HTTP requests is
another doable option.

On Wed 18 Oct 2023 at 10:49, Yuriy G via sr-users <
sr-users@lists.kamailio.org> wrote:

> I will add some clarifications and the purpose of the approach:
> I've been using a 3d-party service ( written in-house ) via restful API as
> there were no STIR/SHAKEN modules for the Kamailio at that moment.
> So in short: it was a matter of time to integrate functionality.
>
>
> ср, 18 окт. 2023 г. в 10:03, Olle E. Johansson via sr-users <
> sr-users@lists.kamailio.org>:
>
>> Hello Kamailians!
>>
>> As STIR/SHAKEN seems to cross the ocean and arrive on the European
>> shores, I’m curious on how you’ve implemented it with Kamailio. I asked on
>> our Matrix chat and got two responses that seems to not use the Kamailio
>> STIR/SHAKEN support but rather a 3rd party service that they’ve integrated
>> using restful APIs.
>>
>> Please help me and share how you’re implementing STIR/SHAKEN with
>> Kamailio.
>>
>> I’m not shaken, nor stirred. yet.
>>
>> Regards,
>> /O
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
-- 
Sent from Gmail Mobile
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: how to get value of next hop

2023-08-10 Thread Arsen Semenov
Hi Sergey,

Have you also tried $nh(key) ?

On Thu 10 Aug 2023 at 16:15, Denys Pozniak  wrote:

> Hello!
>
> Did you try $(hfl(name)[N]) ?
>
> чт, 10 авг. 2023 г. в 04:13, Sergey Safarov :
>
>> I receiving INVITE with two Route header (no to tag).
>> First Route header is my Kamailio host.
>> Second Route header is next hop after Kamailio.
>>
>> I need to get value of next hop.
>> I tried to use "$route_uri" after "loose_route" but his deos works.
>> "$route_uri" always use top Route header.
>> But in the INVITE first Route header is Kamailio host.
>>
>> Is any change to get top Route header after "loose_route"?
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
>
>
> --
>
> BR,
> Denys Pozniak
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
-- 
Sent from Gmail Mobile
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: RTC/Kamailio dinner at Fosdem 2023

2023-01-16 Thread Arsen Semenov
Hello Daniel,
I am interested in joining the event as well.

Regards,
Arsen Semenov

On Tue, Jan 17, 2023 at 7:42 AM Maxim Sobolev  wrote:

> I will be interested, potentially together with Giovanni Maruzzelli.
> Assuming we arrive in town early enough for that. Thanks for organizing!!!
>
> -Max
>
> On Mon, Jan 9, 2023, 8:32 AM Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> Fosdem 2023 returns to Brussels, Belgium, for a physical event and I'm
>> writing to see if there are many people from the community going to the
>> event and want to organize again the usual RTC/Kamailio dinner on
>> Saturday evening (Feb 4, 2023).
>>
>> Each person should pay for himself, likely to be some price increase
>> comparing with the last one.
>>
>> If there is enough interest, Torrey will help to book a place to
>> accommodate us (first choice could be the same restaurant like in the
>> past, if available).
>>
>> Reply if you want to join the dinner and say how many other people are
>> joining you.
>>
>> Note that RTC Devroom got at this edition a half a day room allocation,
>> on the afternoon of Feb 5, 2023 (Sunday).
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.com
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>


-- 
Arsenii Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


Re: [SR-Users] Interactions of dmq_usrloc and usrloc w/db_mode > 0

2022-09-26 Thread Arsen Semenov
by the chance I was playing exactly with the same setup these days, in a
lab everything works just fine. +1 to the initial question.

On Mon 26 Sep 2022 at 18:33, Joel Serrano  wrote:

> +1 in this situation haha, also hoping to get some nice input :D
>
> On Mon, Sep 26, 2022 at 9:20 AM Matteo Brancaleoni 
> wrote:
>
>> Well,
>>
>> I asked a similar question here
>> https://lists.kamailio.org/pipermail/sr-users/2022-July/115160.html but
>> no answer yet :)
>>
>> What I see on my side is that it indeed works, the only drawback is that
>> the same contact is getting synced to DB, which causes a duplicate error
>> unless you use the "db_insert_update" option.
>>
>> Done that seems that it works ok (did tested in prod yet), and I had the
>> all the contacts live on all nodes and on db. The only downside that maybe
>> can happen is that the periodic sync may skew a bit the expire time and
>> maybe give a contact some more seconds, but it really depends on timings of
>> the clusters.
>>
>> But I'm really interested in the answer, too :)
>>
>> -- Matteo
>>
>>
>> On Mon, Sep 26, 2022 at 4:07 PM Alex Balashov 
>> wrote:
>>
>>> Hi,
>>>
>>> Are there any known contraindications for replicating contacts using
>>> dmq/dmq_usrloc, and injecting those contacts into a database on one of the
>>> nodes using usrloc with `db_mode` 1 or 2?
>>>
>>> Predictably, this is being done to support the use-case of getting
>>> registration status from database. If you think this should be done with
>>> JSONRPC, I am in complete agreement with you, but it’s not up to me. :-)
>>>
>>> I am doing this with `db_mode` 2 now, and finding that, for a small
>>> number of AORs, one can find instances where they are consistently stored
>>> in memory but not present in the `location` table. The overall proportion
>>> of these AORs, out of thousands, seems to be quite small. It was initially
>>> somewhat higher, and it went down once I increased usrloc `timer_processes`
>>> and increased the sync interval from 30 to 60 seconds.
>>>
>>> Nevertheless, it is still non-zero, and I am getting intermittent
>>> reports. I wonder if there are some prior experiences with this and
>>> anything to watch out, or if `db_mode` 1 might be a superior choice. I
>>> personally cannot see how that would be; it seems to have all the
>>> performance downsides of mode 3. But perhaps if something about it is more
>>> “problem-free” vis-a-vis DMQ, it’s worth a shot?
>>>
>>> — Alex
>>>
>>> --
>>> Alex Balashov | Principal | Evariste Systems LLC
>>>
>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>>
>>>
>>> __
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>   * sr-users@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] tcp_set_connection_lifetime(1) does not close connection

2021-12-10 Thread Arsen Semenov
Hello Sebastian,

Have you tried to use `set_reply_close()` instead ?

https://www.kamailio.org/wiki/cookbooks/5.5.x/core#set_reply_close

On Fri, Dec 10, 2021 at 8:49 PM Sebastian Damm  wrote:

> Hi,
>
> for having a maintenance mode, I need to implement some sort of draining
> functionality. All our clients register via TLS. So I thought, I just
> answer the next REGISTER of a client with a 503 and kill the tcp connection
> afterwards, so they need to open up a new connection to the loadbalancer in
> front and end up on a different server.
>
> This is my code:
>
> 510 if msg.is_method("REGISTER"):
>   1 if KSR.pv.get("$shv(MAINTENANCE_MODE)") == 1:
>   2 KSR.info("In maintenance mode, rejecting registration")
>   3 KSR.hdr.append_to_reply("Retry-After: 2\r\n")
>   4 KSR.sl.sl_send_reply(503, "Draining")
>   5 if KSR.tcpops.tcp_set_connection_lifetime(1) > 0:
>   6 KSR.info("Set Connection lifetime to 1")
>   7 return False
>
> (Side note: msg is some internal class, this is obviously KEMI with python)
>
> So now when I set the MAINTENANCE_MODE var to 1, Kamailio rejects the
> REGISTER requests, logs both lines and sends out a 503.
>
> Debug log tells me this:
> Dec 10 15:32:10 ifens5 /usr/sbin/kamailio[3851]: DEBUG: tcpops
> [tcpops.c:229]: tcpops_set_connection_lifetime(): new connection lifetime
> for conid=1: 908866403
> Dec 10 15:32:21 ifens5 /usr/sbin/kamailio[3855]: DEBUG: 
> [core/tcp_main.c:4554]: tcpconn_main_timeout(): entering timer for
> 0x7f759cb26218 (ticks=908866499, timeout=908866499 (0 s), wr_timeout=0
> (211631299 s)), write queue: 0 bytes
>
> In tcpdump I can see that the connection does not get closed immediately.
>
> Is there some timer in the tcp stack which cleans up expired connections
> from time to time? Can I manipulate how often this timer runs? I couldn't
> find anything, and clearly even though I tell Kamailio to close the
> connection after 1 second, it doesn't do it.
>
>
> Thanks for any input.
>
> Regards,
> Sebastian
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Forcing Outbound Socket

2021-11-11 Thread Arsen Semenov
It is possible with TCP. Moreover Kamailio is trying to reuse the tcp
connection whenever the destination address is matching an active one.
The standard way is good, but in the real world you could face some devices
which do not support "outbound" properly, so you can leverage functions
exposed by nathelper module to ensure correct routing.

On Thu, Nov 11, 2021 at 4:50 PM Ross McKillop  wrote:

>
>
> On 11 Nov 2021, at 07:22, Olle E. Johansson  wrote:
>
>
>
> 10 nov. 2021 kl. 18:21 skrev Ross McKillop :
>
> Hi,
>
> Thanks, I was almost certain that is set but it seems it may not be so
> will double check that, thank you :)
>
> Now to solve the other issue….
>
> Just a nit-picking note: All these are non-standard fixes. The standard
> based way is to use the outbound module, it’s the way to allow the sip
> server to use an inbound TCP connection for outbound requests. This applies
> to client2server connections.
>
> For server2server connections there is a requirement of mutual TLS auth in
> order to be able to reuse the connection in both directions
>
>
> I thought this would be possible with TCP too.
>
> I looked at the outbound module but this is a 'drop in' replacement for
> something that already exists, so I'm trying to avoid rewriting headers as
> would be required for flow IDs etc, however it's a definite preferred
> method for improvement.
>
> As an aside, and it may be the same issue in
> https://www.mail-archive.com/sr-users@lists.kamailio.org/msg15589.html,
> when you force an outbound socket on a specific port and a reply is
> received on that port, both $Rp and $Rut show the port on the first listen
> directive, not the port it was actually received on, which makes it a bit
> harder to do what I was trying to as well :/
>
> Ross
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Catching websocket / TCP errors

2021-10-20 Thread Arsen Semenov
Hi,

Yes, you can handle return codes from t_relay(). It should return -1 in
case of network failure.

On Wed, 20 Oct 2021 at 4:39 PM, Marrold  wrote:

> Hi all,
>
> Is there any way of catching these errors before sending a 500 No error
> (2/SL) ?
>
> Thanks
>
> On Tue, Oct 5, 2021 at 5:01 PM Marrold  wrote:
>
>> Hi Arsen
>>
>> That looks perfect, except we're still using 4.3.X on some of our proxies
>> ( I should have mentioned, sorry) . We plan on upgrading very soon...
>>
>> Thanks
>>
>>
>> On Tue, Oct 5, 2021 at 4:58 PM Arsen Semenov  wrote:
>>
>>> Hi,
>>> have you tried this param?
>>>
>>> https://kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.db_clean_tcp
>>>
>>> On Tue, Oct 5, 2021 at 8:49 PM Marrold  wrote:
>>>
>>>> Hi,
>>>>
>>>> We're currently implementing WebRTC (SIP over a websocket) on our
>>>> Kamailio proxies and we're experiencing a minor issue after a restart.
>>>>
>>>> We write all USRLOC entries to a shared database to implement HA. These
>>>> are then loaded on a restart, which leaves us with entries with TCP
>>>> connections that no longer exist. When a call attempt is made the proxy
>>>> can't find the connection ID and immediately rejects the call with a "500
>>>> No error (2/SL)" -
>>>>
>>>> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: WARNING: 
>>>> [core/msg_translator.c:2861]: via_builder(): TCP/TLS connection (id: 0) for
>>>> WebSocket could not be found
>>>> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: 
>>>> [core/msg_translator.c:2038]: build_req_buf_from_sip_req(): could not
>>>> create Via header
>>>> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: tm
>>>> [t_fwd.c:479]: prepare_new_uac(): could not build request
>>>> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: tm
>>>> [t_fwd.c:1759]: t_forward_nonack(): failure to add branches
>>>> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: sl
>>>> [sl_funcs.c:414]: sl_reply_error(): stateless error reply used: No error
>>>> (2/SL)
>>>>
>>>> How can we catch this error to avoid terminating the call prematurely?
>>>> Or should we flush these TCP connections on start up?
>>>>
>>>> Thanks
>>>> Matthew
>>>>
>>>> __
>>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>>   * sr-users@lists.kamailio.org
>>>> Important: keep the mailing list in the recipients, do not reply only
>>>> to the sender!
>>>> Edit mailing list options or unsubscribe:
>>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>
>>>
>>> --
>>> Arsen Semenov
>>>
>>> __
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>   * sr-users@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Catching websocket / TCP errors

2021-10-05 Thread Arsen Semenov
Hi,
have you tried this param?
https://kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.db_clean_tcp

On Tue, Oct 5, 2021 at 8:49 PM Marrold  wrote:

> Hi,
>
> We're currently implementing WebRTC (SIP over a websocket) on our Kamailio
> proxies and we're experiencing a minor issue after a restart.
>
> We write all USRLOC entries to a shared database to implement HA. These
> are then loaded on a restart, which leaves us with entries with TCP
> connections that no longer exist. When a call attempt is made the proxy
> can't find the connection ID and immediately rejects the call with a "500
> No error (2/SL)" -
>
> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: WARNING: 
> [core/msg_translator.c:2861]: via_builder(): TCP/TLS connection (id: 0) for
> WebSocket could not be found
> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: 
> [core/msg_translator.c:2038]: build_req_buf_from_sip_req(): could not
> create Via header
> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: tm [t_fwd.c:479]:
> prepare_new_uac(): could not build request
> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: tm [t_fwd.c:1759]:
> t_forward_nonack(): failure to add branches
> Oct  5 15:38:24 proxy-01 /sbin/kamailio[32087]: ERROR: sl
> [sl_funcs.c:414]: sl_reply_error(): stateless error reply used: No error
> (2/SL)
>
> How can we catch this error to avoid terminating the call prematurely? Or
> should we flush these TCP connections on start up?
>
> Thanks
> Matthew
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Manage multiple RTP streams with different TO-tags (forking)

2021-08-27 Thread Arsen Semenov
it's legal to get responses with different to-tags, since the request is
forked. this is what's happening in this scenario.
I think this is an issue of UAC/rtpengin how it is reacting to the second
SDP in 183

are the SDPs in 183 responses carried reliably?

On Fri, Aug 27, 2021 at 2:51 PM Yuriy Gorlichenko 
wrote:

> Hello.
> The first thing: to tag can't be changed due session once it passed.
>
> If provider uses forking mechanism the it has to be hidden from your
> system.
>
> Regarding SDP according
> https://datatracker.ietf.org/doc/html/rfc3261#section-13.2.1
> They can't change SDP answer description on the fly. Only first SDP answer
> used as proper, all othe answers will be ignored.
>
> On Fri, 27 Aug 2021, 11:27 B. Tietz,  wrote:
>
>> Hello,
>>
>> following situation.
>> I have a Kamailio (5.4) using rtpengine to loadbalance calls.
>>
>> If a call from Alice comes in, Kamailio decides to send the call to
>> Carrier B from Bob.
>> Bobs Phone is ringing and the carrier B send a 183 Session Progress with
>> SDP and To-tag=abcd. The SDP has G722 as codec and port 1234.
>> A few moments later carrier B send a second 183 Session Progress with SDP
>> and TO-tag=fghi. The SDP has G711 as codec and port 5678. This is done, to
>> play some funky music as ringtone -.-
>> If Bob answers the call, carrier B sends a 200 OK WITHOUT SDP and
>> TO-tag=abcd. So this should instruct our Kamailio to switch to the first
>> G722 and port 1234.
>>
>> But sadly, this is just not working as expected.
>>
>> We tried to set the flags media-handover and port-latching for the
>> rtpengine options and additionally set a to-tag when using rtpenging_manage.
>> But this doesn't solve the codec change, so we have only audio when Bob
>> answers the call, but no ringtone-music. If we allow G711 only in the
>> outgoing INVITE to Bob, we have also tha ringtone-muisic, because there is
>> no codec-change.
>>
>> Carrier B tells us, they are using a fork-mechanism.
>>
>> Is there something we can do, to support the codec change in 183? Or
>> enforce carrier B to send SDP in 200 OK? Or anything else?
>>
>> Carrier B can not change anything in the ringtone-music-backend. They are
>> stuck on G711.
>>
>> Thanks!
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Setting up uacreg

2021-07-29 Thread Arsen Semenov
Hi Duncan,

There are plenty of options here.

I think here is good place to start:
https://www.kamailio.org/wiki/tutorials/security/kamailio-security

You also can check https://www.apiban.org/doc.html


Regards,

On Thu, Jul 29, 2021 at 8:37 AM Duncan Turnbull 
wrote:

> Hi Arsen
>
> Thanks very much, I am looking at that now
>
> Is there an easy way to control the extensions that are proxied through to
> asterisk so that we restrict the ability of outside scanning of extension
> lists. I would like to limit the registrations for extensions passed
> through to asterisk that come from an unknown / external ips.
>
> Thanks again
>
> Cheers Duncan
>
> On Wed, Jul 28, 2021 at 11:11 PM Arsen Semenov 
> wrote:
>
>> You can check how Path works, it is described in rfc3327, this is
>> probably what you need.
>> From the Asterisk side; however, I can't tell whether it is supported by
>> pjsip, there was some issue as I know, but at least chan_sip should support
>> it.
>> Also docs for kamailio registrar module.
>> What do you mean by "limit the user ids that go through to asterisk"?
>>
>> On Wed, Jul 28, 2021 at 12:50 PM Duncan Turnbull 
>> wrote:
>>
>>> Hi Arsen
>>>
>>> Thanks very much for your reply
>>>
>>> We were using repro which does that but are interested in the wider
>>> capabilities of kamailio.
>>>
>>> We are wanting to limit the user ids that go through to asterisk and
>>> eventually have two kamailio servers that provide some failover
>>>
>>> I saw a slide pack from Fred Posner talking about fronting asterisk with
>>> kamailio and I probably jumped to uac without fully understanding what it’s
>>> purpose is
>>>
>>> I also saw that shared line appearance can be simulated using kamailio,
>>> and perhaps it needs the uac module to achieve that.
>>>
>>> My general understanding is new and growing so I am grateful for all
>>> advice or questions
>>>
>>> Thanks again
>>>
>>> Cheers Duncan
>>>
>>> On 28/07/2021, at 3:34 PM, Arsen Semenov  wrote:
>>>
>>> 
>>> Hi Duncan,
>>>
>>> This scenario is quite new for me, not sure I got it right.. but why
>>> have you decided not to proxying requests to asterisks?
>>> By leveraging Path and Record-route headers Asterisk will know how to
>>> route the response back as well as new requests.
>>> And the proxy will know how to handle them.
>>> This is how kamailio is usually set as a front-end for media servers.
>>>
>>>
>>>
>>> On Wed, Jul 28, 2021 at 8:35 AM Duncan Turnbull 
>>> wrote:
>>>
>>>> Hi there
>>>>
>>>> I am a new user of Kamailio and we are trying to use it to be as a
>>>> front end for our asterisk pbx. We are running on Ubuntu 18.04 and Kamailio
>>>> 5.3.8 with Siremis
>>>>
>>>> Rather than proxying the request through to asterisk we are trying to
>>>> use uacreg to send a login to asterisk. Asterisk will think all the users
>>>> are appear from the proxy but thats okay. Initially this is just for
>>>> external users but eventually all phones etc will register via Kamailio and
>>>> we will have the trunks there (and split them across another kamailio but
>>>> thats another job)
>>>>
>>>> If I add a user to the uacreg then when I register to Kamailio it sends
>>>> a register request but to the realm in the uacreg table and the matching
>>>> port Kamailio is running on.
>>>>
>>>> Is this because somewhere we have set Kamailio to directly proxy on and
>>>> we need to turn that off first?
>>>>
>>>> This is our uacreg table
>>>>
>>>> mysql> select * from uacreg;
>>>>
>>>> ++++++---+---+---+---+--++-+---+---++
>>>> | id | l_uuid | l_username | l_domain   | r_username | r_domain  |
>>>> realm | auth_username | auth_password | auth_ha1 | auth_proxy |
>>>> expires | flags | reg_delay | socket |
>>>>
>>>> ++++++---+---+---+---+--++-+---+---++
>>>> |  1 | testuser | testuser | ourdomain.com | 88 |

Re: [SR-Users] Setting up uacreg

2021-07-28 Thread Arsen Semenov
You can check how Path works, it is described in rfc3327, this is probably
what you need.
>From the Asterisk side; however, I can't tell whether it is supported by
pjsip, there was some issue as I know, but at least chan_sip should support
it.
Also docs for kamailio registrar module.
What do you mean by "limit the user ids that go through to asterisk"?

On Wed, Jul 28, 2021 at 12:50 PM Duncan Turnbull 
wrote:

> Hi Arsen
>
> Thanks very much for your reply
>
> We were using repro which does that but are interested in the wider
> capabilities of kamailio.
>
> We are wanting to limit the user ids that go through to asterisk and
> eventually have two kamailio servers that provide some failover
>
> I saw a slide pack from Fred Posner talking about fronting asterisk with
> kamailio and I probably jumped to uac without fully understanding what it’s
> purpose is
>
> I also saw that shared line appearance can be simulated using kamailio,
> and perhaps it needs the uac module to achieve that.
>
> My general understanding is new and growing so I am grateful for all
> advice or questions
>
> Thanks again
>
> Cheers Duncan
>
> On 28/07/2021, at 3:34 PM, Arsen Semenov  wrote:
>
> 
> Hi Duncan,
>
> This scenario is quite new for me, not sure I got it right.. but why have
> you decided not to proxying requests to asterisks?
> By leveraging Path and Record-route headers Asterisk will know how to
> route the response back as well as new requests.
> And the proxy will know how to handle them.
> This is how kamailio is usually set as a front-end for media servers.
>
>
>
> On Wed, Jul 28, 2021 at 8:35 AM Duncan Turnbull 
> wrote:
>
>> Hi there
>>
>> I am a new user of Kamailio and we are trying to use it to be as a front
>> end for our asterisk pbx. We are running on Ubuntu 18.04 and Kamailio 5.3.8
>> with Siremis
>>
>> Rather than proxying the request through to asterisk we are trying to use
>> uacreg to send a login to asterisk. Asterisk will think all the users are
>> appear from the proxy but thats okay. Initially this is just for external
>> users but eventually all phones etc will register via Kamailio and we will
>> have the trunks there (and split them across another kamailio but thats
>> another job)
>>
>> If I add a user to the uacreg then when I register to Kamailio it sends a
>> register request but to the realm in the uacreg table and the matching port
>> Kamailio is running on.
>>
>> Is this because somewhere we have set Kamailio to directly proxy on and
>> we need to turn that off first?
>>
>> This is our uacreg table
>>
>> mysql> select * from uacreg;
>>
>> ++++++---+---+---+---+--++-+---+---++
>> | id | l_uuid | l_username | l_domain   | r_username | r_domain  | realm
>> | auth_username | auth_password | auth_ha1 | auth_proxy |
>> expires | flags | reg_delay | socket |
>>
>> ++++++---+---+---+---+--++-+---+---++
>> |  1 | testuser | testuser | ourdomain.com | 88 | 10.8.8.20
>> | 10.8.8.20 | 88| password  | ''   | sip:10.8.8.20:5060
>> | 360 | 0 | 3 ||
>>
>> ++++++---+---+---+---+--++-+---+---++
>> 1 row in set (0.00 sec)
>>
>> All pointer, guides and recommendations will be welcome
>>
>> Thanks very much
>>
>> Cheers Duncan
>>
>>
>>
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> Arsen Semenov
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>  * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> _

Re: [SR-Users] Setting up uacreg

2021-07-27 Thread Arsen Semenov
Hi Duncan,

This scenario is quite new for me, not sure I got it right.. but why have
you decided not to proxying requests to asterisks?
By leveraging Path and Record-route headers Asterisk will know how to route
the response back as well as new requests.
And the proxy will know how to handle them.
This is how kamailio is usually set as a front-end for media servers.



On Wed, Jul 28, 2021 at 8:35 AM Duncan Turnbull 
wrote:

> Hi there
>
> I am a new user of Kamailio and we are trying to use it to be as a front
> end for our asterisk pbx. We are running on Ubuntu 18.04 and Kamailio 5.3.8
> with Siremis
>
> Rather than proxying the request through to asterisk we are trying to use
> uacreg to send a login to asterisk. Asterisk will think all the users are
> appear from the proxy but thats okay. Initially this is just for external
> users but eventually all phones etc will register via Kamailio and we will
> have the trunks there (and split them across another kamailio but thats
> another job)
>
> If I add a user to the uacreg then when I register to Kamailio it sends a
> register request but to the realm in the uacreg table and the matching port
> Kamailio is running on.
>
> Is this because somewhere we have set Kamailio to directly proxy on and we
> need to turn that off first?
>
> This is our uacreg table
>
> mysql> select * from uacreg;
>
> ++++++---+---+---+---+--++-+---+---++
> | id | l_uuid | l_username | l_domain   | r_username | r_domain  | realm
>   | auth_username | auth_password | auth_ha1 | auth_proxy | expires
> | flags | reg_delay | socket |
>
> ++++++---+---+---+---+--++-+---+---++
> |  1 | testuser | testuser | ourdomain.com | 88 | 10.8.8.20 |
> 10.8.8.20 | 88| password  | ''   | sip:10.8.8.20:5060 |
>   360 | 0 | 3 ||
>
> ++++++---+---+---+---+--++-+---+---++
> 1 row in set (0.00 sec)
>
> All pointer, guides and recommendations will be welcome
>
> Thanks very much
>
> Cheers Duncan
>
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Active Profile for sipreply in SEMS

2021-07-17 Thread Arsen Semenov
Hi Mojatba,

basically you should be able to set whitelist in your sbc profile like this:

header_filter=whitelist
header_list=SBC

Not sure how it will work for replies however..
you also can try "transparent" - no filtering mode


Regards,


On Sat, Jul 17, 2021 at 2:50 PM Mojtaba  wrote:

> Hello,
> Does anybody know how i could change white filter in siprelpy in sems?
> In Kamailio, I got "200 OK" from UE, then add a new header (SBC: mt-reply)
> and send it to sems server. The sems server remove it:
>  [#7f410fbfb700/4560] [inplaceHeaderFilter, HeaderFilter.cpp:226] DEBUG:
>  erasing header 'sbc' by whitelist
>
> I really don't want to remove it.
> Actually if I knew how i active profile for sip replying in sems, I would
> be able to solve this.
>
> Thanks with regards.
> --
> --Mojtaba Esfandiari.S
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Sipwise SEMS

2021-07-04 Thread Arsen Semenov
Hi David,
SEMS's sbc module (aka B2BUA) works quite well in practice, not just in
theory :)

and yes, you can just pass next hop as a custom header

from mod sbc doc:
next_hop=$H(P-NextHop)


On Sun, Jul 4, 2021 at 11:41 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> I know SEMS can provide conference, voicemail, and other services.
>
> In theory it’s also a B2BUA. Could I use a python script to provide a
> simple routing service? I.e.: receive an invite and send it somewhere else
> based on some routing logic?
>
> Thanks all
>
> David
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] set empty custom global variable

2021-06-11 Thread Arsen Semenov
Then I don’t think it is possible as kamcmd uses kamailio binrpc protocol
which in turn accepts string or int as an arguments and string should be 0
terminated.

I’ve tried to reproduce your use case and execute  kamcmd “cfg.reset group”
- it should set the value to the default..  but it crushes my 5.5.0

On Fri, 11 Jun 2021 at 8:53 PM, Sergey Safarov  wrote:

> yes, Arsen, you are correct.
>
> On Fri, Jun 11, 2021 at 5:20 PM Arsen Semenov  wrote:
>
>> Hello Sergey,
>>
>> Am I understanding you right, that you've defined a custom global
>> variable with an empty value in the kamailio.cfg
>> and then want to set a string value to it and then by executing cfg.sets
>> global var_name "" want to clear that value to be blank again?
>>
>> On Fri, Jun 11, 2021 at 4:31 PM Sergey Safarov 
>> wrote:
>>
>>> In Kamailio config I use empty global string variable
>>> local.trace_troubleshooting_net = "" descr "trace all SIP messages from
>>> given network"
>>>
>>> When I check variable value I get blank string
>>> kamcmd cfg.get local trace_troubleshooting_net
>>>
>>> I can set new value
>>> [root@host]# kamcmd cfg.sets local trace_troubleshooting_net "2600::/48"
>>> [root@host]# kamcmd cfg.get local trace_troubleshooting_net
>>> 2600::/48
>>>
>>> Now I want to set the empty custom  global variable using a command
>>> kamcmd cfg.sets group trace_troubleshooting_net ""
>>> But get error
>>> error: 400 - error at parameter 2: expected string type but record
>>> doesn't match type
>>>
>>> How to properly set empty values?
>>>
>>> __
>>> Kamailio - Users Mailing List - Non Commercial Discussions
>>>   * sr-users@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to
>>> the sender!
>>> Edit mailing list options or unsubscribe:
>>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>> --
>> Arsen Semenov
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] set empty custom global variable

2021-06-11 Thread Arsen Semenov
Hello Sergey,

Am I understanding you right, that you've defined a custom global variable
with an empty value in the kamailio.cfg
and then want to set a string value to it and then by executing cfg.sets
global var_name "" want to clear that value to be blank again?

On Fri, Jun 11, 2021 at 4:31 PM Sergey Safarov  wrote:

> In Kamailio config I use empty global string variable
> local.trace_troubleshooting_net = "" descr "trace all SIP messages from
> given network"
>
> When I check variable value I get blank string
> kamcmd cfg.get local trace_troubleshooting_net
>
> I can set new value
> [root@host]# kamcmd cfg.sets local trace_troubleshooting_net "2600::/48"
> [root@host]# kamcmd cfg.get local trace_troubleshooting_net
> 2600::/48
>
> Now I want to set the empty custom  global variable using a command
> kamcmd cfg.sets group trace_troubleshooting_net ""
> But get error
> error: 400 - error at parameter 2: expected string type but record doesn't
> match type
>
> How to properly set empty values?
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How To setup Provider SIP trunk with registration

2021-05-30 Thread Arsen Semenov
Hello,

Kamailio default configuration file provides samples on how to configure a
simple VoIP provider.

regarding SIP trunking it has examples for: user authentication and IP
authorization.

In order to enable user authentication you need to define:

#!define WITH_MYSQL
#!define WITH_AUTH

This will enable MySQL DB back-end support and auth and auth_db modules.
You should have MySQL server configured with a database required by
kamailio and create subscribers with username, passwords.

After that you can register a SIP client with username/password previously
created.

https://kamailio.org/docs/modules/5.5.x/modules/auth.html
https://kamailio.org/docs/modules/5.5.x/modules/auth_db.html



On Mon, May 31, 2021 at 3:12 AM zak ast  wrote:

> Hi,
>
> I know I can you uacreg to register a SIP trunk as a SIP client with
> username/password. But how can I set up a SIP trunk as a provider and get
> the other end (SIP client) to register with username/password.
>
> Regards,
> Zak.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Collecting stats from Kamailio.cfg using Kamailio_exporter Prometheus

2021-05-25 Thread Arsen Semenov
Hi Hisham,

Yes you can use it for monitoring total calls handled by kamailio.

In kamailio you need to configure dialog module and make sure you run
kamailio_exporter with dlg.stats_active enabled.

On Tue, 25 May 2021 at 6:57 PM, Hisham Ahmad Jan 
wrote:

> Hi,
>
> I'm using Kamailio version 5.3.7 with DISPATCHER module and I would like
> to integrate my kamailio with a kamailio_exporter for monitoring using
> Prometheus server.
>
> Is it possible to collect data such as the number of total calls (inbound,
> outbound) and plot time-graphs using those stats?
> If so, what modules/functions would I need apart from the Dispatcher
> module to be able to have efficient results?
>
> Any degree of help will be appreciated.
>
> *Hisham Jan*
> *VoIP Engineer*
>
> *0322-6398775*
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] secsipid

2021-05-11 Thread Arsen Semenov
Hi David,

seems you are using Go with Go modules support enabled.
secsipidx does not support go modules, make sure you have environment
variable GO111MODULE set to off and then download the module by executing
"go get github.com/asipto/secsipidx"

it should be downloaded in your $GOPATH



On Tue, May 11, 2021 at 6:21 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> I'm trying to use secsipid as per
> https://kamailio.org/docs/modules/5.5.x/modules/secsipid.html
>
>
> I just installed go on a new vm:
>
> the env is as follows:
> # env
> GOPATH=/root/go
>
> then:
>
> ~# go get github.com/asipto/secsipidx
> ~#
>
> Then:
>
> ~# cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/
> bash: cd: /root/go/src/github.com/asipto/secsipidx/csecsipid/: No such
> file or directory
>
> it looks like it's not downloaded where the documentation says.
> It is however in:
>
> go
> |-- bin
> `-- pkg
> |-- mod
> |   |-- cache
> |   |   `-- download
> |   |   |-- github.com
> |   |   |   |-- asipto
> |   |   |   |   `-- secsipidx
> |   |   |   |   `-- @v
> |   |   |   `-- google
> |   |   |   `-- uuid
> |   |   |   `-- @v
> |   |   `-- sumdb
> |   |   `-- sum.golang.org
> |   |   |-- lookup
> |   |   |   `-- github.com
> |   |   |   |-- asipto
> |   |   |   `-- google
> |   |   `-- tile
> |   |   `-- 8
> |   |   |-- 0
> |   |   |   |-- x010
> |   |   |   |-- x011
> |   |   |   `-- x016
> |   |   |   `-- 560.p
> |   |   |-- 1
> |   |   |   `-- 064.p
> |   |   `-- 2
> |   |   `-- 000.p
> |   `-- github.com
> |   |-- asipto
> |   |   `-- secsipidx@v1.0.0
> |   |   |-- csecsipid
> |   |   `-- secsipid
> |   `-- google
> |   `-- uuid@v1.2.0
> `-- sumdb
> `-- sum.golang.org
>
> 38 directories
>
> But going into ~/go/pkg/mod/github.com/asipto/secsipidx@v1.0.0/csecsipid
> we have:
>
> ~/go/pkg/mod/github.com/asipto/secsipidx@v1.0.0/csecsipid# ls -l
> total 16
> -r--r--r-- 1 root root  231 May 11 13:14 Makefile
> -r--r--r-- 1 root root 1778 May 11 13:14 csecsipid.go
> -r--r--r-- 1 root root 1988 May 11 13:14 libsecsipid.h
> -r--r--r-- 1 root root  120 May 11 13:14 secsipid.h
>
> The Makefile contains the proper liba:
>
> # Makefile to build libraries
> #
>
> all: libso
>
> libso:
> go build -o libsecsipid.so -buildmode=c-shared csecsipid.go
>
> liba:
> go build -o libsecsipid.a -buildmode=c-archive csecsipid.go
>
> clean:
> rm -f libsecsipid.so
> rm -f linsecsipid.a
>
> But "make liba" returns:
>
> # make liba
> go build -o libsecsipid.a -buildmode=c-archive csecsipid.go
> csecsipid.go:6:2: no required module provides package
> github.com/asipto/secsipidx/secsipid: go.mod file not found in current
> directory or any parent directory; see 'go help modules'
> make: *** [Makefile:10: liba] Error 1
>
> Obviously not a "go" guy here.
>
> What am I doing wrong?
>
> Thanks for your help!
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Arsen Semenov
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] monitor uac registration status

2021-03-05 Thread Arsen Semenov
Hi,

just as an idea I would suggest to have a service which will periodically
query kamailio with json-rpc uac.reg_info and process the response, it
could be written in golang for example

On Fri, 5 Mar 2021 at 11:37 AM, Davide Zanichelli 
wrote:

> Hello
>
> is there a way to monitor (write to db) uacreg status ?
>
> Thanks You
>
> Davide
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPEngine control protocol via TCP

2021-03-04 Thread Arsen Semenov
Hi,

Also interested in this question.
As I know it's not implemented in the Kamailio module yet.
As for now I used kemi lua to talk to rtpengine NG over websocket
protocol.

On Thu, Mar 4, 2021 at 8:28 PM Alex Balashov 
wrote:

> Hi,
>
> Recent versions of RTPEngine (9.x+) implemented support for speaking the
> "NG" wire protocol over TCP, via the `--listen-tcp-ng` option.
>
> Does the Kamailio `rtpengine` module support this, and/or are there any
> plans to? We've run into a few scenarios where very large responses from
> RTPEngine can't make it back to Kamailio over the UDP protocol due to
> fragmentation problems in unique network settings like tunnels.
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


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


Re: [SR-Users] Kemi execute a route from configuration file

2021-01-22 Thread Arsen Semenov
Hi,

I think you haven't dreamed it, here was a thread called kemi - native
mixing, as I remember, where Daniel explained that it should be possible to
call routes from KEMI using KSR.cfgutils.route_if_exists() or KSR.route().


On Fri, Jan 22, 2021 at 3:39 PM David VILLAUME 
wrote:

> Hello,
>
>
>
> I was pretty sure there was a way to call a route from config file from
> Kemi, but I can’t find documentation about it.
>
>
>
> Does that really exists or did I dreamed it ?
>
>
>
> Regards,
>
> David
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


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


Re: [SR-Users] Kamailio as an LCR based on prices but also signaling quality indicators

2020-12-07 Thread Arsen Semenov
Hi,

You can try CGRateS. It could be easily integrated with kamailio and it has
LCR and QoS based routing as I remember..

Regards,

On Mon, Dec 7, 2020 at 6:31 PM Abdoul Osséni 
wrote:

> Hello,
>
> I am trying to configure kamailio as an LCR based on prices but also
> signaling quality indicators like ASR and ACDR.
>
> Can you please help me and tell me where to start?
>
> Regards
> Abdoul
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


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


Re: [SR-Users] KEMI and Native mixing

2020-10-22 Thread Arsen Semenov
Hi Marcin,
As a bit addition to the above comments
 once you set cfgengine to your prefered lang the routes become the
language's functions which should be defined, but you still can keep some
"event-routes" in native kamailio language, they are being initialised at
startup.
If you migrate a large script, I'd suggest you split it into several
logically or by route divided scripts, so by this way you can load/reload
and troubleshoot them separately. Testing framework could be much help.


Regards,


On Thu, Oct 22, 2020 at 10:13 PM Marcin Kowalczyk
 wrote:

> Hi,
>
>  Thanks for your reply.
> I have quite a large and complex kamailio.cfg and it would be quite a
> challenging task to migrate it in one go. This is the reason why I was
> thinking to do it block by block to be sure it will not break a logic.
>
> Regards
> Marcin
>
> On Wed, Oct 21, 2020 at 8:16 PM Henning Westerholt  wrote:
>
>> Hello,
>>
>>
>>
>> other people might be able to add more, but what you can certainly can do
>> is to have a usual kamailio.cfg and then use e.g. lua_run(..) to execute
>> some functions defined in the loaded lua script.
>>
>> In my opinion you will add some more complexity if you start to mix also
>> the routes, but it might be fine for a certain migration period.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *Marcin
>> Kowalczyk
>> *Sent:* Wednesday, October 21, 2020 7:25 PM
>> *To:* sr-users@lists.kamailio.org
>> *Subject:* [SR-Users] KEMI and Native mixing
>>
>>
>>
>> Hi,
>>
>>
>>
>>  Is it possible to mix both KEMI (lua) and Native configs in one kamailio
>> instance? So some blocks are called from native script and some others from
>> KEMI (lua)?
>>
>>
>>
>> Marcin
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


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


Re: [SR-Users] SIP message generator for Kamailio

2020-10-05 Thread Arsen Semenov
Hi Aymeric,

Can you please send a link to git repo with this tool?


Thanks

On Sat, Oct 3, 2020 at 9:05 PM Aymeric Moizard  wrote:

> Hi,
>
> In libeXosip, latest release or git, I have made a new tool named
> "sip_monitor".
>
> The dependencies are libosip and c-ares.
>
> The tool can build many REGISTER for any protocol (UDP, TCP, TLS) with
> many variant of request-uri, from and contact or TLS certificate.
>
> It could be extended for more options.
>
> The latest git has also a new outbound proxy setting to have a different
> request-uri.
>
> Aymeric
>
> Le sam. 3 oct. 2020 à 17:30, luke devon  a écrit :
>
>> Hi Team,
>>
>> May I check with you, Is there a SIP message generator available for the
>> Kamailio? I want to test my setup using some test SIP messages.
>>
>> Many Thanks
>> Luke.
>> ___
>> 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
>


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


Re: [SR-Users] SRTP/TLS BYE Problem with One of the Legs of the Call

2020-09-19 Thread Arsen Semenov
Hello Conrad,

Bit hard to say exactly without looking into logs/dumps but it seems like
your call is long enough so router (if you have one) could timeout on nat
tcp connection, thus the “bye” request can not reach uac. Just guessing.

Please check whether you have tcp keepalive enabled, example:
tcp_keepalive=yes
tcp_crlf_ping=yes
tcp_keepcnt=3
tcp_keepidle=30
tcp_keepintvl=30

Hope it helps.


On Sat, 19 Sep 2020 at 8:59 AM, conradcorde...@gmail.com <
conradcorde...@gmail.com> wrote:

> Hello,
>
>
>
> Thank you for your reading this and for your help.
>
>
>
> I'm a Kamailio newbie and managed to set up an edge proxy, which works
>
> perfectly on UDP traffic. I'm now attempting to deploy TLS/SRTP and
>
> everything almost works perfectly. The single issue I'm having is that
>
> when either of the parties to an SRTP/TLS call disconnect, the other
>
> party's call remains active. With UDP, when one of the parties
>
> disconnects the call, the other leg of the call receives the BYE command
>
> and the call automatically disconnects.
>
>
>
> This is how I have our infrastructure set up:
>
>
>
> 1. Twilio SIP Trunk with Secure Media enabled.
>
>
>
> 2. Kamailio 5.4.1 set up with TLS module, set to listen on TLS port
>
> 5061, SSL certificates from Let's Encrypt, route set to our phone system.
>
>
>
> 3. Phone system is Asterisk.
>
>
>
> As per above, everything works almost perfectly with TLS/SRTP. The only
>
> issue is that calls will not disconnect when one of the sides hang up.
>
> If I disable TLS/SRTP and use UDP only, everything works.
>
>
>
> Audio is just fine with TLS/SRTP.
>
>
>
> Does anyone know why calls with SRTP/TLS will not disconnect
>
> automatically when one of the parties ends the call?
>
>
>
> Thank you,
>
>
>
> Conrad
>
>
>
>
>
> ___
>
> Kamailio (SER) - Users Mailing List
>
> sr-users@lists.kamailio.org
>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>

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


Re: [SR-Users] Dispatcher stops working

2020-09-16 Thread Arsen Semenov
Hi Sergio,

Make sure your dispatcher probing parameters are set correctly. (reply
codes as well).

And if it happens again you can catch OPTIONS traffic with sngrep  "CSeq:
[0-9]+ OPTIONS"
and see what happens on this level.
Whether Kamailio does send pings, whether replies from gw are the same as
expected, etc.


Regards,

On Wed, Sep 16, 2020 at 5:55 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello
>
> I would start by looking at the logs when that happens. The gateway would
> only get marked "ip" when there is no reply by the gateway or when it
> replies with 500. Also OPTIONs not being replied promptly.
> Maybe add some logging right before ds_mark_dst("ip").
>
> Hope that helps,
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
>
> On Wed, Sep 16, 2020 at 11:40 AM Sergio Charrua 
> wrote:
>
>> Hello,
>>
>> Using Kamailio 5.1.6 for load balancing & failover,
>> I noticed that from time to time, and very rarely, the dispatcher module
>> stops dispatching to the Asterisk servers.
>> I have to execute a "kamcmd dispatcher reload" for it to (re)start
>> working.
>>
>> This is my dispatcher.list :
>> 1 sip:10.19.XXX.YYY:5060 0 1 duid=sipgw01;maxload=100
>> 1 sip:10.19.XXX.YYY:5060 0 2 duid=sipgw02;maxload=100
>> 1 sip:10.19.XXX.YYY:5060 0 3 duid=sipgw03;maxload=100
>> 1 sip:10.19.XXX.YYY:5060 0 4 duid=sipgw04;maxload=100
>>
>> This is my dispatch routes:
>> # Dispatch requests
>> route[DISPATCH] {
>>
>> if(!ds_select_dst("1", "10","4"))
>> {
>> xlog("L_INFO","no destination selected from dispatcher
>> list!");
>> send_reply("404", "No destination");
>> exit;
>> }
>>
>> xlog("L_INFO","going to <$ru> via <$du>\n");
>>
>> t_on_failure("RTF_DISPATCH");
>> route(RELAY);
>>
>> exit;
>>
>> }
>>
>> # Sample failure route
>> failure_route[RTF_DISPATCH] {
>> if (t_is_canceled()) {
>> exit;
>> }
>> xlog("L_INFO", "Media server $du failed to answer, selecting
>> other one!");
>> # next DST - only for 500 or local timeout
>> if ( t_check_status("500") || (t_branch_timeout() &&
>> !t_branch_replied()) )
>> {
>> #mark the destination Inactive and Probing
>> ds_mark_dst("ip");
>> if(ds_next_dst())
>> {
>> t_on_failure("RTF_DISPATCH");
>> route(RELAY);
>> exit;
>> }
>> }
>> }
>>
>> I suspect that the ds_mark_dst("ip") command in RTF_DISPACTH is the
>> cause.
>> Is there any think I can improve on this? Or any know bug with the
>> dispatcher in Kamailio 5.1.6 version?
>>
>> Thanks in advance,
>>
>> *Sérgio Charrua*
>>
>>
>> ___
>> 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
>


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


Re: [SR-Users] Kamailio World Updates Online - Celebration Party - Sep 2-3, 2020

2020-08-03 Thread Arsen Semenov
+1

Stay safe.

On Mon, Aug 3, 2020 at 3:17 PM Mark Boyce  wrote:

> Hi
>
> I’ll be there.  Bring your own drinks for the Virtual Bar networking
> session after :-?
>
> Cheers
> mark
>
> > On 3 Aug 2020, at 10:19, Daniel-Constantin Mierla 
> wrote:
> >
> > Hello,
> >
> > we are considering to organize a small online event to compensate a bit
> > the cancellation of Kamailio World 2020, but mainly to discuss about
> > what is new around Kamailio project and RTC space.
> >
> > The event was discussed among a couple developers several weeks ago,
> > when it was clear that the pandemic will last longer, preventing any
> > on-site event, and the intention to do it was also announced during the
> > recording of last ClueCon Weekly about Kamailio project at the beginning
> > of July
> > (
> https://www.kamailio.org/w/2020/07/cluecon-weekly-kamailio-updates-july-2020/
> ).
> >
> > The first commit of Kamailio code was done on the 3rd of September 2001,
> > thus this is like the project's birthday, so a good opportunity to
> > celebrate that as well.
> >
> > The event is planned to be 2 sessions of about 4 hours on each day, with
> > a few presentations per day, but try focus on open discussions about.
> > The goal is to keep in very informal, without any significant burden for
> > organizers or participants, not to add to the daily stress with work and
> > family in the pandemic time. It should be more like meetup style, with
> > no registration for participants, sessions may not be recorded and can
> > be done without slides. Likely we will use a (self-hosted) video
> > conferencing system (Jitsi) for presentations and the IRC or Matrix
> > channels for chatting.
> >
> > The time frames we look at are 15:00-19:00 Berlin time zone (13:00-17:00
> > UTC) on the 2nd and the 3rd of September 2020.
> >
> > The purpose of this email for now is to see the interest of the
> > community for such event, reply if you think it is useful to organize it
> > and you plan to participate.
> >
> > If there is interest, then I will follow up with more details about
> > speakers and the structure of the event.
> >
> > Cheers,
> > Daniel
> >
> > --
> > Daniel-Constantin Mierla -- www.asipto.com
> > www.twitter.com/miconda -- www.linkedin.com/in/miconda
> > Funding: https://www.paypal.me/dcmierla
> >
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Mark Boyce
> Dark Origins Ltd
> e: m...@darkorigins.com
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


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