[SR-Users] Re: [sr-dev] Releasing v5.8.2

2024-06-07 Thread Bastian Triller via sr-users
Please backport the geoip2 thingy from recently

8ba4ee4e00 ("geoip2: init MMDB_s global pointer and check on destroy")
e066613cac ("geoip2: do not close global MMDB_s on destroy")
4bd619d351 ("geoip2: rename global lock variable")
baccbe0298 ("geoip2: keep global structure per process")
293193c55c ("geoip2: clang format module file")
51dcab019a ("geoip2: Reload database before accessing it")

Thanks.

Regards,
Bastian

On Fri, Jun 7, 2024 at 8:12 PM Daniel-Constantin Mierla via sr-dev
 wrote:
>
> Hello,
>
> I am considering to release Kamailio v5.8.2 (out of branch 5.8) on
> Wednesday,
> June 12, 2024. If anyone is aware of issues not yet on the bug tracker,
> report them there asap in order to have a better chance to be fixed.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla (@ asipto.com)
> twitter.com/miconda -- linkedin.com/in/miconda
> Kamailio Consultancy, Training and Development Services -- asipto.com
>
>
> ___
> Kamailio (SER) - Development Mailing List
> To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
__
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: SSL key logger for Diffie-Hellman cipher

2024-02-27 Thread Bastian Triller via sr-users
Some weeks ago I learned about [1]. Didn't play with it yet though.


[1]
https://medium.com/@yunwei356/ebpf-practical-tutorial-capturing-ssl-tls-plain-text-using-uprobe-fccb010cfd64

On Tue, Feb 27, 2024, 02:08 Calvin E. via sr-users <
sr-users@lists.kamailio.org> wrote:

> This was done using the system-provided OpenSSL (Debian 12). It might work
> for tlsa, but I don't know how Kamilio would respond to LD_PRELOAD
> affecting one of its own modules.
>
> If your curious how it works, the code is here:
> https://github.com/voipmonitor/sniffer/blob/master/tools/ssl_keylogger/sslkeylog.cpp
>
> On Fri, Feb 2, 2024 at 1:23 AM Ihor Olkhovskyi via sr-users <
> sr-users@lists.kamailio.org> wrote:
>
>> Calvin,
>>
>> Thanks for sharing this, just a question, do you use system-provided
>> OpenSSL or tlsa ?
>>
>> Le mar. 30 janv. 2024 à 03:00, Calvin E. via sr-users <
>> sr-users@lists.kamailio.org> a écrit :
>>
>>> It turns out the system I was on really
>>> uses /lib/systemd/system/kamailio.service, despite /etc/init.d/kamailio
>>> also existing.
>>>
>>> I was able to make it work by following the Systemd process:
>>>
>>> mkdir /etc/default/kamailio.d/
>>> edit /etc/default/kamailio.d/voipmonitor
>>> add lines:
>>> SSLKEYLOG_UDP='127.0.0.1:1234'
>>> LD_PRELOAD="/usr/local/src/voipmonitor-git/tools/ssl_keylogger/sslkeylog.so
>>> /usr/lib/x86_64-linux-gnu/libssl.so.3"
>>>
>>> The keys are captured by the VoIPmonitor sniffer and everything works as
>>> expected from there. I'd be happy to explain further to anyone interested
>>> in this setup.
>>>
>>> On Sun, Jan 28, 2024 at 3:20 AM Sergey Safarov 
>>> wrote:
>>>
 You can check this PR
 https://github.com/kamailio/kamailio/pull/2785

 On Fri, Jan 26, 2024 at 8:58 PM Calvin E. via sr-users <
 sr-users@lists.kamailio.org> wrote:

> I've been tasked to use LD_PRELOAD to log SSL keys for TLS connections
> using a Diffie-Hellman cipher. The first attempt did not work, so I wanted
> to sanity check whether Kamailio's TLS support is built in such a way that
> would defeat LD_PRELOAD.
>
> The instructions from the vendor are to update /etc/init.d/kamailio
> like this:
>
> env SSLKEYLOG_UDP='127.0.0.1:1234'
> LD_PRELOAD="/usr/local/src/voipmonitor-git/tools/ssl_keylogger/sslkeylog.so
> /usr/lib/x86_64-linux-gnu/libssl.so.3" \
> start-stop-daemon --start --quiet --pidfile $PIDFILE \
> --exec $DAEMON -- $OPTIONS || log_failure_msg "
> already running"
>
> Is there anything special in Kamailio (5.7.3 on Debian 12) that would
> prevent this from working? Not necessarily something to defeat a 
> keylogger,
> but maybe the way tls.so gets loaded?
>
> The only discrepancy I've noticed is the vendor docs refer
> to libssl.so.3 not libssl.so.1, but the vendor said that should be OK.
>
> I'd love to hear from someone already using VoIPmonitor
> with Diffie-Hellman ciphers and Kamailio.
>
> __
> 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:
>>>
>>
>>
>> --
>> Best regards,
>> Ihor (Igor)
>> __
>> 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:
>
__
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: Building Debian packages for further modules

2024-02-22 Thread Bastian Triller via sr-users
followed your described steps and it worksforme on bullseye and bookworm.

% dpkg --contents ../kamailio-kafka-modules_5.7.4+bpo11_amd64.deb|grep '\.so$'
-rw-r--r-- root/root125992 2024-01-18 13:33
./usr/lib/x86_64-linux-gnu/kamailio/modules/kafka.so
% dpkg --contents ../kamailio-kafka-modules_5.7.4+bpo12_amd64.deb | grep '\.so$'
-rw-r--r-- root/root162816 2024-01-18 13:34
./usr/lib/x86_64-linux-gnu/kamailio/modules/kafka.so



On Wed, Feb 21, 2024 at 4:59 PM Christian Berger via sr-users
 wrote:
>
> Hi,
>
> for our workflow we build our own Debian packages for kamailio.
>
> We are currently trying and failing to create a package for the kafka
> modules.
>
> What we have tried so far:
> Adding the "Build-Depends:" entries for librdkafka-dev in debian/control
> Adding a "Package" in debian/control
> Adding kafka to the PACKAGE_GROUPS in debian/rules
>
> So far it seems to build the module and a package for it, but the
> package only contains metadata, but no .so file.
>
> We are currently running out of ideas. What else can we do?
>
> Best wishes
>Christian Berger
>
> --
>
> Christian Berger - ber...@sipgate.de
> Telefon: +49 (0)211-63 55 55-0
> Telefax: +49 (0)211-63 55 55-22
>
> sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
> HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
> Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391
>
> www.sipgate.de - www.sipgate.co.uk
> __
> 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:


kafka-bookworm.diff
Description: Binary data
__
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 query, if callid is handled by rtpengine module already?

2024-02-19 Thread Bastian Triller via sr-users
Check route[NATMANAGE] in default configuration [1]. Replies are
handled via branch flags.


[1] 
https://github.com/kamailio/kamailio/blob/dad7f3ff3af02d086c1cb3f915f1502bca127d58/etc/kamailio.cfg#L867-L916

On Mon, Feb 19, 2024 at 10:48 AM Benoit Panizzon  wrote:
>
> Hi Bastian
>
> > you can add a Record Route parameter to the initial INVITE [1] and for that
> > parameter after loose_route() for in-dialog INVITE [2]
>
> Thank you, that looks promising.
>
> But now I face another issue with parallel branching.
>
> On the branch route I do add_rr_param(";rtp=yes") if I need to backhaul
> RTP towards that $nh.
> I also set $avp(rtp) = 1 to engage rtpengine on transaction replies in
> my MANAGE_REPLY route.
>
> check_rr_param works fine on subsequent transactions. But not on the
> initial one with branches.
>
> But assume I got two parallel branches. One needs rtp backhauling, the
> other one does not.
>
> How can I, within my MANAGE_REPLY route, figure out, if I am
> processing a reply which needs backhauling or not?
>
> Mit freundlichen Grüssen
>
> -Benoît Panizzon-
> --
> I m p r o W a r e   A G-Leiter Commerce Kunden
> __
>
> Zurlindenstrasse 29 Tel  +41 61 826 93 00
> CH-4133 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __
__
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 query, if callid is handled by rtpengine module already?

2024-02-16 Thread Bastian Triller via sr-users
you can add a Record Route parameter to the initial INVITE [1] and for that
parameter after loose_route() for in-dialog INVITE [2]

[1]
https://www.kamailio.org/docs/modules/5.5.x/modules/rr.html#rr.f.add_rr_param
[2]
https://www.kamailio.org/docs/modules/5.5.x/modules/rr.html#rr.f.check_route_param

On Fri, Feb 16, 2024 at 4:25 PM Benoît Panizzon via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi
>
> I have come across this challenge:
>
> Initial invite (no to_tag) has is authenticated and has credentials. So
> a lookup for the username is made to determine if the customer needs
> backhauling, thus rtpengine needs to be engaged.
>
> On a subsequent invite (re-invite to change codec or to refresh
> session timer) there is a to_tag so it is being routed without sending
> a challenge and has no auth username.
>
> I don't use dialog on the registrar. This is another transaction. So I
> don't know, if I need to engage rtpengine on that DSP or not.
>
> What is the best way to find out, if rtpengine is already handling that
> callid?
>
> if(rtpengine_query_v("j", "$var(dummy)")) {
> rtpengine_manage();
> }
>
> basically works, but generates a couple of ugly error messages in the
> log as rtpengine_query_v does not find the call.
>
> Is there a nicer way?
>
> --
> Mit freundlichen Grüssen
>
> -Benoît Panizzon- @ HomeOffice und normal erreichbar
> --
> I m p r o W a r e   A G-Leiter Commerce Kunden
> __
>
> Zurlindenstrasse 29 Tel  +41 61 826 93 00
> CH-4133 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __
> __
> 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:


[SR-Users] Re: 3xx is not relayed to the caller if there are 2 or more branches in the transaction

2023-11-04 Thread Bastian Triller via sr-users
try t_cancel_branches() [1]

Regards,
Bastian

[1]
https://www.kamailio.org/docs/modules/5.5.x/modules/tmx.html#tmx.f.t_cancel_branches

On Sat, Nov 4, 2023 at 12:52 PM Михаил Горюцкий via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hello, I encountered such a problem:
> An INVITE request comes to Kamailio.
> Kamailio finds a location and forwards this INVITE to a device.
> The device receives a push notification and registers on a new IP: port.
> The tsilo module creates a new branch.
> And this branch sends the INVITE.
> The device responds with 100 -> 180 -> 302.
> 100 and 180 are forwarded to the calling subscriber, but anything greater
> than 300, such as 302, is not forwarded.
>
> DEBUG: tm [t_reply.c:1363]: t_should_relay_response(): ->
> T_code=180, new_code=302
> DEBUG: tm [t_reply.c:1448]: t_should_relay_response(): store - other
> branches still active
> DEBUG: tm [t_reply.c:1925]: relay_reply(): reply status=3 branch=1,
> save=1, relay=-1 icode=0 msg status=302
>
> Kamailio saves this code and does not pass it to the caller. Is there a
> way to immediately pass this 302? It seems like something can be done in
> t_on_branch_failure, which is invoked, but I can't figure out what needs to
> be done there.
>
> Is there a parameter that can solve my problem?
> A similar question has been asked before, but the link in Daniel's
> response leads to a non-existent ID:
> https://lists.kamailio.org/pipermail/sr-users/2009-March/022447.html
> __
> 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:


[SR-Users] Re: How to filter out xhttp request in event_route[siptrace:msg]

2023-10-17 Thread Bastian Triller via sr-users
docs read like you can filter on headers and body. So maybe
is_present_hf("Sia") works for filtering xhttp replies.

Regards,
Bastian

On Tue, Oct 17, 2023 at 1:54 PM Benoit Panizzon via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi
>
> Further trying to eliminate every possible cause of UDP drops...
>
> We use Homer as HEP server in conjunction with the siptrace module.
>
> So to prevent DQM traffic to be sent to Homer I added:
>
> event_route[siptrace:msg] {
> if(is_method("KDMQ")) {
> drop();
> }
> }
>
> And had a closer look to the traffic sent to homer.
>
> I noticed, also xhttp:requests, as far as I see the replies, not the
> requests, get mirrored to homer.
>
> xhttp is not a sip method I could match I guess.
>
> The event_route[siptrace:msg] docs state only method can be filtered.
> So I can not filter requests on the separate http port I listen on for
> xhttp json-rpc requests.
>
> How can I prevent xhttp traffic to be mirrored to homer by the siptrace
> module?
>
> Mit freundlichen Grüssen
>
> -Benoît Panizzon-
> --
> I m p r o W a r e   A G-Leiter Commerce Kunden
> __
>
> Zurlindenstrasse 29 Tel  +41 61 826 93 00
> CH-4133 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __
> __
> 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:


[SR-Users] Re: cdr_json_pre_encoded_prefix

2023-09-25 Thread Bastian Triller via sr-users
Documentation is wrong. Parameter is actually cdr_pre_encoded_prefix.

Regards,
Bastian

On Mon, Sep 25, 2023 at 8:17 AM Oleg Podguyko via sr-users <
sr-users@lists.kamailio.org> wrote:

> I try to usecdr_json_pre_encoded_prefix (string) parameters from
> acc_json module
>
>
> modparam("acc_json", "cdr_extra", "spx_resp=$avp(spx_resp)")
>
> modparam("acc_json", "cdr_json_pre_encoded_prefix", "spx_resp")
>
>
> do restart and get next mistakes:
>
>
> sep 22 14:17:15 vms-vms-spx-1 kamailio[581922]: *ERROR: 
> [core/modparam.c:169]: set_mod_param_regex(): parameter
>  of type <1:string> not found in module
> *
>
> сен 22 14:17:15 vms-vms-spx-1 kamailio[581922]: *CRITICAL: 
> [core/cfg.y:3686]: yyerror_at(): parse error in config file
> /etc/kamailio_vmsspx/modules.cfg, line 125, column 63: Can't set module
> parameter*
>
> sep 22 14:17:15 vms-vms-spx-1 kamailio[581922]: ERROR: bad config file (1
> errors) (parsing code: 0)
>
> sep 22 14:17:15 vms-vms-spx-1 systemd[1]: *kamailio_vmsspx.service:
> Control process exited, code=exited status=255*
>
> sep 22 14:17:15 vms-vms-spx-1 systemd[1]: *kamailio_vmsspx.service:
> Failed with result 'exit-code'.*
>
> What’s wrong?
> I used:
>
> [opodguyko@vms-vms-spx-1 ~]$ kamailio -version
>
> version: kamailio 5.5.3 (x86_64/linux) b02728-dirty
>
> 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
>
> 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: b02728 -dirty
>
> compiled on 15:35:46 Dec 15 2021 with gcc 8.3.1
>
> [opodguyko@vms-vms-spx-1 ~]$
>
> This parameter was added at release 5.5.0
>
> Oleg Podguyko
> __
> 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:


[SR-Users] Re: Kamailio stops processing UDP on one interface

2023-08-30 Thread Bastian Triller
Maybe it's not beneficial to have a receive buffer that high. If your
presence server is stateful, it will send retransmissions if packets get
dropped. But it will also send retransmissions if your proxy does not reply
fast enough. So your proxy may be damped by retransmissions. Did you check
SHM/active transactions on your proxy?

Regards,
Bastian

On Wed, Aug 30, 2023 at 3:56 PM Ihor Olkhovskyi 
wrote:

> They are increasing, actually
>
> # ss -l -u -m src X.X.X.X/Y
> State   Recv-Q Send-Q
> Local Address:Port
>Peer Address:Port
> UNCONN  25167616 0
> X.X.X.X:sip
>*:*
>  skmem:(r25167616,rb25165824,t0,tb65536,f2304,w0,o0,bl0,d514894)
>
> Le mer. 30 août 2023 à 15:04, Bastian Triller 
> a écrit :
>
>> Are drops increasing on that socket while it is happening?
>> ss -l src  -u sport 5060 -m
>>
>> On Tue, Aug 29, 2023 at 3:26 PM Ihor Olkhovskyi 
>> wrote:
>>
>>> Just to add some info
>>>
>>> netstat -nlp
>>> Active Internet connections (only servers)
>>> Proto Recv-Q Send-Q Local Address   Foreign Address
>>> State   PID/Program name
>>> ...
>>> udp   25167616  0 :5060 0.0.0.0:*
>>>   211759/kamailio
>>> ...
>>>
>>> So I see a huge Receive Queue on UDP for Kamailio which is not clearing.
>>>
>>> Le mar. 29 août 2023 à 14:29, Ihor Olkhovskyi 
>>> a écrit :
>>>
>>>> Hello,
>>>>
>>>> I've faced a bit strange issue, but a bit of preface. I have Kamailio
>>>> as a proxy (TLS/WS <-> UDP) and second Kamailio as a presence server. At
>>>> some point presence server accepts around 5K PUBLISH within 1 minute and
>>>> sending around the same amount of NOTIFY to proxy Kamailio.
>>>>
>>>> Proxy is "transforming" protocol to TLS, but at sime point I'm starting
>>>> to get these type of errors
>>>>
>>>> tm [../../core/forward.h:292]: msg_send_buffer(): tcp_send failed
>>>> tm [t_fwd.c:1588]: t_send_branch(): sending request on branch 0 failed
>>>> 

[SR-Users] Re: Kamailio stops processing UDP on one interface

2023-08-30 Thread Bastian Triller
Are drops increasing on that socket while it is happening?
ss -l src  -u sport 5060 -m

On Tue, Aug 29, 2023 at 3:26 PM Ihor Olkhovskyi 
wrote:

> Just to add some info
>
> netstat -nlp
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address State
>   PID/Program name
> ...
> udp   25167616  0 :5060 0.0.0.0:*
> 211759/kamailio
> ...
>
> So I see a huge Receive Queue on UDP for Kamailio which is not clearing.
>
> Le mar. 29 août 2023 à 14:29, Ihor Olkhovskyi  a
> écrit :
>
>> Hello,
>>
>> I've faced a bit strange issue, but a bit of preface. I have Kamailio as
>> a proxy (TLS/WS <-> UDP) and second Kamailio as a presence server. At some
>> point presence server accepts around 5K PUBLISH within 1 minute and sending
>> around the same amount of NOTIFY to proxy Kamailio.
>>
>> Proxy is "transforming" protocol to TLS, but at sime point I'm starting
>> to get these type of errors
>>
>> tm [../../core/forward.h:292]: msg_send_buffer(): tcp_send failed
>> tm [t_fwd.c:1588]: t_send_branch(): sending request on branch 0 failed
>> 

[SR-Users] Re: Route Header based routing for initial INVITE

2023-04-28 Thread Bastian Triller
Check
https://www.kamailio.org/docs/modules/5.5.x/modules/rr.html#rr.f.loose_route
and
https://www.kamailio.org/docs/modules/5.5.x/modules/rr.html#rr.f.loose_route_preloaded

Regards,
Bastian

On Fri, Apr 28, 2023 at 7:48 AM harneet singh  wrote:

> Can anyone help here plz?
>
> On Wed, Apr 26, 2023 at 7:28 PM harneet singh  wrote:
>
>> Hi Experts,
>>
>> I believe the loose_route() in kamailio can be used for initial Out of
>> the dialog INVITE processing as well. Is that the correct understanding?
>> If so, the request will be forwarded ahead to the destination
>> corresponding to the Route Header remaining (if any) after Kamailio has
>> stripped off it's own Address(es) from the Route Header(s). Is that correct?
>>
>> Regards,
>> Harneet Singh
>>
>> --
>> "Once you eliminate the impossible, whatever remains, no matter how
>> improbable, must be the truth" - Sir Arthur Conan Doyle
>>
>
>
> --
> "Once you eliminate the impossible, whatever remains, no matter how
> improbable, must be the truth" - Sir Arthur Conan Doyle
> __
> 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:


Re: [SR-Users] Syncing Registration Database across Kamailio Pairs

2022-08-09 Thread Bastian Triller
Maybe you have to enable another dmq_usrloc modparam [1]

[1]
https://www.kamailio.org/docs/modules/5.6.x/modules/dmq_usrloc.html#usrloc_dmq.p.replicate_socket_info

On Tue, Aug 9, 2022 at 4:38 PM harneet singh  wrote:

> Hi Experts,
>
> We have been using Kamailio in an Active/Standby Pair(with Keepalived
> under the rugs moving the single Virtual IP to access the Active Kamailio)
> for sometime now. *Kamailio also acts as a Registrar for our webrtc
> endpoints. *
> It has been serving the purpose pretty well and now we have a requirement
> where we need to be syncing the Registration DB between Two Pairs of
> Kamailios.
>
>  Kamailio-Active(*Pair 1*)  Kamailio-Standby(*Pair 1*)
>   ||
>  Kamailio-Active(*Pair 2*)  Kamailio-Standby(*Pair 2*)
>
> We generally keep the counterpart in the same Pair as a notifier( 
> *modparam("dmq",
> "notification_address", "sip:PEER1_IP:5060")* ) so as to sync the dialogs
> and the userloc data too( *modparam("dmq_usrloc", "enable", 1) * ).
> In order to achieve the said requirement with the other Pair, we added
> another "*notification_address*" in the kamailio cfg. At this point, we
> ran into weird issues.
>
> *1. *With Kamailio ver *5.3.2, *the subsequent *notification_address *line
> in the cfg file, seemed to be overriding the previous one. Hence we see
> only the latter peer in the dmq list nodes.
> Example:
> modparam("dmq", "notification_address", "sip:*172.27.45.77*
> :5090")
>  modparam("dmq", "notification_address", "sip:*172.27.45.200*
> :5090")
>
> In this case, the "*kamcmd dmq.list_nodes*" would show the local
> Machine and 172.27.45.200 as the only nodes in the output, ie *172.27.45.77
> is not showing up at all,* which is problematic, since the local
> machine(172.27.45.243 in our case) would not been able to send any dmq sync
> info to its peer(172.27.45.77) in the same Pair.
>
>   To see if the above issue might have been addressed in later release, we
> upgraded to the latest Kamailio ver *5.6.0*
> *To our respite, the above issue no longer exists in the new version*(though
> not sure which immediate release after v 5.3.2 it would have been initially
> fixed.)
> This is where we have a new issue explained below:
>
> *2. *The registration data does get synced to the peer Kamailio in the
> same Pair, and also to the Kamailio instances in the other Pair. However,
> the *Socket* Parameter in "*kamctl ul show*" output shows *[not set] *even
> on the side where the websocket connection actually exists.
>
> [root@localhost ~]# *kamctl ul show *
> {
>   "jsonrpc":  "2.0",
>   "result": {
> "Domains":  [{
> "Domain": {
>   "Domain": "location",
>   "Size": 1024,
>   "AoRs": [{
>   "Info": {
> "AoR":  "9008077221",
> "HashID": 1952082106,
> "Contacts": [{
> "Contact":  {
>   "Address":  "sip:Harneet_qifir@172.24.58.210",
>   "Expires":  159,
>   "Q":  -1,
>   "Call-ID":  "vfli2uv8du3ppda73q5ppe",
>   "CSeq": 106,
>   "User-Agent": "EngageDigital",
>   "Received": "sip:172.27.44.252:60070;transport=ws",
>   "Path": "[not set]",
>   "State":  "CS_NEW",
>   "Flags":  0,
>   "CFlags": 0,
>  * "Socket": "[not set]",   <<*
>   "Methods":  7071,
>   "Ruid": "uloc-62f26e3b-2677-1",
>   "Instance":
> "",
>   "Reg-Id": 1,
>   "Server-Id":  0,
>   "Tcpconn-Id": -1,
>   "Keepalive":  0,
>   "Last-Keepalive": 1660063892,
>   "KA-Roundtrip": 0,
>   "Last-Modified":  1660063892
> }
>   }]
>   }
> }
>   ],
>
> In order to confirm that the socket actually exists on this Kamailio
> instance, I am pasting the below outputs from the same machine, where ws
> dump and even the native netstat confirms that.
>
> [root@localhost ~]# *netstat -tunelap | grep 60070*
> tcp0  0 172.27.45.199:8080  172.27.44.252:*60070*
> *ESTABLISHED* 99417322355   16230/kamailio
> [root@localhost ~]# *kamcmd ws.dump*
> {
> connections: {
> 1: ws:172.27.44.252:*60070* -> ws:172.27.45.199:8080 (state: *OPEN*,
>  last used 24s ago, sub-protocol: sip)
> }
> info: {
> wscounter: 1
> truncated: no
> }
> }
>
> We do need to distinguish the actual Kamailio instance where the websocket
> connection actually exists, so as to route the call ahead from the same
> instance, or if it does not exist(and it's merely a sync'ed registration
> data received over DMQ Channel), then the 

Re: [SR-Users] How to externally trigger htable cache flushing?

2022-07-18 Thread Bastian Triller
Also, htable.flush table isn't replicated via DMQ, IIRC

On Mon, Jul 18, 2022, 11:07 Henning Westerholt  wrote:

> Hello,
>
> you can delete keys with RPC commands:
>
>
> https://kamailio.org/docs/modules/5.5.x/modules/htable.html#htable.rpc.delete
>
>
> Cheers,
>
> Henning
>
> --
> Henning Westerholt – https://skalatan.de/blog/
> Kamailio services – https://gilawa.com
>
> -Original Message-
> From: sr-users  On Behalf Of Benoit
> Panizzon
> Sent: Monday, July 18, 2022 9:45 AM
> To: Kamailio (SER) - Users Mailing List 
> Subject: [SR-Users] How to externally trigger htable cache flushing?
>
> Hi List
>
> We cache stuff like call forwarding information in a htable cache to
> minimizie SQL lookups and have it available via DMQ on all instances.
>
> But of course, if the call forwarding information for a destination
> changes in the database, we would like to flush either the whole cache, or
> even better, that single entry.
>
> What is the best way to do this?
>
> Mit freundlichen Grüssen
>
> -Benoît Panizzon-
> --
> I m p r o W a r e   A G-Leiter Commerce Kunden
> __
>
> Zurlindenstrasse 29 Tel  +41 61 826 93 00
> CH-4133 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __
>
> __
> 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


Re: [SR-Users] usage of {s.urldecode.param} to convert special chars (why is + removed?)

2022-07-14 Thread Bastian Triller
Try {s.unescape.user}

https://www.kamailio.org/wiki/cookbooks/5.5.x/transformations#sescapeuser

On Thu, Jul 14, 2022, 13:52 Benoit Panizzon  wrote:

> Hi List
>
> Service Numbers, like to activate CFW probably often start with * and
> end with a #
>
> # is a special character that needs to be urlencoded in an SIP URI. So
> best would be to use a generic kamailio urldecode transormation. I guess
> {s.urldecode.param} is what I was looking for.
>
> So when I get a call to the 'enable CFW' service I get
>
> $rU =>  "*21+41999%23"
>
> So I want to extract the destination number and remove the urlencoded #
> sign.
>
> So I do $var(cfw-dest) =
> $var(cfw-dest) = $rU;
> $var(cfw-dest) = $(var(cfw-dest){s.substr,3,0}); # "+41999%23"
> $var(cfw-dest) = $(var(cfw-dest){s.urldecode.param});
>
> But now I end up with 41999#  the + sigh disappeared.
>
> Is this expected behavior? How would this be done the correct way?
>
> Mit freundlichen Grüssen
>
> -Benoît Panizzon-
> --
> I m p r o W a r e   A G-Leiter Commerce Kunden
> __
>
> Zurlindenstrasse 29 Tel  +41 61 826 93 00
> CH-4133 PrattelnFax  +41 61 826 93 01
> Schweiz Web  http://www.imp.ch
> __
>
> __
> 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


Re: [SR-Users] Info: converting dokuwiki content to markdown files

2022-05-10 Thread Bastian Triller
Fiddled around w/ pandoc [1]

[1] https://github.com/kamailio/kamailio-wiki/pull/3

On Tue, May 10, 2022 at 9:08 AM Henning Westerholt  wrote:
>
> Hello,
>
>
>
> thanks Seven for your feedback.
>
>
>
> I have made good experiences with static site generators that just generate 
> html that you can serve with standard web servers.
>
>
>
> I did not personally have used it, but I heard that hugo works well and is 
> used a lot. I personally have used gravcms, which is based on PHP.
>
>
>
> You can easily combine this static generators with some cron job and it 
> should work for our existing setup by just adding another path to the apache.
>
> In my experience this is easier as having another app to deploy, monitor and 
> frequently update.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> From: sr-users  On Behalf Of 
> Daniel-Constantin Mierla
> Sent: Tuesday, May 10, 2022 8:29 AM
> To: Seven Du ; Kamailio (SER) - Users Mailing List 
> 
> Subject: Re: [SR-Users] Info: converting dokuwiki content to markdown files
>
>
>
> Thanks, I will check them.
>
> Ideally it is an app that can run on or behind a http server/proxy and serve 
> html pages generated from the .md files directly from the folder with the 
> clone of the github repo. But maybe I ask too much and adapting the wiki 
> structure for a static site generator from .md files is enough or even better.
>
> Cheers,
> Daniel
>
> On 10.05.22 00:28, Seven Du wrote:
>
> We'd like to help.
>
>
>
> Select one from Jekyll, Hugo and TailwindBlog
>
>
>
> Jekyll: Ruby based https://jekyllrb.com/, can directly convert to html by 
> github
>
> Hugo: Go based,  can also auto covert to html 
> https://gohugo.io/hosting-and-deployment/hosting-on-github/
>
> TailwindBlog: Next.js based 
> https://github.com/timlrx/tailwind-nextjs-starter-blog
>
>
>
> We built a few websites with the TailwindBlog recently and it looks very 
> good. But as all JS projects, you have to download a giant deps of 
> node_modules and build locally manually to generate static html pages, we 
> haven't found how to do it automatically, since our updates are not frequent, 
> we are ok to do it by hand.
>
>
>
> There may be other options. Anyway, look and discuss, as long as it's 
> determined we can help to build.
>
>
>
> As a reference, these are sites we just built recently:
>
>
>
> - https://xswitch.cn/
>
> - http://rts.cn/
>
>
>
>
>
>
>
> On Mon, May 9, 2022 at 8:11 PM Daniel-Constantin Mierla  
> wrote:
>
> Hello,
>
> it was discussed a couple of times during the past Kamailio development
> meetings and several days ago the works started to convert the Kamailio
> Wiki content to markdown format and host the files on Kamailio
> github.com organisation.
>
> The Dokuwiki engine has served us very well during more than a decade
> and a half, but open editing had to be disabled many years ago due to
> bad actors pushing inappropriate content. The contributors had to make a
> dedicated account on our portal only for Wiki editing. More recently we
> had add another layer of protection requiring to grant manually edit
> permissions to newly created wiki accounts because bots started to work
> around CAPTCHA and other security extensions, posting again
> inappropriate content.
>
> All these added to operational overhead, but also made it difficult for
> new people to contribute, specially for small editing to fix typos or
> add usage examples.
>
> Thanks to Kenneth Stowe, who undertook the first big effort of
> converting the Dowkuwiki files to markdown format, we are now in the
> position of moving further with the plans of using github for hosting
> the content of the wiki and enable easier contributions via pull
> requests. The history of changes done via Dokuwiki show up now as git
> commits.
>
> The github repository for the wiki content is available at:
>
>   * https://github.com/kamailio/kamailio-wiki
>
> It is still work in progress, therefore we ask for the help of community
> to speed up the conversion, among the tasks that need to be done:
>
>   * convert relative links between wiki pages – the conversion tools
> used relative paths without file extensions, like:
>
> [Install Kamailio v4.4.x From GIT](/install/4.4.x/git)
>
> They have to be converted to relative path with .md extension in order
> to be able to browse directly :n the github.com portal — practically the
> leading / has to be removed and .md added at the end, like:
>
> [Install Kamailio v4.4.x From GIT](install/4.4.x/git.md)
>
>   * some section heading markers were not detected/converted, onee may
> notice many equal signs (=) around a section name, it has to be replaced
> with the appropriate markdown format based on hash signs (#). For example:
>
> === Install And Maintain Kamailio v4.4.x From GIT ===
>
> Should be converted to:
>
> # Install And Maintain Kamailio v4.4.x From GIT
>
>   * some Dokuwiki paragraphs used special formatting based on plugins,
> for example the notes, warnings, … had special colors. The common
> 

Re: [SR-Users] Tips on picking random element from a list

2022-05-04 Thread Bastian Triller
http://www.kamailio.org/wiki/cookbooks/5.5.x/core#arithmetic_operations

$RANDOM mod 100

Should give you random ints between 0 and 99.


On Wed, May 4, 2022, 03:41 Joel Serrano  wrote:

> I did, but I don't see how to limit the range:
>
> From the docs: Returns a random value from the [0 - 2^31) range.
>
> Is there a way to limit the range from 1-100 for example? Or maybe the way
> is to use $RANDOM and just rely on the first/last 2 digits (essentially a
> 00-99 range)?
>
>
> On Tue, May 3, 2022 at 10:40 AM Henning Westerholt  wrote:
>
>> Hello,
>>
>>
>>
>> what about just using this PV:
>> https://kamailio.org/docs/modules/5.5.x/modules/cfgutils.html#idm438
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *Joel
>> Serrano
>> *Sent:* Tuesday, May 3, 2022 6:20 PM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] Tips on picking random element from a list
>>
>>
>>
>> Hi Everyone,
>>
>>
>>
>> I have to implement a flow where outbound calls get their caller-id set
>> with a random number from a pool.
>>
>>
>>
>> I've been looking around and, as most of the time, there are tons of ways
>> to implement something like this... This is a simple implementation, the
>> number pool is fixed and will not change (so I could have it hard-coded in
>> the config if required).
>>
>>
>>
>> My initial approach was:
>>
>>
>>
>> 1- Try to keep it simple, with no dependencies, and all done in the
>> config script.
>>
>> 2- If #1 is "ugly", then I'd probably go with some inline code using
>> python/lua/etc
>>
>> 3- If #2 is "ugly", then I'd go with having the info in a DB and just run
>> a query
>>
>>
>>
>> I think #2 and #3 might be overkill for something so "simple" but I
>> haven't had to work too much with randomness in Kamailio, so any
>> tips/suggestions on where to store the number list and how to pick one
>> randomly would be awesome!
>>
>>
>>
>> Thanks!!
>>
>> Joel.
>>
>>
>>
> __
> 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


Re: [SR-Users] Fwd: CDR preserve original call direction

2022-02-10 Thread Bastian Triller
Check if rr module is loaded before acc and rr's parameter append_from_tag
is set to 1.

http://www.kamailio.net/docs/modules/5.3.x/modules/rr.html#rr.p.append_fromtag_id
http://www.kamailio.net/docs/modules/5.3.x/modules/acc.html#idm211

On Thu, Feb 10, 2022, 17:29 Ahmed Fouad  wrote:

> Thanks for the reply but like I mentioned I tried to enable/disable
> direction parameter but didn't help.
> --
> *From:* sr-users  on behalf of
> Ovidiu Sas 
> *Sent:* Thursday, February 10, 2022 12:44:39 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Fwd: CDR preserve original call direction
>
>
> Check the documentation and adjust your config accordingly:
>
> http://www.kamailio.net/docs/modules/5.3.x/modules/acc.html#acc.p.detect_direction
>
> modparam("acc", "detect_direction", 1)
>
> In your config is set to 0.
>
> Regards,
> Ovidiu Sas
>
> On Wed, Feb 9, 2022 at 08:01 Ahmed Fouad  wrote:
>
>
> Hi,
>
> I've enabled ACC and CDR logging and it's working fine for the logging but
> I noticed something wrong in the CDR table , the call source and
> destinations are depending on the BYE message not the initial invite dialog
>
> ACC table
>
> +-++--+-+---+---+--+--+--+
> | id  | method | callid   | time
>  | src_ip| src_domain| src_user | dst_ouser
>  | dst_domain   |
>
> +-++--+-+---+---+--+--+--+
> | 216 | BYE| 81fa79a0-3deb-47b6-80ab-831a78a5d46e | 2022-02-09
> 06:57:51 | x.x.x.x  | domain.com   |  DST_CLID |  SRC_CLID |
> domain.com  |
> | 215 | INVITE | 81fa79a0-3deb-47b6-80ab-831a78a5d46e | 2022-02-09
> 06:55:17 | x.x.x.x  | domain.com  | SRC_CLID   | DST_CLID |
> dst_domain.com|
>
> The INVITE is the correct one with SRCIP x.x.x.x and domain.com but the
> BYE reversed the order since the the DST_CLID who sent the BYE so it's now
> logged as the source
>
> and the final CDR log looks like
>
>
> ++--+---+--+--+-+-+--+-+---++---+-+
> | cdr_id | src_username | src_domain| dst_username |
> dst_domain   | call_start_time | call_end_time
>
>
> ++--+---+--+--+-+-+--+-+---++---+-+
> |195 |  DST_CLID | domain.com   |  SRC_CLID | domain.com
>  | 2022-02-09 06:55:12 | 2022-02-09 06:57:51 |
>
> the CDR as shown is reversed regarding the source/dst username
>
> I tried to enable the direction ACC direction flag but didn't help and
> here is my current paramters
>
> modparam("acc", "early_media", 0)
> modparam("acc", "report_ack", 0)
> modparam("acc", "report_cancels", 0)
> modparam("acc", "detect_direction", 0)
> modparam("acc", "log_flag", FLT_ACC)
> modparam("acc", "log_missed_flag", FLT_ACCMISSED)
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdrs_table", "cdrs")
>
> Can you please advise how to configure ACC/CDR to log the CDR with the
> correct initial INVITE call flow regardless of the BYE direction ?
>
> __
> 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
>
> --
> VoIP Embedded, Inc.
> http://www.voipembedded.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


Re: [SR-Users] UAC reg_random_delay

2021-11-03 Thread Bastian Triller
Try lowering timer interval. As I checked w/ a handful of registrations, on
start, Kamailio only sent one registration and on next timer the rest of it.

On Wed, Nov 3, 2021, 04:41 Sergiu Pojoga  wrote:

> Hi Henning,
>
> That's my understanding as well, but in reality seems like it all happens
> simultaneously, without some kind of delay.
>
> Here's what I have:
>
>- *modparam("uac", "reg_random_delay", 20)*
>- 10 uac records
>- expires=300
>- reg_delay=0
>
>
> kamcmd uac.reg_dump | egrep delay
> reg_delay: 13
> reg_delay: 7
> reg_delay: 3
> reg_delay: 2
> reg_delay: 8
> reg_delay: 1
> reg_delay: 2
> reg_delay: 14
> reg_delay: 17
> reg_delay: 18
>
> Following restart of Kamailio:
>
>- 1st  x10 REGISTERs are all sent out the same millisecond.
>- Contacts saved, received 200 OK with Expires: 300
>- after 280 seconds, another x10 REGISTERs are all sent out the same
>millisecond
>- and so on
>
> Thanks.
>
> On Tue, Nov 2, 2021 at 2:59 PM Henning Westerholt  wrote:
>
>> Hello,
>>
>>
>>
>> this are two different concepts:
>>
>>
>>
>>- reg_random_delay is a global parameter to randomize the
>>registration delay for the records
>>- reg_delay is a parameter for the individual contacts
>>
>>
>>
>> So it seems to randomize the reg_delay value due to the set
>> reg_random_delay for records with reg_delay = 0.
>>
>> Could you maybe also observe a second registration after the initial
>> registration, if it stills send out all requests the same time?
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *Sergiu
>> Pojoga
>> *Sent:* Monday, November 1, 2021 4:20 PM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] UAC reg_random_delay
>>
>>
>>
>> Hi there,
>>
>>
>>
>> May I know what exactly is supposed to be "delayed" in the UAC
>> registration?
>>
>>
>>
>> *modparam("uac", "reg_random_delay", 20)*
>>
>>
>>
>> I have records stored in DB with * reg_delay=0*. When doing
>> *uac.reg_dump*, I do see the value of *reg_delay* being random for
>> various records.
>>
>>
>>
>> However, after restarting Kamailio, the registrations are all sent out
>> *simultaneously*, there doesn't seem to be a "delay", whatever the
>> purpose is supposed to be.
>>
>>
>>
>> Can someone clarify please?
>>
>>
>>
>> Kamailio 5.5.0
>>
>>
>>
>> Thanks. Regards,
>>
>> --Sergiu
>>
> __
> 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


Re: [SR-Users] Manage blacklisting on network errors

2021-10-11 Thread Bastian Triller
configure xavp_dst like
modparam("dispatcher", "xavp_dst", "_dsdst_")
and use $xavp(_dsdst_=>uri) in failure/reply route

On Mon, Oct 11, 2021 at 6:39 PM Marat Gareev  wrote:

> Hello again,
>
> Related question: how to log destination ip/port of dispatcher set from
> failure_route?
>
> $si:$sp works as expected in onreply_route block:
> onreply_route[MANAGE_REPLY] {
> xlog("L_NOTICE", "$rr ($rs) [$cs] ($ci) $si:$sp - $ua\n");
> if ( t_check_status("(503)|(408)|(480)") ) {
> xlog("L_WARN", "Server will be blacklisted: $si:$sp ($rs)\n");
> }
> }
>
> I tried to use this example
> http://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#t_req_pv,
> but get :
> failure_route[MANAGE_FAILURE] {
>
> if ( !t_check_status("(503)|(408)|(480)") ) {
> exit;
> }
>
> xlog("L_WARN", "Server will be blacklisted: $T_rpl($si):$T_rpl($sp)\n");
> ds_mark_dst("IP"); # Set current server to probbing state
> $si:$sp without T_rpl returns address and port of client.
>
> Marat
>
> вт, 14 сент. 2021 г. в 14:09, Henning Westerholt :
>
>> Hello,
>>
>>
>>
>> regarding your previous question:
>>
>> “How can such cases be managed and how can they be logged?”
>>
>>
>>
>> If you want to log the case that a destination goes offline, as mentioned
>> have a look to the dispatcher event routes at the bottom of the docs.
>>
>>
>>
>> If you have another question, please elaborate. 
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* Marat Gareev 
>> *Sent:* Tuesday, September 14, 2021 1:02 PM
>> *To:* Henning Westerholt 
>> *Cc:* Kamailio (SER) - Users Mailing List 
>> *Subject:* Re: [SR-Users] Manage blacklisting on network errors
>>
>>
>>
>> Hello,
>>
>>
>>
>> Thank you for replying, but I don't understand how it will help me.
>>
>>
>>
>> I already use ds_mark_dst() and know how it works. Problem is that I
>> can't control network errors with like this:
>>
>> if (network_error() || *timeout*()) {
>>
>> xlog("L_WARN", "Server $si:$sp has network problems and will be
>> blacklisted.\n");
>>
>> ds_mark_dst("IP");
>>
>> }
>>
>>
>>
>> Marat
>>
>>
>>
>> вт, 14 сент. 2021 г. в 13:33, Henning Westerholt :
>>
>> Hello,
>>
>>
>>
>> you probably want to check the dispatcher module docs out for this
>> ds_mark_dst(..) function. You find also some RPC commands to e.g. inspect
>> on shell. You can also try the event-routes documented there to log some
>> info.
>>
>>
>>
>>
>> https://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.f.ds_mark_dst
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *Marat
>> Gareev
>> *Sent:* Thursday, September 9, 2021 8:02 PM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] Manage blacklisting on network errors
>>
>>
>>
>> Hello!
>>
>>
>>
>> I have a simple config for routing requests with failover and
>> blacklisting on 408, 480 and 503 codes from servers.
>>
>>
>>
>> This is a part of config:
>>
>> *# Wrapper for relaying requests*
>>
>> *route[**RELAY**]* {
>>
>>
>>
>>   *# the base event routes*
>>
>>   t_on_branch("MANAGE_BRANCH");
>>
>>   t_on_reply("MANAGE_REPLY");
>>
>>   t_on_failure("MANAGE_FAILURE");
>>
>>
>>
>>   if (!t_relay()) {
>>
>> sl_reply_error();
>>
>>   }
>>
>>   *exit*;
>>
>> }
>>
>>
>>
>> *# Manage incoming replies*
>>
>> *onreply_route[**MANAGE_REPLY**]* {
>>
>>   xlog("L_NOTICE", "$rr ($rs) [$cs] ($ci) $si:$sp - $ua\n");
>>
>>   if ( t_check_status("(503)|(408)|(480)") ) {
>>
>> xlog("L_WARN", "Server will be blacklisted: $si:$sp ($rs)\n");
>>
>>   }
>>
>> }
>>
>>
>>
>> *# Manage failure routing cases*
>>
>> *failure_route[**MANAGE_FAILURE**]* {
>>
>>
>>
>>   if ( !t_check_status("(503)|(408)|(480)") ) {
>>
>> *exit*;
>>
>>   }
>>
>>
>>
>>   ds_mark_dst("IP"); *# blacklist*
>>
>>
>>
>>   if (t_is_canceled()) *exit*;
>>
>>
>>
>>   if (!ds_next_domain()) {
>>
>> send_reply("503", "Service Unavailable");
>>
>> *exit*;
>>
>>   }
>>
>>
>>
>>   *route(**RELAY**)*;
>>
>> }
>>
>>
>>
>> If there is a timeout or network error on the server side, it is
>> blacklisted. How can such cases be managed and how can they be logged?
>> I didn't find this on the module page:
>>
>> https://www.kamailio.org/docs/modules/stable/modules/tm.html
>>
>>
>>
>> __
> 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 

Re: [SR-Users] Understanding regex format for subst_hf

2021-10-06 Thread Bastian Triller
since your using an "if (...)" anyways, you can prolly do this w/ if
(!($hdr(X-My) =~ "^(one|two|three)")) subst_hf("X-My", "/^(.)/prefix \1/",
"a");

Regards,
Bastian

On Mon, Oct 4, 2021 at 7:47 PM Joel Serrano  wrote:

> Update:
>
> I managed to achieve it using the "regex" module with "pcre_match()", that
> will take negative lookahead nicely.
>
>
>
> On Mon, Oct 4, 2021 at 10:18 AM Joel Serrano  wrote:
>
>> Hey guys,
>>
>> I'm trying to do a replacement regex using subst_hf but I can't seem to
>> get the format right and the docs are confusing.
>>
>> *subst_hf: *docs say it uses perl-like regex (as I understand it, that
>> would mean PCRE). Docs also say in the 'subexp' param that it uses the same
>> format as *subst.*
>>
>> *subst: *at the beginning it says it uses perl or sed format, but in the
>> '/re/repl/flags' param it says that sed format.
>>
>>
>> https://www.kamailio.org/docs/modules/devel/modules/textops.html#textops.f.subst_hf
>>
>> 4.20.  subst_hf(hf, subexp, flags)
>>
>> Perl-like substitutions in the body of a header field.
>>
>> Meaning of the parameters is as follows:
>>
>>-
>>
>>*hf* - header field name.
>>-
>>
>>*subexp* - substitution expression in the same format as of the
>>'subst' function parameter.
>>-
>>
>>*flags* - control flags - it has to be one of: a - all headers
>>matching the name; f - only first header matching the name; l - only the
>>last header matching the name.
>>
>>
>> 4.16.  subst('/re/repl/flags')
>>
>> Replaces re with repl (sed or perl like).
>>
>> Meaning of the parameters is as follows:
>>
>>-
>>
>>*'/re/repl/flags'* - sed like regular expression. flags can be a
>>combination of i (case insensitive), g (global) or s (match newline don't
>>treat it as end of line).
>>
>>'re' - is regular expression
>>
>>'repl' - is replacement string - may contain pseudo-variables
>>
>>'flags' - substitution flags (i - ignore case, g - global)
>>
>>
>>
>>
>>
>> I'm trying to use this:
>>
>> subst_hf("X-myheader", "/^(?!string1 |example2-|text3 )(.*)/myprefix
>> \1/", "a")
>>
>> In an online tester using PCRE, the format is correct, but Kamailio
>> doesn't like it:
>>
>> Oct  4 09:29:16 cops-n1 cops[15957]: ERROR:  [core/re.c:285]:
>> subst_parser(): bad regular expression ^(?!string1 |example2-|text3 )(.*)
>> in /^(?!string1 |example2-|text3 )(.*)/myprefix \1/
>>
>>
>> If I remove the negative lookahead chars (?!) then kamailio doesn't
>> complain but the regex doesn't do what I want.
>>
>> Does this mean that Kamailio won't support negative lookahead for subst
>> regex replacements?
>>
>> What I'm trying to achieve is something along:
>>
>> "If the value of the header Myheader doesn't start with ABC, DEF or HIJ,
>> then prefix it with XYZ"
>>
>> Any suggestions/ideas on how to achieve this?
>>
>>
>> Thanks,
>> Joel.
>>
>>
>>
>> __
> 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


Re: [SR-Users] Understanding regex format for subst_hf

2021-10-06 Thread Bastian Triller
maybe change your regex pattern in "/^(.)/myprefix \1/", so that it matches
only one character.

Regards,
Bastian

On Tue, Oct 5, 2021 at 7:08 PM Joel Serrano  wrote:

> Hi Daniel,
>
> Thank you for clarifying how subst_hf works!
>
> Regarding the size, it does in fact go over the 1024 limit, in this setup
> we are using firebase tokens which are 1162 characters long, and what I'm
> trying to do is to prefix the value we receive with some more characters,
> for a total of 1178 characters.
>
> So something along:
>
> subst_hf("X-myheader", "/^(.*)/myprefix \1/", "a")
>
>
> Would it be possible to expose that define for REPLACE_BUFFER_SIZE as a
> modparam to be configurable?
>
> Thanks for looking into this!
>
> Best,
> Joel.
>
>
> On Tue, Oct 5, 2021 at 4:17 AM Daniel-Constantin Mierla 
> wrote:
>
>> Regarding:
>>
>> """
>> Oct  4 10:44:44 kamailio-n1 kamailio[20324]: ERROR: 
>> [core/re.c:363]: replace_build(): Buffer too small
>> """
>>
>> That seems to be related to the define of REPLACE_BUFFER_SIZE, which is
>> 1024. Changing it requires to recompile kamailio. Is the value to be set
>> bigger than 1024?
>>
>> Cheers,
>> Daniel
>> On 05.10.21 10:05, Daniel-Constantin Mierla wrote:
>>
>> Hello,
>>
>> the regular expressions in textops have to be POSIX format (extended,
>> iirc), the remark for perl/sed-like was referring to the format being
>> '/match/replace/flags' that is common for Perl scripting and sed parameters.
>>
>> Practically textops uses the regex functions from libc, does not depend
>> on libpcre that offers PCRE format for expressions.
>>
>> The regex supports matching with PCRE and dialplan offers a way to do
>> substitutions by matching with PCRE library.
>>
>> I updated the readme of textops to reflect somehow better the above.
>>
>> Cheers,
>> Daniel
>> On 04.10.21 19:50, Joel Serrano wrote:
>>
>> So now when combined with subst_hf to actually edit the header value, I'm
>> getting this error:
>>
>> Oct  4 10:44:44 kamailio-n1 kamailio[20324]: ERROR: 
>> [core/re.c:363]: replace_build(): Buffer too small
>> Oct  4 10:44:44 kamailio-n1 kamailio[20324]: ERROR: textops
>> [textops.c:3110]: subst_hf_f(): textops subst_run failed
>>
>> Can anyone remind me the name of the parameter I have to adjust to
>> increase the buffer size?
>>
>> Thanks,
>> Joel.
>>
>> On Mon, Oct 4, 2021 at 10:46 AM Joel Serrano  wrote:
>>
>>> Update:
>>>
>>> I managed to achieve it using the "regex" module with "pcre_match()",
>>> that will take negative lookahead nicely.
>>>
>>>
>>>
>>> On Mon, Oct 4, 2021 at 10:18 AM Joel Serrano  wrote:
>>>
 Hey guys,

 I'm trying to do a replacement regex using subst_hf but I can't seem to
 get the format right and the docs are confusing.

 *subst_hf: *docs say it uses perl-like regex (as I understand it, that
 would mean PCRE). Docs also say in the 'subexp' param that it uses the same
 format as *subst.*

 *subst: *at the beginning it says it uses perl or sed format, but in
 the '/re/repl/flags' param it says that sed format.


 https://www.kamailio.org/docs/modules/devel/modules/textops.html#textops.f.subst_hf

 4.20.  subst_hf(hf, subexp, flags)

 Perl-like substitutions in the body of a header field.

 Meaning of the parameters is as follows:

-

*hf* - header field name.
-

*subexp* - substitution expression in the same format as of the
'subst' function parameter.
-

*flags* - control flags - it has to be one of: a - all headers
matching the name; f - only first header matching the name; l - only the
last header matching the name.


 4.16.  subst('/re/repl/flags')

 Replaces re with repl (sed or perl like).

 Meaning of the parameters is as follows:

-

*'/re/repl/flags'* - sed like regular expression. flags can be a
combination of i (case insensitive), g (global) or s (match newline 
 don't
treat it as end of line).

're' - is regular expression

'repl' - is replacement string - may contain pseudo-variables

'flags' - substitution flags (i - ignore case, g - global)





 I'm trying to use this:

 subst_hf("X-myheader", "/^(?!string1 |example2-|text3 )(.*)/myprefix
 \1/", "a")

 In an online tester using PCRE, the format is correct, but Kamailio
 doesn't like it:

 Oct  4 09:29:16 cops-n1 cops[15957]: ERROR:  [core/re.c:285]:
 subst_parser(): bad regular expression ^(?!string1 |example2-|text3 )(.*)
 in /^(?!string1 |example2-|text3 )(.*)/myprefix \1/


 If I remove the negative lookahead chars (?!) then kamailio doesn't
 complain but the regex doesn't do what I want.

 Does this mean that Kamailio won't support negative lookahead for subst
 regex replacements?

 What I'm trying to achieve is something 

Re: [SR-Users] DMQ node list

2021-07-14 Thread Bastian Triller
There were some thoughts about it already:
https://lists.kamailio.org/pipermail/sr-dev/2021-April/062255.html
I think these resulted in
https://github.com/kamailio/kamailio/commit/17e757c91e6e96f6711d9251979d81a792aaef08#diff-bbfcd9caa32baefd8fd963f1c59058e82a89a1868d6ffe8b4e58699f0fd3806a
and
https://github.com/kamailio/kamailio/commit/adf8919f52841800f0cd4528c33679c7ef80f2c5#diff-bbfcd9caa32baefd8fd963f1c59058e82a89a1868d6ffe8b4e58699f0fd3806a


On Wed, Jul 14, 2021, 17:25 Aidar Kamalov  wrote:

> Hello,
>
> I have a kamailio cluster with two nodes
> kamailio-1.local:  10.101.2.119
> kamailio-2.local: 10.101.2.247
>
>
> with dmq configs:
>
> kamailio-1:
> modparam("dmq", "server_address", "sip:MY_IP4_ADDR:5060")
> modparam("dmq", "notification_address", "kamailio-2.local:5060")
>
> kamailio-2:
> modparam("dmq", "server_address", "sip:MY_IP4_ADDR:5060")
> modparam("dmq", "notification_address", "kamailio-1.local:5060")
>
>
> All works fine, but kamcmd dmq.list_nodes on kamailio-1.local show me:
>  {
> host: 10.101.2.247
> port: 5060
> resolved_ip: 10.101.2.247
> status: active
> last_notification: 0
> local: 0
> }
> {
> host: kamailio-1.local
> port: 5060
> resolved_ip: 10.101.2.119
> status: active
> last_notification: 0
> local: 0
> }
> {
> host: kamailio-2.local
> port: 5060
> resolved_ip: 10.101.2.247
> status: active
> last_notification: 0
> local: 0
> }
> {
> host: 10.101.2.119
> port: 5060
> resolved_ip: 10.101.2.119
> status: active
> last_notification: 0
> local: 1
> }
>
> and  kamailio-2.local show me:
> {
> host: kamailio-2.local
> port: 5060
> resolved_ip: 10.101.2.247
> status: active
> last_notification: 0
> local: 0
> }
> {
> host: 10.101.2.119
> port: 5060
> resolved_ip: 10.101.2.119
> status: active
> last_notification: 0
> local: 0
> }
> {
> host: kamailio-1.local
> port: 5060
> resolved_ip: 10.101.2.119
> status: active
> last_notification: 0
> local: 0
> }
> {
> host: 10.101.2.247
> port: 5060
> resolved_ip: 10.101.2.247
> status: active
> last_notification: 0
> local: 1
> }
>
>
> So there are only two hosts in the cluster, but there are 4 records in
> dmq.list_nodes. Also in sip trace I can see that kamailio send DMQ messages
> to itself too (because it ip marked as local: 0 I think).
> Is it ok? Is it normal behavior? What should I do to fix it? Should
> multi_notify and DNS name with 2 A records fix it (and why?)?
> --
> Aydar A. Kamalov
> __
> 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


Re: [SR-Users] Text transformations s.select and newline char

2021-05-18 Thread Bastian Triller
https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#lineat_pos
Try {line.at,pos}

On Tue, May 18, 2021, 08:09 Martin Nyström 
wrote:

> Hello,
>
>
>
> I am simply trying to parse a SDP body, read it line by line and save the
> line into a variable for further processing. It seems when using a newline
> \n as the delimiter it breaks down with errors. How should I treat this
> issue and properly managed the newline as delimiter?
>
>
>
> May 17 12:00:00 ip-10-120-120-12 kamailio[12878]:  0(12878) ERROR: pv
> [pv_trans.c:2326]: tr_parse_string(): invalid select transformation:
> select,$var(i),$var(delimeter)}!!
>
> May 17 12:00:00 ip-10-120-120-12 kamailio[12878]:  0(12878) ERROR: 
> [core/pvapi.c:1717]: tr_lookup(): error parsing
> [{s.select,$var(i),$var(delimeter)}]
>
>
>
>
>
> Block extracted from .cfg
>
>
>
> sdp_get("$avp(sdp)");
>
> $avp(lines) = $(avp(sdp){line.count});
>
> $var(delimeter) = "\n";
>
>
>
> $var(i) = 0;
>
> while($var(i) < $avp(lines)) {
>
>
>
> # This works
>
> xlog("L_INFO", "==> Position $var(i):
> $(avp(sdp){s.select,$var(i),\n}) \n");
>
>
>
> # This fails
>
> $var(l1) = $(avp(sdp){s.select,$var(i),$var(delimeter)});
>
>
>
> # This fails
>
> $var(l2) = $(avp(sdp){s.select,$var(i),\n});
>
>
>
> # This fails
>
> $var(l3) = $(avp(sdp){s.select,$var(i),\\n});
>
>
>
> # Supposed to do something funny with the $var(line) here
>
>
>
> $var(i) = $var(i) + 1;
>
>
>
> }
>
>
>
>
>
>
>
> /M
> __
> 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


Re: [SR-Users] kamcmd dlg.end_dlg not working in shell script

2021-03-16 Thread Bastian Triller
With the logs in your first post and your shell function in a later post,
it seems your variables aren't only containing id and entry, but h_entry:
123 and h_id 567.

On Tue, Mar 16, 2021, 17:31 David Villasmil 
wrote:

> Maybe the user executing from cron?
>
> On Tue, 16 Mar 2021 at 16:16, Andrew Chen  wrote:
>
>> Now what's really interesting is that I echo'd the command I was going to
>> execute:
>>
>> 2021-03-16T15:49:02.291485+00:00 ashmainkama51 /scripts/
>> *get-call-from-hepic*.sh - *get-call-from-hepic*: Tue Mar 16 15:49:02
>> UTC 2021 executing kamcmd dlg.end_dlg h_entry: 401 h_id: 11452
>>
>>
>> and this is exact copy of the kamcmd in the script but for some reason
>> kamcmd returned invalid parameters:
>>
>>
>> 2021-03-16T15:49:02.299040+00:00 ashmainkama51 /scripts/
>> *get-call-from-hepic*.sh - *get-call-from-hepic*: Tue Mar 16 15:49:02
>> UTC 2021 status=error: 500 - Invalid parameters
>>
>>
>> I don't get it.
>>
>> On Tue, Mar 16, 2021 at 11:49 AM Andrew Chen  wrote:
>>
>>> Hi Llie
>>> sure.
>>>
>>> loadmodule "*ctl*.so"
>>>
>>> #modparam("*ctl*", "binrpc", "tcp:*:2046")
>>>
>>> #modparam("*ctl*", "binrpc_max_body_size", 20)
>>>
>>> #modparam("*ctl*", "binrpc_struct_max_body_size", 3)
>>>
>>> modparam("*ctl*", "binrpc", "unix:/var/run/kamailio/kamailio_*ctl*")
>>>
>>> modparam("*ctl*", "binrpc", "tcp:*:2046")
>>>
>>> modparam("*ctl*", "binrpc_max_body_size", 20)
>>>
>>> modparam("*ctl*", "binrpc_struct_max_body_size", 3)
>>>
>>>
>>> So the script is actually kicked off by another script that is executed
>>> by a cronjob
>>>
>>>
>>> Been doing more troubleshooting and I'm starting to think this is some
>>> cron issue but can't really isolate the issue to that 100%.  Need more
>>> testing data to confirm.
>>>
>>> On Tue, Mar 16, 2021 at 9:27 AM Ilie Soltanici 
>>> wrote:
>>>
 Hi,

 Can you post here parameters for the ctl module and what is the user
 you're running the script?

 Regards,



 On Mon, 15 Mar 2021 at 21:04, Andrew Chen  wrote:

> Hi All,
>
> Coming back to this.  Any other suggestions here?
>
> Thanks
>
> On Wed, Mar 10, 2021 at 9:24 AM Andrew Chen  wrote:
>
>> So the strange thing is that I use kamcmd to get the list of users
>> and that works.  Are there special permissions needed to delete them?
>>
>> On Wed, Mar 10, 2021 at 4:38 AM Ilie Soltanici 
>> wrote:
>>
>>> Hello,
>>>
>>> Sorry, there is actually no need for the callid argument, I mixed it
>>> up with another command.
>>> As Daniel recommended try to check the permissions. Which user the
>>> script is running with and what are the permission for 
>>> /var/run/kamailio/
>>>
>>> Regards,
>>>
>>> On Wed, 10 Mar 2021 at 09:26, Ilie Soltanici 
>>> wrote:
>>>
 Hello,

 kamcmd dlg.end_dlg $h_entry $h_id
>

 I think you are missing the callid parameter when calling kamcmd
 command:
 Try kamcmd dlg.end_dlg $h_entry $h_id $SIPCallID

 Regards,

 On Tue, 9 Mar 2021 at 13:03, Andrew Chen  wrote:

> Thanks guys.
> Here is the whole function I created:
>
> function FollowUpAction
>
> {
>
>   SIPCallID=$1
>
>
>   if [ $callStatus -ge 7 ] && [ $callStatus -le 15 ]; then
>
> GetDialogID $SIPCallID
>
> log "$(date) Found active dialog on completed call.  Delete
> call using $h_entry $h_id on SIP Call-ID $SIPCallID" >>
> deleted-calls-list.txt
>
> kamcmd dlg.end_dlg $h_entry $h_id
>
>   fi
>
> }
>
>
>
> On Tue, Mar 9, 2021 at 6:53 AM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>> Specially if you don’t show the script source.
>>
>> On Tue, 9 Mar 2021 at 08:51, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> it is hard to say why your shell script does not work, when the
>>> command runs ok in the terminal. Maybe missing/empty parameters, or
>>> insufficient access rights, ...
>>>
>>> Cheers,
>>> Daniel
>>> On 08.03.21 20:23, Andrew Chen wrote:
>>>
>>> Hi all,
>>>
>>> I have a script that cleans up hanging dialog and for some
>>> reason, executing 'kamcmd dlg.end_dlg' does not seem to work.  
>>> Below I log
>>> events of stuck calls and as you can see it just keeps logging the 
>>> same
>>> call until I manually run the kamcmd either in bash shell prompt or 
>>> in
>>> kamcmd cli:
>>>
>>> 2021-03-08T19:00:04.347807+00:00 sjointgkama51
>>> /scripts/get-call-from-hepic.sh - 

Re: [SR-Users] Kamailio Remove Remove "Allow" features from header

2020-12-02 Thread Bastian Triller
Try

exclude_hf_value("Allow", "REFER");

in your initial INVITE to Teams resp. your reply on initial INVITE from
Teams.

https://www.kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.f.exclude_hf_value


On Thu, Nov 26, 2020, 13:54 me.proje...@yahoo.com 
wrote:

> Hi,
>
> I want to remove some "Allow" features from my Kamailio SBC like I want to
> keep following only
>
> *Allow: OPTIONS, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK,
> REGISTER,*
>
> How can I achieve that?
>
> Thanks,
> ___
> 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] MS Teams Serivce unavailable

2020-10-02 Thread Bastian Triller
there are no crypto attributes and SAVP profile in SDP. Direct Routing
requires SRTP.

Check the Reason header in response. Sometimes, there are useful hints, why
your request is not accepted.

On Fri, Oct 2, 2020 at 4:55 PM Sergiu Pojoga  wrote:

> Why do you double RR if your Kam listens only on tls 5061? Your topology
> isn't the same as in the skalatan tutorial.
>
> Also, your Kam VIA contains IP address. Try to make it FQDN by setting an
> alias to your listen directive, e.g.:
> listen=tls:YOURIP:5061 advertise "FQDN":5061
>
> On Fri, Oct 2, 2020 at 10:31 AM Andy Kama  wrote:
>
>> see traces attached
>>
>> just blacked out my ips
>> but scenario is softphone --- freeswitch --- kamailio  teams
>>
>>
>> On Fri, Oct 2, 2020 at 3:16 PM Sergiu Pojoga  wrote:
>>
>>> relevant config snippets, kam logs, sip traces, all you've got?
>>>
>>> For all we know - service unavailable could be anything, e.g. your O365
>>> tenant is misconfigured.
>>>
>>> On Fri, Oct 2, 2020 at 9:32 AM Andy Kama  wrote:
>>>
 well not sure what else to send as i followed the link exactly

 hence why i was asking if anyone has had that issue previously

 On Fri, Oct 2, 2020 at 2:11 PM Sergiu Pojoga  wrote:

> > Can anyone guide me what I am doing wrong?
>
> Easy. You assume people on this mailing list are clairvoyants.
>
> On Fri, Oct 2, 2020 at 7:18 AM Andy Kama 
> wrote:
>
>> Hi All,
>>
>> I have done all the changes to get teams working according to
>>
>> https://skalatan.de/en/blog/kamailio-sbc-teams#:~:text=Extend%20the%20MS%20Teams%20systems,Kamailio%20SBCs%20to%20MS%20Teams
>> .
>>
>> but i find when i send a call to teams they send a response back with
>> service unavailable.
>>
>> Can anyone guide me what I am doing wrong?
>>
>> I have added the record route and confirm it is being sent
>>
>> My setup is freeswitch -- kamailio --- teams
>>
>>
>>
>> ___
>> 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
> 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] dispatcher seems to use the default client certificate

2020-06-18 Thread Bastian Triller
check permissions on that file and the directories in path, if all are
accessible by your user running Kamailio.

On Thu, Jun 18, 2020 at 2:12 PM Mack Hendricks  wrote:

> Thanks Daniel and Sergiu!
>
> The other think I notice is that kamcmd tls.reload causes the following
> error:
>
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_domain.c:572]: load_ca_list(): TLSc: Unable to load CA list
> '/etc/dsiprouter/certs/cacert.pem'
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0D0AB041:asn1 encoding
> routines:x509_name_ex_new:malloc failure
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0D079041:asn1 encoding
> routines:asn1_item_embed_new:malloc failure
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0D079041:asn1 encoding
> routines:asn1_item_embed_new:malloc failure
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0D079041:asn1 encoding
> routines:asn1_item_embed_new:malloc failure
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0D07803A:asn1 encoding
> routines:asn1_item_embed_d2i:nested asn1 error
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0907400D:PEM
> routines:PEM_X509_INFO_read_bio:ASN1 lib
> Jun 18 12:05:47 sbc2 /usr/sbin/kamailio[32058]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): load_ca_list:error:0B084009:x509
> certificate routines:X509_load_cert_crl_file:PEM lib
>
>
> If I restart Kamailio it works fine.   Let me know if you have any
> thoughts on this.
>
>
> On Jun 18, 2020, at 2:42 AM, Daniel-Constantin Mierla 
> wrote:
>
> Hello,
>
> see:
>
>
> https://www.kamailio.org/docs/modules/stable/modules/tls.html#tls.p.xavp_cfg
>
> And the OPTIONS keepalive can be handled in event_route[tm:local-request].
>
> Cheers,
> Daniel
> On 18.06.20 02:48, Mack Hendricks wrote:
>
> Yeah...I’m aware.  I was just checking if dispatcher could match on the
> ip:port just in case I wanted to support other use cases with my Kamailio
> instance.   I read thru the source and it looks like the uac module is
> being used to initiate the OPTIONS message.
>
> Sent from my iPhone
>
> On Jun 17, 2020, at 8:09 PM, Sergiu Pojoga 
>  wrote:
>
> 
> Hi Mack,
>
> You wouldn't have the burden of handling multiple domains whatsoever if
> you followed Microsoft's recommendations on how to configure SBC Teams for
> multiple tenants. Dispatcher would be used only for carrier's base domain.
>
> On Wed, Jun 17, 2020, 7:11 PM Mack Hendricks, 
> wrote:
>
>> Hey All,
>>
>> I'm attempting to use dispatcher to send probe messages using TLS for two
>> different domains.  I'm providing the socket attribute, which maps to a
>> certificate in /etc/kamailio/tls.cfg.  But, it seems to always select the
>> default client cert, which is not the certificate I want to use.
>>
>> My attrs column in dispatcher looks like this:
>>
>> socket=tls:142.93.159.231:5061;ping_from=sip:mack.dopensource.com
>> socket=tls:142.93.159.231:5062;ping_from=sip:levin.dopensource.com
>>
>> Is there some way to force dispatcher to do TLS cert matching based on
>> the host:ip?
>>
>> Thanks
>>
>> -Mack
>>
>>
>>
>>
>>
>> ___
>> 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 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.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
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Problem faced when Using Kamaiio as Session Refresher

2020-03-27 Thread Bastian Triller
$(hdr(Session-Expires){s.select,0,;}{s.int})

On Fri, Mar 27, 2020, 04:56 harneet singh  wrote:

> Hi Daniel,
> The following code works if the Session-Expires comes WITHOUTa refresher
> parameter.
>
> if(is_present_hf("Session-Expires")) {
>
>$avp(...) = $(hdr(Session-Expires){s.int});
>
> }
>
> If however, The session expires comes like below, there is an error in
> parsing
> Session-Expires: 200;refresher=uac
>
> Is there a way we can fetch just the value, ignoring the refresher
> parameter? I believe the refresher parameter is not required to be picked
> up from the INVITE by Kamailio for the working of SST Module.
>
> Regards,
> Harneet Singh
>
> On Tue, Mar 24, 2020 at 7:11 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> probably you can use an htable to store that the ds_load_remove() was
>> called for a specific call id, but we can make that error log message to
>> debug level, there can be cross BYEs at the end of a call resulting in same
>> situation.
>>
>> Cheers,
>> Daniel
>> On 24.03.20 13:55, harneet singh wrote:
>>
>> Thanks Daniel,
>>
>> Your suggestion was very helpful. I am now able to see the dialog load go
>> down on Dispatcher as expected in case of session expiry.
>> Just an extra error log is what I keep getting per occurrence. I believe
>> the reason for this is that the event_route[tm:local-request] will be
>> called twice per call since BYE is sent to two sides.
>>
>> The log is :
>> Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) DEBUG: sst
>> [sst_handlers.c:405]: sst_dialog_terminate_CB(): Terminating DID
>> 0x7fd847a50340 session
>> Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) DEBUG: sst
>> [sst_handlers.c:412]: sst_dialog_terminate_CB(): freeing the sst_info_t
>> from dialog 0x7fd847a50340
>> Mar 24 17:23:59 CPaaSVM kamailio: 25(7499) ALERT: 

Re: [SR-Users] pipelimit: inexistent pipe error logs

2020-03-20 Thread Bastian Triller
add -a option to journalctl

On Mon, Feb 10, 2020 at 6:19 PM Nuno Ferreira  wrote:

> Hi Daniel,
>
> I noticed that you already moved the ERR log to DBG in the pipe limit
> module. Did you have the opportunity to look at the other 2 errors?
> Glad if I can help, but I will need some directions especially about
> the place where the "[466B blob data]" is getting printed.
>
> Thanks,
> Nuno
>
> On Wed, Jan 22, 2020 at 3:03 PM Nuno Ferreira  wrote:
>
>> Hi,
>>
>> http_reply_parse is not present in the configs. I've explicitly set it as
>> "no" and the result is the same. If I set it as "yes", topos complains like
>> this:
>>
>> Jan 22 15:00:10 proxy1 kamailio[29316]: ERROR: topos [topos_mod.c:282]:
>> tps_prepare_msg(): cannot parse cseq header
>>
>> Thank you,
>>
>> Nuno
>>
>> On Wed, Jan 22, 2020 at 2:45 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> do you have http_reply_parse=yes ?
>>>
>>> The error is from topos catching the http reply being sent out and
>>> trying to handle it.
>>>
>>> Cheers,
>>> Daniel
>>> On 22.01.20 12:34, Nuno Ferreira wrote:
>>>
>>> Hi,
>>>
>>> I'm using kamailio 5.2.4 (topos enabled) and HTTP 1.1
>>> Here's ngrep output:
>>> 
>>> T 127.0.0.1:32322 -> 127.0.0.1:8000 [AP]
>>> POST /RPC HTTP/1.1.
>>> User-Agent: curl/7.29.0.
>>> Host: 127.0.0.1:8000.
>>> Accept: */*.
>>> Content-Type: application/json.
>>> Content-Length: 75.
>>> .
>>> {"id": 1, "jsonrpc": "2.0", "method": "pl.list", "params":
>>> ["pipe_INVITE"]}
>>> ##
>>> T 127.0.0.1:8000 -> 127.0.0.1:32322 [AP]
>>> HTTP/1.1 400 Unknown pipe id pipe_INVITE.
>>> Sia: SIP/2.0/TCP 127.0.0.1:32322.
>>> Content-Type: application/json.
>>> Server: SIP Proxy (v1.1.0-360).
>>> Content-Length: 105.
>>> .
>>> {
>>> ."jsonrpc":."2.0",
>>> ."error":.{
>>> .."code":.400,
>>> .."message":."Unknown pipe id pipe_INVITE"
>>> .},
>>> ."id":.1
>>> }
>>> 
>>>
>>> Debug logs from kamailio:
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/ip_addr.c:229]: print_ip(): tcpconn_new: new tcp connection: 127.0.0.1
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/tcp_main.c:999]: tcpconn_new(): on port 32304, type 2
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/tcp_main.c:1309]: tcpconn_add(): hashes: 3634:3788:434, 41
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/io_wait.h:380]: io_watch_add(): DBG: io_watch_add(0xa85ba0, 39, 2,
>>> 0x7f87c726b9e0), fd_no=29
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/io_wait.h:602]: io_watch_del(): DBG: io_watch_del (0xa85ba0, 39, -1,
>>> 0x0) fd_no=30 called
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/tcp_main.c:4196]: handle_tcpconn_ev(): sending to child, events 1
>>> Jan 22 11:20:50 proxy1 kamailio[19000]: DEBUG: 
>>> [core/tcp_main.c:3878]: send2child(): selected tcp worker idx:0 proc:19
>>> pid:18996 for activity on [tcp:127.0.0.1:8000], 0x7f87c726b9e0
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/tcp_read.c:1759]: handle_io(): received n=8 con=0x7f87c726b9e0, fd=11
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/tcp_read.c:1560]: tcp_read_req(): content-length=75
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:612]: parse_msg():  method:  
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:614]: parse_msg():  uri: 
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:616]: parse_msg():  version: 
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=75
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: topos [topos_mod.c:269]:
>>> tps_prepare_msg(): non sip request message
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:612]: parse_msg():  method:  
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:614]: parse_msg():  uri: 
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:616]: parse_msg():  version: 
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=75
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/receive.c:246]: receive_msg(): --- received sip message - request -
>>> call-id: [] - cseq: []
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: [328B blob data]
>>> Jan 22 11:20:50 proxy1 kamailio[18996]: DEBUG: 
>>> [core/parser/msg_parser.c:610]: 

Re: [SR-Users] Manipulating contacts header results in a malformed SIP packet

2020-03-20 Thread Bastian Triller
You're using set_contact_alias(), which already changes the Contact header.
Try msg_apply_changes() before your 2nd Contact header change.

On Thu, Mar 19, 2020 at 5:11 AM Sergey Safarov  wrote:

> Looks as not expected here
>
> sip:4.5.6.7:5060;alias=10.100.1.1~5060~1Content-Type: application/sdp
>
> About contact header.
> Yes it is really important header.
> If your carrier want specific Contact header format, then I recommend try
> use other provider.
>
> Contact header used also for RURI headers. So you cannot simple change
> Contact.
>
> Kamailio is very good SP proxy. For you will more simple invite Kamailio
> tech guy to configure inter-working with this specific carrier.
>
>
> On Thu, Mar 19, 2020 at 4:43 AM Andrew White 
> wrote:
>
>> Hi all,
>>
>> Hope everyone is well, and looking forward to seeing you all whenever
>> Kamailio World ends up being!
>>
>> I’m currently dealing with an issue which I’m unsure if it’s due to my
>> own implementation, or a bug.
>>
>> When attempting to manipulate the Contact header via app_ruby, the SIP
>> message I send ends up being malformed. Here’s the code I’m using:
>>
>> def replace_contact_header(uri)
>> #KSR::HDR.remove("Contact") if KSR::HDR.is_present('Contact') > 0
>> #KSR::HDR.append("Contact: #{uri}\r\n")
>> KSR::HDR.rmappend("Contact", "Contact: #{uri}\r\n")
>> end
>>
>> Note that I have tried both rmappend and the commented out functions too.
>> I call this with a custom built URI, such as <
>> 61400123...@kamailio.test.uconnected.com.au>. This function is called
>> just before a KSR::TM.t_relay(). Here’s the result I get watching from
>> tshark (some info scrubbed for privacy):
>>
>> Record-Route: <
>> sip:1.2.3.4;lr;ftag=e3p42efd3635HH;vst=AAoUXVFHDQAAs83AEGwAAFgwCQA8QY3RlZC5jb20uYXU-;did=927.f0f2
>> >
>> …
>> Call-ID: 3de29646-e423-1238-e712-023563fb337c
>> CSeq: 17736747 INVITE
>> sip:4.5.6.7:5060;alias=10.100.1.1~5060~1Content-Type: application/sdp
>> Content-Length: 483
>> Contact: 
>>
>> In this case, 4.5.6.7 is the PBX I made the call from (and the value of
>> the original Contact header), and 1.2.3.4 is what
>> kamailio.test.uconnected.com.au resolves to, and is this Kamailio
>> instance.
>>
>> Here’s a copy of the same thing when I don’t call my
>> replace_contact_header function and t_relay:
>>
>> Record-Route: <
>> sip:1.2.3.4;lr;ftag=j6jebCSa5Qap6c;vst=AAoUXVND38dTgwEGEAEGwAAFgwCQA8Fdn83lZC5jb20uYXU-;did=827.40b
>> >
>> ...
>> Call-ID: 249571c5-e91a-ae91-6d8e-023563fb337c
>> CSeq: 17735867 INVITE
>> Contact: 
>> Content-Type: application/sdp
>> Content-Length: 483
>>
>> Given the relative simplicity of the function, I have to assume this is
>> an error with how the function is manipulating the existing Contact header?
>> It seems that the “Contact: <“ part of the header is being removed as well
>> as the “>\r\n", but the rest being left.
>>
>> I’m currently using commit 283e468401d809ca9b71368c32badf3a70d48b8b
>>  on Amazon Linux 2,
>> which is CentOS/RHEL based.
>>
>> Thanks!
>>
>> Andrew
>> ___
>> 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


Re: [SR-Users] Problem to install Kameilio from Ubuntu packages

2018-01-29 Thread Bastian Triller
There another command on http://deb.kamailio.org for people behind
firewalls which block port 11371:

% wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | sudo apt-key add -


On Jan 26, 2018 5:46 PM, "Alain Bonnefoy - XOOL"  wrote:

> Hello,
>
>
>
> I tried to install Kameilio on Ubuntu 16.04 from what explained in the
> wiki .
>
>
>
> But when I execute the command to add your GPG key, I just get replied
> that the timeout occured.
>
>
>
> What to do ?
>
>
>
> Alain
>
> Provenance : Courrier 
> pour Windows 10
>
>
>
> ___
> 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] DBURL password in clear

2017-11-16 Thread Bastian Triller
isn't using a group in the db URL an option? Generate some .cnf in
/etc/mysql/conf.d (or where MySQL searches its configuration in a
Docker container) from the secret and use the group in your db URL in
kamailio.cfg.

http://www.kamailio.org/docs/modules/5.0.x/modules/db_mysql.html#idp419
97212

On Thu, 2017-11-16 at 20:22 +, Robert wrote:
> Hello Daniel,
> 
> I did think of this, but yes, that’s exactly my problem. Penetration
> testing will highlight any and all tricks I might employ, definitely
> looking like we're going to need to do extend Kamailio somehow. If we
> can do it in a way that isn’t internally sensitive, I’ll propose we
> create a pull request, maybe help someone else in the future?
> 
> Cheers - Robert...
> 
> > On 16 Nov 2017, at 09:34, Daniel Tryba  wrote:
> > 
> > On Wed, Nov 15, 2017 at 08:46:58AM +0100, Daniel-Constantin Mierla
> > wrote:
> > > > I???m working for a UK high street bank and our Kamailio
> > > > implementation has been challenged because we???ve got database
> > > > passwords held in clear in the configuration file.
> > 
> > ...
> > > > My requirement is simple, I need to be able to supply a
> > > > password via means such as loading a variable from a run-once
> > > > script at start up, or a module. The ideal would be to be able
> > > > to read in a Docker secret :)
> > > > 
> > > 
> > > you can define a for a token to be used inside kamailio.cfg by
> > > using -A
> > > command line parameter. So when you start kamailio, fetch the
> > > password
> > > from your secure system by what so ever meaning, then build the
> > > database
> > > url based on it and run kamailio with:
> > > 
> > > kamailio - A DBURL='mysql://user:passwd@dbhost/kamailio' ...
> > 
> > My guess is the next problem will be the password being visible to
> > all
> > users querying the processlist :)
> > 
> > Is including a file (import_file) with passwords an option?
> > Generate the
> > file just before startup, remove it (ofcourse in a secure way
> > (shred the
> > file and overwrite all freespace with a multiple patters a few
> > dozen
> > times (ask the auditors for the exact specifications that make them
> > happy))) after kamailio is running. 
> > 
> > 
> > ___
> > 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