[SR-Users] Re: Setting kamailio to use another DB

2024-01-09 Thread Jurijs Ivolga via sr-users
Hi Samuel,

I think this is what you are looking for:

https://kamailio.org/docs/modules/devel/modules/db_cluster.html

Jurijs


On Tue, Jan 9, 2024 at 6:36 PM SAMUEL MOYA TINOCO via sr-users <
sr-users@lists.kamailio.org> wrote:

> Good evening everyone,
>
>
>
> I’m trying to configure my Kamailio to use another DB in case the one it
> commonly uses fails.
>
> Does Kamailio has any built in function to do this? Do I have to do it
> with an ha-proxy?
>
>
>
> Thank you in advance for your help
>
>
>
> *Samuel Moya Tinoco*
>
> Departamento de Sistemas y Redes
>
> Móvil: (+34) 606985997
>
> sm...@vivelibre.es
>
>
>
>
>
>
>
> Soluciones inteligentes
> para la autonomía personal
>
>
>
>
>
>
>
>
> __
> 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] Siptrace and Kamailio "stress" test

2022-11-02 Thread Jurijs Ivolga
Hi,

And I think Kamailio supports only UDP for sending out HEP traffic...

Jurijs


On Wed, Nov 2, 2022 at 7:14 PM Jurijs Ivolga 
wrote:

> How did you configure force_send_sock?
>
> it should be something like this:
>
> modparam("siptrace", "force_send_sock", "sip:192.168.1.210:5066")
>
> I'm guessing instead of sip, you are putting udp...
>
> Jurijs
>
>
> On Wed, Nov 2, 2022 at 6:12 PM Igor Olhovskiy 
> wrote:
>
>> That's what I tried first and got:
>>
>> ERROR: siptrace [siptrace.c:392]: mod_init(): bad send sock address
>>
>> Le mer. 2 nov. 2022 à 15:58, Jurijs Ivolga  a
>> écrit :
>>
>>> Hi,
>>>
>>> For only UDP, you can try force_send_sock with UDP socket there.
>>>
>>> Jurijs
>>>
>>>
>>> On Wed, Nov 2, 2022 at 5:31 PM Igor Olhovskiy 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> Found an interesting scenario, maybe something could be done here.
>>>> I have a siptrace module configured like
>>>>
>>>> modparam("siptrace", "duplicate_uri", "sip::9060")
>>>> modparam("siptrace", "hep_mode_on", 1)
>>>> modparam("siptrace", "trace_to_database", 0)
>>>> modparam("siptrace", "trace_on", 1)
>>>> modparam("siptrace", "hep_version", 3)
>>>> modparam("siptrace", "trace_mode", 1)
>>>>
>>>> When Kamailio is under stress test (sipflood via OPTIONS/TLS), with
>>>> this settings it transfers all flood to HOMER server.
>>>>
>>>> At some point Kamailio just stops accepting any new TLS connections.
>>>>
>>>> Turning off siptrace solves this issue.
>>>>
>>>> As I got, siptrace module is not changing protocol of the message
>>>> (means not converting TCP/UDP) or so. Could it be possible, that at some
>>>> point siptrace "eats" all TCP connections (especially if remote HOMER is
>>>> down or not answering) which leads Kamailio to stop processing any new
>>>> connections?
>>>>
>>>> And is it possible to send HEP traffic only via UDP to prevent this?
>>>>
>>>> Yes, sure other option is to trace only "legal" traffic
>>>>
>>>> --
>>>> Best regards,
>>>> Ihor (Igor)
>>>> __
>>>> 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
>>>
>>
>>
>> --
>> Best regards,
>> Ihor (Igor)
>> __
>> 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] Siptrace and Kamailio "stress" test

2022-11-02 Thread Jurijs Ivolga
How did you configure force_send_sock?

it should be something like this:

modparam("siptrace", "force_send_sock", "sip:192.168.1.210:5066")

I'm guessing instead of sip, you are putting udp...

Jurijs


On Wed, Nov 2, 2022 at 6:12 PM Igor Olhovskiy 
wrote:

> That's what I tried first and got:
>
> ERROR: siptrace [siptrace.c:392]: mod_init(): bad send sock address
>
> Le mer. 2 nov. 2022 à 15:58, Jurijs Ivolga  a
> écrit :
>
>> Hi,
>>
>> For only UDP, you can try force_send_sock with UDP socket there.
>>
>> Jurijs
>>
>>
>> On Wed, Nov 2, 2022 at 5:31 PM Igor Olhovskiy 
>> wrote:
>>
>>> Hello,
>>>
>>> Found an interesting scenario, maybe something could be done here.
>>> I have a siptrace module configured like
>>>
>>> modparam("siptrace", "duplicate_uri", "sip::9060")
>>> modparam("siptrace", "hep_mode_on", 1)
>>> modparam("siptrace", "trace_to_database", 0)
>>> modparam("siptrace", "trace_on", 1)
>>> modparam("siptrace", "hep_version", 3)
>>> modparam("siptrace", "trace_mode", 1)
>>>
>>> When Kamailio is under stress test (sipflood via OPTIONS/TLS), with this
>>> settings it transfers all flood to HOMER server.
>>>
>>> At some point Kamailio just stops accepting any new TLS connections.
>>>
>>> Turning off siptrace solves this issue.
>>>
>>> As I got, siptrace module is not changing protocol of the message (means
>>> not converting TCP/UDP) or so. Could it be possible, that at some point
>>> siptrace "eats" all TCP connections (especially if remote HOMER is down or
>>> not answering) which leads Kamailio to stop processing any new connections?
>>>
>>> And is it possible to send HEP traffic only via UDP to prevent this?
>>>
>>> Yes, sure other option is to trace only "legal" traffic
>>>
>>> --
>>> Best regards,
>>> Ihor (Igor)
>>> __
>>> 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
>>
>
>
> --
> Best regards,
> Ihor (Igor)
> __
> 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] Siptrace and Kamailio "stress" test

2022-11-02 Thread Jurijs Ivolga
Hi,

For only UDP, you can try force_send_sock with UDP socket there.

Jurijs


On Wed, Nov 2, 2022 at 5:31 PM Igor Olhovskiy 
wrote:

> Hello,
>
> Found an interesting scenario, maybe something could be done here.
> I have a siptrace module configured like
>
> modparam("siptrace", "duplicate_uri", "sip::9060")
> modparam("siptrace", "hep_mode_on", 1)
> modparam("siptrace", "trace_to_database", 0)
> modparam("siptrace", "trace_on", 1)
> modparam("siptrace", "hep_version", 3)
> modparam("siptrace", "trace_mode", 1)
>
> When Kamailio is under stress test (sipflood via OPTIONS/TLS), with this
> settings it transfers all flood to HOMER server.
>
> At some point Kamailio just stops accepting any new TLS connections.
>
> Turning off siptrace solves this issue.
>
> As I got, siptrace module is not changing protocol of the message (means
> not converting TCP/UDP) or so. Could it be possible, that at some point
> siptrace "eats" all TCP connections (especially if remote HOMER is down or
> not answering) which leads Kamailio to stop processing any new connections?
>
> And is it possible to send HEP traffic only via UDP to prevent this?
>
> Yes, sure other option is to trace only "legal" traffic
>
> --
> Best regards,
> Ihor (Igor)
> __
> 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] Let's Encrypt DST Root CA X3 cert CA expiration 30th/Sept - Any issues?

2021-10-01 Thread Jurijs Ivolga
Hi,

I had some issues with docker containers running debian 9, I was not able
to connect to services that were using Lets Encrypt certs from those
containers, strange enough update-ca-certificates --fresh from inside
container didn't help. Deleting docker images and recreating from scratch
made everything work again. Host was running Ubuntu 20 and it had no
problem at all, I was able to connect to the same services from the host
without any manipulations on the host.

Jurijs


On Fri, Oct 1, 2021 at 10:06 PM Joel Serrano  wrote:

> Hello,
>
> I'm wondering if anyone had any issues yesterday with the expiration of
> the DST Root CA X3 cert?
>
> Out of all the servers I manage, only a couple were affected (debian 8).
> They were production servers so we replaced the cert with a different one
> to solve the issue while we find the root cause.
>
> Anyone out there had any issues yesterday because of this? I'm just
> curious!
>
> 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] Can Kamailio help with this?

2021-05-21 Thread Jurijs Ivolga
Hi,

If your remote PBX support path header, then easiest way would be to use
Path module of Kamailio:

https://www.kamailio.org/docs/modules/devel/modules/path.html

Jurijs


On Fri, May 21, 2021 at 5:09 PM Antony Stone <
antony.st...@kamailio.open.source.it> wrote:

> Hi.
>
> I think maybe I asked this question at a busy time, when people were
> dealing
> with other questions.
>
> Can anyone point me at the appropriate documentation on how to get
> Kamailio
> set up to pass client registrations through to a remote PBX?
>
> I'm assuming this is a pretty basic use case, but I haven't yet found a
> simple
> guide.
>
>
> Thanks in advance.
>
> On Tuesday 18 May 2021 at 12:51:21, Antony Stone wrote:
>
> > On Saturday 15 May 2021 at 22:49:01, Mojtaba wrote:
> > > Absolutely yes, In Kamailio with specific module you could do it. Some
> > > related module for doing this scenario are:
> > > presence, presence_xml, presence_dialoginfo, pua, pua_dialoginfo
> > > You could know more about them by referring to its documentation.
> >
> > Thanks for the confirmation; I'm sure the details you provide will make
> > more sense to me once I'm at a stage where I can use them.
> >
> > In the meantime, I assume that the other part of my requirement - getting
> > Kamailio to pass through client registrations from Asterisk to a remote
> PBX
> > - is a far more standard setup - where can I find configuration
> guidelines
> > on how to do this, given that I've never implemented Kamailio so far?
> >
> >
> > Thanks,
> >
> > > On Sat, May 15, 2021 at 5:52 PM Antony Stone wrote:
> > > > Hi.
> > > >
> > > > I've been aware of Kamailio, and on this list, for several years, but
> > > > so far I have not implemented Kamailio for any purpose.
> > > >
> > > > I wonder if it could be a suitable tool for the following scenario.
> > > >
> > > > I currently use Asterisk to register as a client, with username and
> > > > password, to other SIP PBXs in order to receive calls.  As far as the
> > > > other PBX is concerned, Asterisk looks like a SIP telephone on a
> > > > particular extension.
> > > >
> > > > However, Asterisk's SIP client capabilities are limited to handling
> > > > phone calls only, and it specifically cannot receive presence
> > > > information about the state of other extensions from the remote PBX.
> > > >
> > > > So, could Kamailio be used in the path between Asterisk and the
> remote
> > > > PBX so that the registration on the PBX comes from Kamailio (with any
> > > > incoming calls being passed to Asterisk), but with Kamailio also
> > > > receiving presence information from the remote PBX and making this
> > > > available to some script or application (which I would expect to have
> > > > to write)?
> > > >
> > > > The main point is that I don't want to have two things registering to
> > > > the remote PBX, one for calls and one for presence, so I'm looking
> for
> > > > a way to register with something which understands presence, and can
> > > > also pass calls on to Asterisk.
> > > >
> > > > Can anyone suggest whether Kamailio could do this, and if so, point
> me
> > > > at some resources to help me get started; or alternatively suggest
> > > > ideas on some other tool which might be more appropriate than
> > > > Kamailio?
> > > >
> > > >
> > > > Thanks for any ideas,
> > > >
> > > >
> > > > Antony.
>
> --
> Pavlov is in the pub enjoying a pint.
> The barman rings for last orders, and Pavlov jumps up exclaiming "Damn!  I
> forgot to feed the dog!"
>
>Please reply to the
> list;
>  please *don't* CC
> me.
>
> __
> 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] Comparing if header has 0 value in body

2021-03-11 Thread Jurijs Ivolga
Hi Daniel,

Thank you, good tip.

Jurijs


On Thu, Mar 11, 2021 at 2:54 PM Daniel-Constantin Mierla 
wrote:

> You should also add {s.int} if you want to compare with an integer value
> -- there is some auto-conversion, but it is better to be explicit.
>
> Cheers,
> Daniel
> On 11.03.21 12:53, Jurijs Ivolga wrote:
>
> Hi,
>
> This seems to work for me:
>
> if ($(hdr(X-myheader){s.trim})==0) {
> ..
> };
>
> Seems in the body I got "0 " and maybe because of this automatic string
> to int conversion didn't work.
>
> Jurijs
>
>
> On Thu, Mar 11, 2021 at 1:33 PM Jurijs Ivolga 
> wrote:
>
>> Hi,
>>
>> I'm running Kamailio 5.3.5
>>
>> I have following header "X-myheader: 0"
>>
>> Nevertheless it seems this is not working for me:
>>
>> if ($hdr(X-myheader)==0) {
>> .
>>  };
>>
>> What I'm doing wrong?
>>
>> Jurijs
>>
>
> ___
> 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


Re: [SR-Users] Comparing if header has 0 value in body

2021-03-11 Thread Jurijs Ivolga
Hi,

This seems to work for me:

if ($(hdr(X-myheader){s.trim})==0) {
..
};

Seems in the body I got "0 " and maybe because of this automatic string to
int conversion didn't work.

Jurijs


On Thu, Mar 11, 2021 at 1:33 PM Jurijs Ivolga 
wrote:

> Hi,
>
> I'm running Kamailio 5.3.5
>
> I have following header "X-myheader: 0"
>
> Nevertheless it seems this is not working for me:
>
> if ($hdr(X-myheader)==0) {
> .
>  };
>
> What I'm doing wrong?
>
> Jurijs
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Comparing if header has 0 value in body

2021-03-11 Thread Jurijs Ivolga
Hi,

I'm running Kamailio 5.3.5

I have following header "X-myheader: 0"

Nevertheless it seems this is not working for me:

if ($hdr(X-myheader)==0) {
.
 };

What I'm doing wrong?

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


Re: [SR-Users] iOS CallKit and tsilo

2021-03-10 Thread Jurijs Ivolga
Hi,

If you look into this:

https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit

Full quote:

After sending the initial push notification, don’t send additional push
> notifications to cancel the call or communicate new details to your app.
> Instead, communicate with the app directly over the network connection you
> established between it and your server. Using an existing network
> connection is generally faster than sending a push notification, and if
> network conditions are poor, APNs may be unable to deliver push
> notifications to the device anyway.
>

So based on my interpretation of what is written above, it seems they do
not prohibit, but rather recommend it because of " Using an existing
network connection is generally faster ". As far as we are discussing a
case where there are no existing connections, I personally think this part
of documentation is not relevant to that particular case.

Jurijs


On Wed, Mar 10, 2021 at 6:36 PM Igor Olhovskiy 
wrote:

> Hi,
>
> But Apple prohibits to use 2nd push for call cancel. That's not my
> decision.
>
>
> https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit
>
> After sending the initial push notification, don’t send additional push
> notifications to cancel the call or communicate new details to your app.
> Instead, communicate with the app directly over the network connection you
> established between it and your server.
>
>
> Regards,
> Igor
>
> On 10.03.2021 15:18, Jurijs Ivolga wrote:
>
> Hi,
>
> My point is that you're referring to documentation where it is assumed
> that there is always connection between iOS app and Kamailio, but this
> might not be the case, like in the scenario that I described.
>
> I think somebody who put this documentation is not really aware of all use
> cases and for this case it is better to use push for cancelling a call,
> IMHO.
>
> Jurijs
>
>
> On Wed, Mar 10, 2021 at 4:15 PM Igor Olhovskiy 
> wrote:
>
>> Hi!
>>
>> That is exactly my question. Now I have workaround for this (
>> https://samael28.blogspot.com/2021/03/kamailio-and-delayed-cancel-on-ios.html)
>> but maybe there is more efficient way, like "storing" dead transactions.
>>
>> Regards,
>> Igor
>>
>> On 10.03.2021 15:07, Jurijs Ivolga wrote:
>>
>> Hi,
>>
>> So if there is no connection between iOS app and Kamailio, what should we
>> do? Lets imagine scenario: call arrives, app receives push notifications
>> and then call is cancelled, even before connection is established.
>>
>> Jurijs
>>
>>
>> On Wed, Mar 10, 2021 at 4:04 PM Igor Olhovskiy 
>> wrote:
>>
>>> Hello,
>>>
>>> As I got, this is should be supported by app itself, not iOS.
>>>
>>> And Apple docs says explicitly:
>>>
>>> After sending the initial push notification, don’t send additional push
>>> notifications to cancel the call or communicate new details to your app.
>>> Instead, communicate with the app directly over the network connection you
>>> established between it and your server.
>>>
>>>
>>> Regards,
>>> Igor
>>>
>>> On 10.03.2021 13:52, Ilie Soltanici wrote:
>>>
>>> Hello,
>>>
>>> On Cancel we are sending just another Push Notification that indicates
>>> the call is cancelled, and the calling screen dissapear.
>>>
>>> Regards,
>>>
>>> On Wed 10 Mar 2021 at 12:28, Igor Olhovskiy 
>>> wrote:
>>>
>>>> Hello!
>>>>
>>>> Is there any way to "store" already finished transactions in tsilo?
>>>> Idea
>>>> is to deliver, for example, canceled calls to the phone, when call
>>>> already was answered on other device, but push notification arrive
>>>> later? Major problem here, that there how it's working on iOS.
>>>>
>>>> On iOS phone first show you calling screen, than - app is waking and
>>>> after app will register and receive invite with tsilo, it updates
>>>> calling screen with CallerID and other info. But if call was canceled
>>>> before, calling screen is shown, but app not receiving INVITE, so, call
>>>> screen is just there for some timeout (for Linphone, for ex, it's 20
>>>> sec).
>>>>
>>>> Right now I've manage to do it via external SIPP call, that emulates
>>>> "fake missed call", but maybe there is other way to 

Re: [SR-Users] iOS CallKit and tsilo

2021-03-10 Thread Jurijs Ivolga
Hi,

My point is that you're referring to documentation where it is assumed that
there is always connection between iOS app and Kamailio, but this might not
be the case, like in the scenario that I described.

I think somebody who put this documentation is not really aware of all use
cases and for this case it is better to use push for cancelling a call,
IMHO.

Jurijs


On Wed, Mar 10, 2021 at 4:15 PM Igor Olhovskiy 
wrote:

> Hi!
>
> That is exactly my question. Now I have workaround for this (
> https://samael28.blogspot.com/2021/03/kamailio-and-delayed-cancel-on-ios.html)
> but maybe there is more efficient way, like "storing" dead transactions.
>
> Regards,
> Igor
>
> On 10.03.2021 15:07, Jurijs Ivolga wrote:
>
> Hi,
>
> So if there is no connection between iOS app and Kamailio, what should we
> do? Lets imagine scenario: call arrives, app receives push notifications
> and then call is cancelled, even before connection is established.
>
> Jurijs
>
>
> On Wed, Mar 10, 2021 at 4:04 PM Igor Olhovskiy 
> wrote:
>
>> Hello,
>>
>> As I got, this is should be supported by app itself, not iOS.
>>
>> And Apple docs says explicitly:
>>
>> After sending the initial push notification, don’t send additional push
>> notifications to cancel the call or communicate new details to your app.
>> Instead, communicate with the app directly over the network connection you
>> established between it and your server.
>>
>>
>> Regards,
>> Igor
>>
>> On 10.03.2021 13:52, Ilie Soltanici wrote:
>>
>> Hello,
>>
>> On Cancel we are sending just another Push Notification that indicates
>> the call is cancelled, and the calling screen dissapear.
>>
>> Regards,
>>
>> On Wed 10 Mar 2021 at 12:28, Igor Olhovskiy 
>> wrote:
>>
>>> Hello!
>>>
>>> Is there any way to "store" already finished transactions in tsilo? Idea
>>> is to deliver, for example, canceled calls to the phone, when call
>>> already was answered on other device, but push notification arrive
>>> later? Major problem here, that there how it's working on iOS.
>>>
>>> On iOS phone first show you calling screen, than - app is waking and
>>> after app will register and receive invite with tsilo, it updates
>>> calling screen with CallerID and other info. But if call was canceled
>>> before, calling screen is shown, but app not receiving INVITE, so, call
>>> screen is just there for some timeout (for Linphone, for ex, it's 20
>>> sec).
>>>
>>> Right now I've manage to do it via external SIPP call, that emulates
>>> "fake missed call", but maybe there is other way to "store" already dead
>>> transactions for some time?
>>>
>>> PS: Unfortunately, can't solve this on mobile app level.
>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>>
>>> ___
>>> 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
>>
>> ___
>> 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
>
> ___
> 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] iOS CallKit and tsilo

2021-03-10 Thread Jurijs Ivolga
Hi,

So if there is no connection between iOS app and Kamailio, what should we
do? Lets imagine scenario: call arrives, app receives push notifications
and then call is cancelled, even before connection is established.

Jurijs


On Wed, Mar 10, 2021 at 4:04 PM Igor Olhovskiy 
wrote:

> Hello,
>
> As I got, this is should be supported by app itself, not iOS.
>
> And Apple docs says explicitly:
>
> After sending the initial push notification, don’t send additional push
> notifications to cancel the call or communicate new details to your app.
> Instead, communicate with the app directly over the network connection you
> established between it and your server.
>
>
> Regards,
> Igor
>
> On 10.03.2021 13:52, Ilie Soltanici wrote:
>
> Hello,
>
> On Cancel we are sending just another Push Notification that indicates the
> call is cancelled, and the calling screen dissapear.
>
> Regards,
>
> On Wed 10 Mar 2021 at 12:28, Igor Olhovskiy 
> wrote:
>
>> Hello!
>>
>> Is there any way to "store" already finished transactions in tsilo? Idea
>> is to deliver, for example, canceled calls to the phone, when call
>> already was answered on other device, but push notification arrive
>> later? Major problem here, that there how it's working on iOS.
>>
>> On iOS phone first show you calling screen, than - app is waking and
>> after app will register and receive invite with tsilo, it updates
>> calling screen with CallerID and other info. But if call was canceled
>> before, calling screen is shown, but app not receiving INVITE, so, call
>> screen is just there for some timeout (for Linphone, for ex, it's 20 sec).
>>
>> Right now I've manage to do it via external SIPP call, that emulates
>> "fake missed call", but maybe there is other way to "store" already dead
>> transactions for some time?
>>
>> PS: Unfortunately, can't solve this on mobile app level.
>>
>> --
>> Regards,
>> Igor
>>
>>
>> ___
>> 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
>
> ___
> 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] TSILO - transaction is not suspended

2021-01-07 Thread Jurijs Ivolga
Hi,

What happens in the route[RELAY]?

Maybe code after "route(RELAY)" is not executed?

When there is only 1 device what value is inside $var(hstored) when the
register hits Kamailio?

Jurijs


On Wed, Jan 6, 2021 at 4:27 AM Jeremy McNamara 
wrote:

> Hi Folks - I am attempting to set up a mobile push configuration, by
> following the published example(s).
>
> If we have more than one endpoint registered, this configuration works as
> expected (via the ts_store() path below).
>
> If we do not have another registered endpoint the transaction seems to be
> suspended but then cannot be resumed (t_suspend) after REGISTER arrives.
>
>
> INFO: 

Re: [SR-Users] tsilo: ts_append() cannot find the ts_store() data

2020-11-25 Thread Jurijs Ivolga
Hi,

I do see this in logs and this seems normal, cause we do store that $sht
and in a case if call is cancelled or ended we do not clean that $sht until
it resets in 120 seconds, so if any register arrives without call during
that 120 seconds, this is what you will see. Let assume somebody calls a
subscriber, then we do store transaction and  we do this
"$sht(vtp=>stored::$rU) = 1", if call ends and by some reason without any
other call another register arrives from subscriber with same "$tU" within
120 seconds after ($sht(vtp=>stored::$rU) = 1;), then this register will go
to PUSHJOIN and we check if transaction is stored, because there is no call
it is not stored and then it checks if $sht(vtp=>stored::$rU) equal to 1,
because this is not resetted yet(120 seconds do not pass), ts_append tries
to append branch, but there is no branch and that why you see this error.

I would like to add that for me this error seems harmless and everything
works flawlessly.

Jurijs


On Wed, Nov 25, 2020 at 2:39 PM Anthony Alba 
wrote:

> Do you ever see the following in your logs in route[REGISTER] from the
> callee user?
> I think this happens when
> 1. All transactions have been cleaned up by tsilo, so nothing to append
> 2. $sht(vtp=>stored::$tU) has not timed out in the 120s
> 3. and $tU/callee also just happens to  re-REGISTER before
> $sht(vtp=>stored::$tU) is removed
>
> I guess it is harmless but it is an eyesore to my logs manager, any
> clever tricks
>
> I think this code logic
> if ($var(hjoin)==0)
> {
> if ($var(hstored))
> ts_append("location", "$tU");
> return;
> }
> causes the REGISTER of the callee to happen to try to ts_append().
>
> 2020-11-25T20:30:01+08:00 127.0.0.1 tsilo.ts_append()
> sip:char...@voice.example.com
> 2020-11-25T20:30:01+08:00 127.0.0.1 ERROR: tsilo [ts_append.c:64]:
> ts_append(): failed to retrieve record for
> sip:char...@voice.zenquark.com
>
> ___
> 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] tsilo: ts_append() cannot find the ts_store() data

2020-11-25 Thread Jurijs Ivolga
Hi,

Just my 50 santīmi. If you look into whole PUSHJOIN, then it is:

route[PUSHJOIN] {
> $var(hjoin) = 0;
> lock("$tU");
> $var(hjoin) = $sht(vtp=>join::$tU);
> $var(hstored) = $sht(vtp=>stored::$tU);
> $sht(vtp=>join::$tU) = $null;
> unlock("$tU");
> if ($var(hjoin)==0)
> {
> if ($var(hstored))
> ts_append("location", "$tU");
> return;
> }
> $var(id_index) = $(var(hjoin){s.select,0,:}{s.int});
> $var(id_label) = $(var(hjoin){s.select,1,:}{s.int});
> xdbg("resuming trasaction [$var(id_index):$var(id_label)] $tU
> ($var(hjoin))\n");
> t_continue("$var(id_index)", "$var(id_label)", "INVRESUME");
> }
>

You can see that at line 8 we check if $var(hjoin) is equal 0 and it is
equal 0 only in this case we will resume the transaction, so we do want to
make a branch for the transaction that is resumed, not one that is still
suspended. So 1st registers arrive at this block and we do resume, but we
do not append brench and on the second register $var(hjoin) will be 0 and
in this case we do need to append branch.

At least this is my understanding, please forgive me if I mixed up
something. :)

I do find that this config works for me flawlessly, but I would like to add
that there might need some tweaks for it. In case if 2 Invites arrive to
the same subscriber when he does not have registration, then for this
config we will send to device only the latest INVITE and only the latest
invite will be branch out with tsilo. Again this is my perception of how
all this works and I apologize if I do mixed something. :)

Jurijs


On Wed, Nov 25, 2020 at 11:21 AM Anthony Alba 
wrote:

> On Wed, Nov 25, 2020 at 3:29 PM Federico Cabiddu
>  wrote:
> >
> > Hi,
> > being $var basically static variables per process , I wanted to be sure
> to reset its value before processing it, but it's probably not needed there
> (the example is old :)).
> >
> Is there a current version of the sample for reference. Thanks!
>
> Cheers
> Anthony
>
> ___
> 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] tsilo - failure to add branches (-1)

2020-11-05 Thread Jurijs Ivolga
Hi Federico,

In my Kamailio "append_branches" was set  to 0 long time ago and this was a
legacy that I needed to deal with. After removing "modparam("registrar",
"append_branches", 0)" and fixing config everything worked. Thank you again!

Jurijs


On Thu, Nov 5, 2020 at 12:51 PM Federico Cabiddu 
wrote:

> Good to know that you solved it :)
> Why did you have to set "append_branches" to 0? Which was the behaviour
> when enabling it?
>
> Cheers,
>
> Federico
>
> On Tue, Nov 3, 2020 at 6:51 PM Jurijs Ivolga 
> wrote:
>
>> Hi Federico,
>>
>> First of all, thank you a lot for helping me. This means a lot to me
>> This is true open source spirit!!!
>>
>> So indeed I had messed up config and I was saving transactions
>> incorrectly and that why you saw 2 call IDs.
>>
>> I updated my config and now I do save transactions correctly and it
>> works! I would like to add that I needed to update Registrar settings too:
>>
>> modparam("registrar", "append_branches", 0) -- this was messing with my
>> config too. I needed to disable it to make it work.
>>
>> Thank you again
>>
>> Jurijs
>>
>>
>> On Tue, Nov 3, 2020 at 12:55 PM Federico Cabiddu <
>> federico.cabi...@gmail.com> wrote:
>>
>>> Hi Jurijs,
>>> I had a look at the logs but they are confusing: looks like there are
>>> two calls (transactions) stored by tsilo and the ts_append is called only
>>> for one.
>>> In the logs you sent:
>>> 1) row 19: an INVITE comes with callid
>>> 9741c821-93b2-1239-0599-024233fefdc7
>>> 2) row 60: since there is no contact the transaction is
>>> suspended (transaction hash:id=9467:1575872173)
>>> 3) row 132: a REGISTER is received from the user for which the
>>> transaction was suspended
>>> 4) row 193 onward: the transaction 9467:1575872173 is resumed, the
>>> INVITE is sent out and the transaction stored by tsilo
>>> 5) row 262: another REGISTER from the same instance (same sip.instance
>>> and received) is received
>>> 6) ts_append is called but the transaction hash:id is 16864:783220347
>>> and the callid is 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: when has
>>> this transaction been stored? I couldn't find anywhere in the logs
>>> Which version of kamailio are you using?
>>> Are you setting the "use_domain" tsilo parameter?
>>> First I'd suggest trying to call ts_store specifying the r-uri, as you
>>> do for ts_append.
>>> Then could you please retry the scenario being sure that there is only
>>> one transaction stored?
>>> Thank you,
>>>
>>> Federico
>>>
>>>
>>>
>>>
>>> On Sat, Oct 31, 2020 at 5:16 PM Jurijs Ivolga 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Any ideas regarding "t_append_branches(): failure to add branches (-1)"?
>>>>
>>>> Is there a way somehow to dump what ts_append handover towards tm? I
>>>> think if I would be able to see this I will be able to understand what is
>>>> wrong. I tried tm:local-request and failure route and branch route, but
>>>> these routes are not executed when this error happens.
>>>>
>>>> Maybe the issue is that the TLS connection is established between
>>>> Kamailio and UAC what is in front my Register and this Register kamailio
>>>> just tries to connect directly towards UAC and it fails? At least this is
>>>> my idea why this might fail.
>>>>
>>>> Jurijs
>>>>
>>>>
>>>> On Thu, Oct 29, 2020 at 8:38 AM Jurijs Ivolga 
>>>> wrote:
>>>>
>>>>> Hi Federico,
>>>>>
>>>>> Indeed I had a messed up config at that point. I cleaned it up, but
>>>>> still had the same problem.
>>>>>
>>>>> Full log in attachment.
>>>>>
>>>>> Here is some part of it:
>>>>>
>>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tsilo [ts_append.c:72]:
>>>>>> ts_append(): transaction 16864:783220347 found for
>>>>>> sip:1443452187102-0af7c6035717-0...@voipstaging.myappapp.net, going
>>>>>> to append branches
>>>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_lookup.c:1612]:
>>>>>> t_lookup_ident_filter(): transaction found
>>>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} registrar [lookup.c:306]:
>>>>>> lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by
>>>>>> address
>>>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:77]:
>>>>>> t_append_branches(): transaction 16864:783220347 in status 180
>>>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:99]:
>>>>>> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0:
>>>>>> 1 (0) outgoing branches
>>>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm
>>>>>> [t_append_branches.c:163]: t_append_branches(): Call
>>>>>> 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: 1 (0) outgoing branches
>>>>>> after clear_branches()
>>>>>> 45(51) ERROR: {1 21 REGISTER 6z~FzexPro} tm
>>>>>> [t_append_branches.c:172]: *t_append_branches(): failure to add
>>>>>> branches (-1)*
>>>>>> 45(51) INFO: {1 21 REGISTER 6z~FzexPro} 

Re: [SR-Users] tsilo - failure to add branches (-1)

2020-11-03 Thread Jurijs Ivolga
Hi Federico,

First of all, thank you a lot for helping me. This means a lot to me
This is true open source spirit!!!

So indeed I had messed up config and I was saving transactions incorrectly
and that why you saw 2 call IDs.

I updated my config and now I do save transactions correctly and it works!
I would like to add that I needed to update Registrar settings too:

modparam("registrar", "append_branches", 0) -- this was messing with my
config too. I needed to disable it to make it work.

Thank you again

Jurijs


On Tue, Nov 3, 2020 at 12:55 PM Federico Cabiddu 
wrote:

> Hi Jurijs,
> I had a look at the logs but they are confusing: looks like there are two
> calls (transactions) stored by tsilo and the ts_append is called only for
> one.
> In the logs you sent:
> 1) row 19: an INVITE comes with callid 9741c821-93b2-1239-0599-024233fefdc7
> 2) row 60: since there is no contact the transaction is
> suspended (transaction hash:id=9467:1575872173)
> 3) row 132: a REGISTER is received from the user for which the transaction
> was suspended
> 4) row 193 onward: the transaction 9467:1575872173 is resumed, the INVITE
> is sent out and the transaction stored by tsilo
> 5) row 262: another REGISTER from the same instance (same sip.instance and
> received) is received
> 6) ts_append is called but the transaction hash:id is 16864:783220347 and
> the callid is 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: when has this
> transaction been stored? I couldn't find anywhere in the logs
> Which version of kamailio are you using?
> Are you setting the "use_domain" tsilo parameter?
> First I'd suggest trying to call ts_store specifying the r-uri, as you do
> for ts_append.
> Then could you please retry the scenario being sure that there is only one
> transaction stored?
> Thank you,
>
> Federico
>
>
>
>
> On Sat, Oct 31, 2020 at 5:16 PM Jurijs Ivolga 
> wrote:
>
>> Hi,
>>
>> Any ideas regarding "t_append_branches(): failure to add branches (-1)"?
>>
>> Is there a way somehow to dump what ts_append handover towards tm? I
>> think if I would be able to see this I will be able to understand what is
>> wrong. I tried tm:local-request and failure route and branch route, but
>> these routes are not executed when this error happens.
>>
>> Maybe the issue is that the TLS connection is established between
>> Kamailio and UAC what is in front my Register and this Register kamailio
>> just tries to connect directly towards UAC and it fails? At least this is
>> my idea why this might fail.
>>
>> Jurijs
>>
>>
>> On Thu, Oct 29, 2020 at 8:38 AM Jurijs Ivolga 
>> wrote:
>>
>>> Hi Federico,
>>>
>>> Indeed I had a messed up config at that point. I cleaned it up, but
>>> still had the same problem.
>>>
>>> Full log in attachment.
>>>
>>> Here is some part of it:
>>>
>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tsilo [ts_append.c:72]:
>>>> ts_append(): transaction 16864:783220347 found for
>>>> sip:1443452187102-0af7c6035717-0...@voipstaging.myappapp.net, going to
>>>> append branches
>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_lookup.c:1612]:
>>>> t_lookup_ident_filter(): transaction found
>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} registrar [lookup.c:306]:
>>>> lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by
>>>> address
>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:77]:
>>>> t_append_branches(): transaction 16864:783220347 in status 180
>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:99]:
>>>> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0:
>>>> 1 (0) outgoing branches
>>>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:163]:
>>>> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0:
>>>> 1 (0) outgoing branches after clear_branches()
>>>> 45(51) ERROR: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:172]: 
>>>> *t_append_branches():
>>>> failure to add branches (-1)*
>>>> 45(51) INFO: {1 21 REGISTER 6z~FzexPro} 

Re: [SR-Users] tsilo - failure to add branches (-1)

2020-10-31 Thread Jurijs Ivolga
Hi,

Any ideas regarding "t_append_branches(): failure to add branches (-1)"?

Is there a way somehow to dump what ts_append handover towards tm? I think
if I would be able to see this I will be able to understand what is wrong.
I tried tm:local-request and failure route and branch route, but these
routes are not executed when this error happens.

Maybe the issue is that the TLS connection is established between Kamailio
and UAC what is in front my Register and this Register kamailio just tries
to connect directly towards UAC and it fails? At least this is my idea why
this might fail.

Jurijs


On Thu, Oct 29, 2020 at 8:38 AM Jurijs Ivolga 
wrote:

> Hi Federico,
>
> Indeed I had a messed up config at that point. I cleaned it up, but still
> had the same problem.
>
> Full log in attachment.
>
> Here is some part of it:
>
> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tsilo [ts_append.c:72]:
>> ts_append(): transaction 16864:783220347 found for
>> sip:1443452187102-0af7c6035717-0...@voipstaging.myappapp.net, going to
>> append branches
>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_lookup.c:1612]:
>> t_lookup_ident_filter(): transaction found
>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} registrar [lookup.c:306]:
>> lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by
>> address
>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:77]:
>> t_append_branches(): transaction 16864:783220347 in status 180
>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:99]:
>> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: 1
>> (0) outgoing branches
>> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:163]:
>> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: 1
>> (0) outgoing branches after clear_branches()
>> 45(51) ERROR: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:172]: 
>> *t_append_branches():
>> failure to add branches (-1)*
>> 45(51) INFO: {1 21 REGISTER 6z~FzexPro} 

Re: [SR-Users] tsilo - failure to add branches (-1)

2020-10-29 Thread Jurijs Ivolga
 Hi Federico,

Indeed I had a messed up config at that point. I cleaned it up, but still
had the same problem.

Full log in attachment.

Here is some part of it:

45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tsilo [ts_append.c:72]:
> ts_append(): transaction 16864:783220347 found for
> sip:1443452187102-0af7c6035717-0...@voipstaging.myappapp.net, going to
> append branches
> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_lookup.c:1612]:
> t_lookup_ident_filter(): transaction found
> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} registrar [lookup.c:306]:
> lookup_helper(): contact for [1443452187102-0af7c6035717-0001] found by
> address
> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:77]:
> t_append_branches(): transaction 16864:783220347 in status 180
> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:99]:
> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: 1
> (0) outgoing branches
> 45(51) DEBUG: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:163]:
> t_append_branches(): Call 3ed4a6c3051ea46b50487a0d1b5b25ec@10.10.0.0: 1
> (0) outgoing branches after clear_branches()
> 45(51) ERROR: {1 21 REGISTER 6z~FzexPro} tm [t_append_branches.c:172]: 
> *t_append_branches():
> failure to add branches (-1)*
> 45(51) INFO: {1 21 REGISTER 6z~FzexPro} 

Re: [SR-Users] tsilo - failure to add branches (-1)

2020-10-27 Thread Jurijs Ivolga
Hi Daniel-Constantin,

Debug log is intachment. Do you see any hints?

I think this is relative part:

2020-10-27T08:24:36.198Z,"79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tsilo
> [ts_append.c:72]: ts_append(): transaction 21280:984985415 found for
> sip:1443452187102-0af7c6035717-0...@voipstaging.myapp.net, going to
> append branches"
> 2020-10-27T08:24:36.198Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~}
> registrar [lookup.c:306]: lookup_helper(): contact for
> [1443452187102-0af7c6035717-0001] found by address
> 2020-10-27T08:24:36.198Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_lookup.c:1612]: t_lookup_ident_filter(): transaction found
> 2020-10-27T08:24:36.199Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:77]: t_append_branches(): transaction 21280:984985415
> in status 180
> 2020-10-27T08:24:36.199Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:99]: t_append_branches(): Call
> 88cc06a544ba41a8aee5035c437baabf@0.0.0.0: 1 (0) outgoing branches
> 2020-10-27T08:24:36.205Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:163]: t_append_branches(): Call
> 88cc06a544ba41a8aee5035c437baabf@0.0.0.0: 1 (0) outgoing branches after
> clear_branches()
> 2020-10-27T08:24:36.206Z,"79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tsilo
> [ts_append.c:72]: ts_append(): transaction 38832:1600293484 found for
> sip:1443452187102-0af7c6035717-0...@voipstaging.myapp.net, going to
> append branches"
> 2020-10-27T08:24:36.206Z,79(85) ERROR: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:172]:* t_append_branches(): failure to add branches
> (-1)*
> 2020-10-27T08:24:36.207Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~}
> registrar [lookup.c:306]: lookup_helper(): contact for
> [1443452187102-0af7c6035717-0001] found by address
> 2020-10-27T08:24:36.207Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:77]: t_append_branches(): transaction 38832:1600293484
> in status 180
> 2020-10-27T08:24:36.207Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_lookup.c:1612]: t_lookup_ident_filter(): transaction found
> 2020-10-27T08:24:36.208Z,79(85) ERROR: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:172]: t_append_branches(): failure to add branches (-1)
> 2020-10-27T08:24:36.208Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:99]: t_append_branches(): Call
> aac9c351-92d0-1239-0599-024233fefdc7: 2 (0) outgoing branches
> 2020-10-27T08:24:36.208Z,79(85) DEBUG: {1 21 REGISTER G~qt15Oz7~} tm
> [t_append_branches.c:163]: t_append_branches(): Call
> aac9c351-92d0-1239-0599-024233fefdc7: 2 (0) outgoing branches after
> clear_branches()
> 2020-10-27T08:24:36.209Z,79(85) INFO: {1 21 REGISTER G~qt15Oz7~} 

[SR-Users] tsilo - failure to add branches (-1)

2020-10-27 Thread Jurijs Ivolga
Hi,

I have several Kamailio proxies - loadbalancer which is used as TLS offload
and Authorization server and behind registrar servers.

In this case I can't make tsilo work on the registrar server.

I'm always getting: "tm [t_append_branches.c:172]: t_append_branches():
failure to add branches (-1)"

If I use just one Kamailio which is used as Authorization and Registrar
server then tsilo works as expected.

Looks like kamailio where I run ts_append tries to connect to UAC directly
and not through Loadbalancer.

Any ideas? How can I troubleshoot this?

Thank you!

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


Re: [SR-Users] multi netwotk interface kamailio stops processing packets in one of it's network interfaces although keeps processing in the others

2020-09-16 Thread Jurijs Ivolga
On Wed, 16. Sep 2020 at 21:19, Nuno Miguel Reis 
wrote:

> Hello everyone.
>
> I've started to have an issue with a kamailio 4.4 instance listening on
> multiple network interfaces where it stops processing SIP on one of it's
> network interfaces but still continues to work fine on the others. If I
> restart kamailio everything starts working fine again.
> I'm using the default 'children=8' and one of my guesses on why this could
> be happening is that the number of childs processing couldn't be enough. Do
> you remember anything else on an issue like this where I should be looking?
>
> Thanks.
> --
> Nuno Miguel Reis
> Departamento de Engenharia Informática
> Faculdade de
>
> Ciências e Tecnologia
> Universidade de Coimbra
>
>
> ___
>
> Kamailio (SER) - Users Mailing List
>
> sr-users@lists.kamailio.org
>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
Jurijs
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio routing incoming phone call ranges to different dispatch groups

2020-08-25 Thread Jurijs Ivolga
Hi Patrik,

It would help if you will include your config and some logs.

But something like this should work:

if($rU=~"^(0201316)[0-1][0-9]$")

{

ds_select_dst("1", "4")

}  else {

ds_select_dst("2", "4")

}

I never tried this code, so it might have some errors, but you should
understand the overall idea.

Jurijs


On Tue, Aug 25, 2020 at 9:18 AM Patrik Nilsson  wrote:

> Hi,
>
> Although what I'm trying to achieve seems like an easy task, I have been
> tearing my hair for the past two days getting Kamailio to dispatch incoming
> phone calls to two different groups of Asterisk servers in my dispatcher
> list. I have 30 dedicated phone numbers from Telco: 020131600 - 020131629.
> I want 00-19 to be routed to Group 1, and 20-29 to be routed to Group 2,
> with a Round-robin algorithm. I'm aware that I can set up these incoming
> phone numbers in each Asterisk server's extension dial plans; nevertheless,
> I want Kamailio to do the initial incoming routing to a specific group (as
> Group 2, for instance, will never receive calls from for
> instance 02013161).
>
> Example dispatcher.list:
> #Company A (Group 1)
> 1 sip:10.50.0.1 0 0 maxload=20
> 1 sip:10.50.0.2 0 0 maxload=20
> 1 sip:10.50.0.3 0 0 maxload=20
> #Company B (Group 2)
> 2 sip: 10.60.0.1 0 0 maxload=20
> 2 sip: 10.60.0.2 0 0 maxload=20
> 2 sip: 10.60.0.3 0 0 maxload=20
>
> I assume this is done in the route[DISPATCH] of my kamailio.cfg, using
> ds_select_dst, but my previous attempts to get this routing to work just
> breaks the config file.
>
> I appreciate any help that I can get!
>
> Best regards,
> Patrik
> ___
> 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 does not go to 2nd server

2020-07-21 Thread Jurijs Ivolga
Ah,

I see the problem, just change list file in following way:

1 sip:192.168.0.100:5080 0 0 maxload=20
1 sip:192.168.0.101:5080 0 0 maxload=20

Jurijs


On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga 
wrote:

> Hi Aristedis,
>
> Sorry, indeed you have module parameters.
>
> When one asterisk is down what you see when you run:
>
> kamcmd dispatcher.list
>
> Jurijs
>
>
> On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras 
> wrote:
>
>> i know that there is something wrong, but i can not figure it out.
>> Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I
>> already had them. it is the kamailio.cfg that I originally attached.
>>
>> Unfortunately I did not manage to find anything in the parameters that
>> will solve the problem as proposed by Villasmil and Semenov. I have given a
>> try on changes but nothing good came up.
>>
>>
>>
>> Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov <
>> arsper...@gmail.com> έγραψε:
>>
>>> Hi Aristeidis,
>>> David is right, first would be good to check the status of the
>>> destinations.
>>>
>>> In your configuration there are couple of things to have in mind: need
>>> to set correct flag param
>>>
>>> https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p.flags
>>> select the algorithm used to select the destination (ds_select_dst) and
>>> have a faulure_route where the next destination will be tried in case first
>>> is down.
>>> You can find the examples in the module doc.
>>>
>>> Cheers,
>>>
>>> On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras 
>>> wrote:
>>>
>>>> I have a Kamailio and 2 asterisk servers. All users are created in both
>>>> of the asterisk servers. I am forwarding the registration to asterisk. The
>>>> problem is that it is always used on only one server from the list. Even if
>>>> one goes to shutdown, then there is not any registration sent to the
>>>> available server. Even if *some *of the extensions can be seen
>>>> registered in both of the asterisk's, if the secondary goes down, then
>>>> there are no services for the phones.
>>>>
>>>> I am attaching the kamailio.cfg. My dispatch list is:
>>>> 1 sip:192.168.0.100:5080 0 0 maxload=20
>>>> 2 sip:192.168.0.101:5080 0 0 maxload=20
>>>>
>>>> In both of the asterisk servers i am using sip.conf to create users and
>>>> s sip trunk for the Kamailio. Nothing special about it.
>>>>
>>>> I am looking to find what is wrong with my config and i cannot
>>>> loadbalance/failover to the asterisk servers.
>>>>
>>>>
>>>>
>>>> ___
>>>> 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
>>>
>> ___
>> 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 does not go to 2nd server

2020-07-21 Thread Jurijs Ivolga
Hi Aristedis,

Sorry, indeed you have module parameters.

When one asterisk is down what you see when you run:

kamcmd dispatcher.list

Jurijs


On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras 
wrote:

> i know that there is something wrong, but i can not figure it out.
> Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I
> already had them. it is the kamailio.cfg that I originally attached.
>
> Unfortunately I did not manage to find anything in the parameters that
> will solve the problem as proposed by Villasmil and Semenov. I have given a
> try on changes but nothing good came up.
>
>
>
> Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov <
> arsper...@gmail.com> έγραψε:
>
>> Hi Aristeidis,
>> David is right, first would be good to check the status of the
>> destinations.
>>
>> In your configuration there are couple of things to have in mind: need to
>> set correct flag param
>>
>> https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p.flags
>> select the algorithm used to select the destination (ds_select_dst) and
>> have a faulure_route where the next destination will be tried in case first
>> is down.
>> You can find the examples in the module doc.
>>
>> Cheers,
>>
>> On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras 
>> wrote:
>>
>>> I have a Kamailio and 2 asterisk servers. All users are created in both
>>> of the asterisk servers. I am forwarding the registration to asterisk. The
>>> problem is that it is always used on only one server from the list. Even if
>>> one goes to shutdown, then there is not any registration sent to the
>>> available server. Even if *some *of the extensions can be seen
>>> registered in both of the asterisk's, if the secondary goes down, then
>>> there are no services for the phones.
>>>
>>> I am attaching the kamailio.cfg. My dispatch list is:
>>> 1 sip:192.168.0.100:5080 0 0 maxload=20
>>> 2 sip:192.168.0.101:5080 0 0 maxload=20
>>>
>>> In both of the asterisk servers i am using sip.conf to create users and
>>> s sip trunk for the Kamailio. Nothing special about it.
>>>
>>> I am looking to find what is wrong with my config and i cannot
>>> loadbalance/failover to the asterisk servers.
>>>
>>>
>>>
>>> ___
>>> 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
>>
> ___
> 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 does not go to 2nd server

2020-07-21 Thread Jurijs Ivolga
Hi Aristeidis,

In your case Dispatcher module is misconfigured and it missing crutials
parts like:

modparam("dispatcher", "flags", 2)   # without this flag no failover will
happen, as you experiencing
modparam("dispatcher", "xavp_dst", "_dsdst_")  # this xavps will hold the
list with addresses and associated properties, without it no failover will
happen
modparam("dispatcher", "xavp_ctx", "_dsctx_") #  The name of the XAVP which
will hold some attributes specific to dispatcher routing context. I'm not
100% sure, but I think it will not work without this xavp too, in all my
configurations it is there.

Jurijs


On Tue, Jul 21, 2020 at 2:22 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> First thing is trying to get both servers status on opensips and make sure
> opensips sees them up:
>
> https://opensips.org/html/docs/modules/2.3.x/dispatcher.html#idp5739696
>
>
>
>
> On Tue, 21 Jul 2020 at 12:12, Aristeidis Tsitras 
> wrote:
>
>> I have a Kamailio and 2 asterisk servers. All users are created in both
>> of the asterisk servers. I am forwarding the registration to asterisk. The
>> problem is that it is always used on only one server from the list. Even if
>> one goes to shutdown, then there is not any registration sent to the
>> available server. Even if *some *of the extensions can be seen
>> registered in both of the asterisk's, if the secondary goes down, then
>> there are no services for the phones.
>>
>> I am attaching the kamailio.cfg. My dispatch list is:
>> 1 sip:192.168.0.100:5080 0 0 maxload=20
>> 2 sip:192.168.0.101:5080 0 0 maxload=20
>>
>> In both of the asterisk servers i am using sip.conf to create users and s
>> sip trunk for the Kamailio. Nothing special about it.
>>
>> I am looking to find what is wrong with my config and i cannot
>> loadbalance/failover to the asterisk servers.
>>
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> 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] Kamailio stop responding to AWS R53 health check

2019-11-13 Thread Jurijs Ivolga
Hi Andrew,

I'm pretty sure this is bug what you are talking about:

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

It should be fixed in 5.3.0 I believe, or you can always downgrade openssl
to 1.0 as described here:

https://www.kamailio.org/wiki/tutorials/tls/howto-openssl-1-0

Jurijs


On Wed, Nov 13, 2019 at 10:40 PM Andrew Chen  wrote:

> So another update.  As it turns out, this remote IP sent a slew of tls
> connections to the Kamailio box within the same second:
>
> root@sjoprodkama51:/var/log # grep 104.248.215.53 falco_events.log | wc -l
> 114
> root@sjoprodkama51:/var/log #
>
> this all came in at 18:28:05 which matches the time of those errors.
>
> Should this cause Kamailio to totally freeze up?
>
> On Wed, Nov 13, 2019 at 2:51 PM Andrew Chen  wrote:
>
>> Hi Karsten,
>>
>> Good point.  See below:
>>
>> Kamailio ver: 5.2.5+bionic
>> Ubuntu version: 18.04.02 LTS
>> Kernel version: 4.15.0-1043-aws #45-Ubuntu SMP Mon Jun 24 14:07:03 UTC
>> 2019 x86_64 x86_64 x86_64 GNU/Linux
>> openssl version: 1.1.1-1ubuntu2.1~18.04.4
>>
>>
>> Setup:
>> - R53 is our load balancer on top running health check on a pair of kams.
>> - First node has no issues and running the same setup + SIP traffic
>> - Second node as shown above was the one that went into "Unhealthy" state.
>>
>> Hope this helps
>>
>> On Wed, Nov 13, 2019 at 2:46 PM Karsten Horsmann 
>> wrote:
>>
>>> Hi Andrew,
>>>
>>> Would help if you could could describe your setup a bit more.
>>>
>>> Like the Kamailio version, the system distro and as we see many tls
>>> messages your openssl version.
>>>
>>> Maybe the traveling developers have any ideas then.
>>>
>>> Cheers
>>> Karsten Horsmann
>>>
>>> Andrew Chen  schrieb am Mi., 13. Nov. 2019, 20:29:
>>>
 Hi all,


 R53 reported healthcheck failure on tcp port 5060.  Looking at the
 system, all the ports that kamailio listens on can't be monitored
 remotely.  To test this theory, I can telnet successfully to consul port.
 I ran tcpdump and see no responses returned back to R53 monitoring hosts:

 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 listening on ens5, link-type EN10MB (Ethernet), capture size 262144 bytes
 19:11:49.368378 IP ec2-54-241-32-75.us-west-1.compute.amazonaws.com.10072 
 > sjoprodkama51.fuzemeeting.com.sip: Flags [S], seq 1252984048, win 29200, 
 options [mss 1460,sackOK,TS val 3770272726 ecr 0,nop,wscale 7], length 0
 19:11:49.558877 IP ec2-107-23-255-43.compute-1.amazonaws.com.60794 > 
 sjoprodkama51.fuzemeeting.com.sip: Flags [S], seq 3484910496, win 29200, 
 options [mss 1460,sackOK,TS val 1780607162 ecr 0,nop,wscale 7], length 0
 19:11:50.572870 IP ec2-107-23-255-43.compute-1.amazonaws.com.60794 > 
 sjoprodkama51.fuzemeeting.com.sip: Flags [S], seq 3484910496, win 29200, 
 options [mss 1460,sackOK,TS val 1780608175 ecr 0,nop,wscale 7], length 0

 Fixed the issue after restarting kamailio process.

 Given this system is support production traffic, we have minimized the
 logging on it.  The events that we thought may lead to this is as follows:

   Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: tls
 [tls_util.h:42]: tls_err_ret(): TLS accept:error:14209102:SSL
 routines:tls_early_post_process_client_hello:unsupported protocol
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: 
 [core/tcp_read.c:1505]: tcp_read_req(): ERROR: tcp_read_req: error reading
 - c: 0x7f33fda47c98 r: 0x7f33fda47d18 (-1)
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: tls
 [tls_util.h:42]: tls_err_ret(): TLS accept:error:14209102:SSL
 routines:tls_early_post_process_client_hello:unsupported protocol
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: 
 [core/tcp_read.c:1505]: tcp_read_req(): ERROR: tcp_read_req: error reading
 - c: 0x7f33fda47c98 r: 0x7f33fda47d18 (-1)
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20306]: ERROR: tls
 [tls_util.h:42]: tls_err_ret(): TLS accept:error:14209102:SSL
 routines:tls_early_post_process_client_hello:unsupported protocol
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20306]: ERROR: 
 [core/tcp_read.c:1505]: tcp_read_req(): ERROR: tcp_read_req: error reading
 - c: 0x7f33fd960380 r: 0x7f33fd960400 (-1)
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: tls
 [tls_util.h:42]: tls_err_ret(): TLS accept:error:14209102:SSL
 routines:tls_early_post_process_client_hello:unsupported protocol
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: 
 [core/tcp_read.c:1505]: tcp_read_req(): ERROR: tcp_read_req: error reading
 - c: 0x7f33fda01dc0 r: 0x7f33fda01e40 (-1)
 Nov 13 18:28:05 sjoprodkama51 /usr/sbin/kamailio[20304]: ERROR: tls
 [tls_util.h:42]: tls_err_ret(): TLS accept:error:14209102:SSL
 routines:tls_early_post_process_client_hello:unsupported 

Re: [SR-Users] Changing $fU or $fn in branch_route

2019-10-18 Thread Jurijs Ivolga
Hi Daniel,

Now it is clear. :)

Jurijs


On Fri, Oct 18, 2019 at 12:08 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> changing content in SIP headers is practically done as two operations:
>
>   - delete old value
>   - insert the new value where the old value started
>
> By doing two changes to the same content (without an intermediate msg
> apply changes), practically you insert two new values where the old value
> started. The result being that the two new values appear one after the
> other.
>
> Cheers,
> Daniel
> On 17.10.19 22:11, Jurijs Ivolga wrote:
>
> Hi Daniel,
>
> I got that changes are not applied immediately. When I check SIP packet
> itself what was sent out I see that from header has user part equal to
> "1234567+123456". I think this might be a bug...
>
> Thank you!
>
> On Thu, 17. Oct 2019 at 22:22, Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> assigning to $fn, $fu or $fU is offered as a convenience way to update
>> parts of From header, but the changes are not applied immediately, like the
>> other operations done over the SIP headers -- see more details in the FAQ:
>>
>>   -
>> https://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or
>>
>> In your case, try to do those changes only in branch_route.
>>
>> Cheers,
>> Daniel
>> On 17.10.19 20:59, Jurijs Ivolga wrote:
>>
>> Hi,
>>
>> Just to add one more point that $fU & $fn I'm checking not in script but
>> in SIP packet. So using sngrep i see in SIP packet from header where $fU
>> and $fn are "1234567+123456".
>>
>> Jurijs
>>
>>
>> On Thu, Oct 17, 2019 at 1:06 PM Jurijs Ivolga 
>> wrote:
>>
>>> Hi!
>>>
>>> I have small problem. When I assign $fU or $fn in request-route and then
>>> one more time I make new assignment in branch_route.  Instead of rewriting
>>> it is just concatenate needed value at the end. lets assume
>>> $avp(cli)=1234567 and $avp(cliplus)=+1234567. So if in request_route I
>>> do $fU=$avp(cli); and then in branch_route $fU=$avp(cliplus);. $fU becomes
>>> one string: "1234567+1234567". Is it a bug or I missing something?
>>>
>>> Here is config snippet:
>>>
>>> request_route {
>>> ...
>>> route(MY);
>>> ...
>>> }
>>>
>>> route[MY] {
>>>
>>> ...
>>> $avp(cli) = "1234567"
>>> $avp(cliplus) = "+"+$avp(cli);
>>> $fU=$avp(cli); # here $fU=1234567
>>> $fn=$avp(cli); # here $fn=1234567
>>> route(LCR_ROUTE);
>>> exit;
>>> }
>>>
>>> route[LCR_ROUTE]
>>> {
>>> if(!is_method("INVITE"))
>>> return;
>>> if (!load_gws("1",$rU,$avp(cli))) {
>>> send_reply("503", "Error loading gateways");
>>> exit;
>>> }
>>>
>>> $var(i)=0;
>>> while($(avp(lcr_gw_uri)[$var(i)])!= $null){
>>> xlog("L_INFO", "loaded
>>> gw_uri_avp[$var(i)]=$(avp(lcr_gw_uri)[$var(i)]) \n");
>>> $var(i) = $var(i)+1;
>>> }
>>>
>>> if (!next_gw()) {
>>> send_reply("503", "No available gateways");
>>> exit;
>>> }
>>>
>>> xlog("L_INFO", "request-uri $ru \n");
>>> xlog("L_INFO", "$avp(lcr_gw_uri), $avp(lcr_id)\n");
>>>
>>> xlog("L_INFO", "flag $avp(lcr_flag) \n");
>>>
>>> t_set_fr(0, 4000);
>>> t_on_failure("RTF_LCR_ROUTE");
>>> t_on_branch("BRANCH_CUST");
>>> route(RELAY);
>>> exit;
>>> }
>>>
>>> branch_route[BRANCH_CUST] {
>>> if ( $avp(lcr_flag) == 4) {
>>> $fU=$avp(cliplus); #here $fU=1234567+1234567
>>> $fn=$avp(cliplus); #here $fn=1234567+1234567
>>> }
>>> }
>>>
>>> Jurijs
>>>
>>
>> ___
>> 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
>> Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- 
>> https://asipto.com/u/kat
>>
>> --
> Jurijs
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- 
> https://asipto.com/u/kat
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Changing $fU or $fn in branch_route

2019-10-17 Thread Jurijs Ivolga
Hi Daniel,

I got that changes are not applied immediately. When I check SIP packet
itself what was sent out I see that from header has user part equal to
"1234567+123456". I think this might be a bug...

Thank you!

On Thu, 17. Oct 2019 at 22:22, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> assigning to $fn, $fu or $fU is offered as a convenience way to update
> parts of From header, but the changes are not applied immediately, like the
> other operations done over the SIP headers -- see more details in the FAQ:
>
>   -
> https://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or
>
> In your case, try to do those changes only in branch_route.
>
> Cheers,
> Daniel
> On 17.10.19 20:59, Jurijs Ivolga wrote:
>
> Hi,
>
> Just to add one more point that $fU & $fn I'm checking not in script but
> in SIP packet. So using sngrep i see in SIP packet from header where $fU
> and $fn are "1234567+123456".
>
> Jurijs
>
>
> On Thu, Oct 17, 2019 at 1:06 PM Jurijs Ivolga 
> wrote:
>
>> Hi!
>>
>> I have small problem. When I assign $fU or $fn in request-route and then
>> one more time I make new assignment in branch_route.  Instead of rewriting
>> it is just concatenate needed value at the end. lets assume
>> $avp(cli)=1234567 and $avp(cliplus)=+1234567. So if in request_route I
>> do $fU=$avp(cli); and then in branch_route $fU=$avp(cliplus);. $fU becomes
>> one string: "1234567+1234567". Is it a bug or I missing something?
>>
>> Here is config snippet:
>>
>> request_route {
>> ...
>> route(MY);
>> ...
>> }
>>
>> route[MY] {
>>
>> ...
>> $avp(cli) = "1234567"
>> $avp(cliplus) = "+"+$avp(cli);
>> $fU=$avp(cli); # here $fU=1234567
>> $fn=$avp(cli); # here $fn=1234567
>> route(LCR_ROUTE);
>> exit;
>> }
>>
>> route[LCR_ROUTE]
>> {
>> if(!is_method("INVITE"))
>> return;
>> if (!load_gws("1",$rU,$avp(cli))) {
>> send_reply("503", "Error loading gateways");
>> exit;
>> }
>>
>> $var(i)=0;
>> while($(avp(lcr_gw_uri)[$var(i)])!= $null){
>> xlog("L_INFO", "loaded
>> gw_uri_avp[$var(i)]=$(avp(lcr_gw_uri)[$var(i)]) \n");
>> $var(i) = $var(i)+1;
>> }
>>
>> if (!next_gw()) {
>> send_reply("503", "No available gateways");
>> exit;
>> }
>>
>> xlog("L_INFO", "request-uri $ru \n");
>> xlog("L_INFO", "$avp(lcr_gw_uri), $avp(lcr_id)\n");
>>
>> xlog("L_INFO", "flag $avp(lcr_flag) \n");
>>
>> t_set_fr(0, 4000);
>> t_on_failure("RTF_LCR_ROUTE");
>> t_on_branch("BRANCH_CUST");
>> route(RELAY);
>> exit;
>> }
>>
>> branch_route[BRANCH_CUST] {
>> if ( $avp(lcr_flag) == 4) {
>> $fU=$avp(cliplus); #here $fU=1234567+1234567
>> $fn=$avp(cliplus); #here $fn=1234567+1234567
>> }
>> }
>>
>> Jurijs
>>
>
> ___
> 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
> Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- 
> https://asipto.com/u/kat
>
> --
Jurijs
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Changing $fU or $fn in branch_route

2019-10-17 Thread Jurijs Ivolga
Hi,

Just to add one more point that $fU & $fn I'm checking not in script but in
SIP packet. So using sngrep i see in SIP packet from header where $fU and
$fn are "1234567+123456".

Jurijs


On Thu, Oct 17, 2019 at 1:06 PM Jurijs Ivolga 
wrote:

> Hi!
>
> I have small problem. When I assign $fU or $fn in request-route and then
> one more time I make new assignment in branch_route.  Instead of rewriting
> it is just concatenate needed value at the end. lets assume
> $avp(cli)=1234567 and $avp(cliplus)=+1234567. So if in request_route I
> do $fU=$avp(cli); and then in branch_route $fU=$avp(cliplus);. $fU becomes
> one string: "1234567+1234567". Is it a bug or I missing something?
>
> Here is config snippet:
>
> request_route {
> ...
> route(MY);
> ...
> }
>
> route[MY] {
>
> ...
> $avp(cli) = "1234567"
> $avp(cliplus) = "+"+$avp(cli);
> $fU=$avp(cli); # here $fU=1234567
> $fn=$avp(cli); # here $fn=1234567
> route(LCR_ROUTE);
> exit;
> }
>
> route[LCR_ROUTE]
> {
> if(!is_method("INVITE"))
> return;
> if (!load_gws("1",$rU,$avp(cli))) {
> send_reply("503", "Error loading gateways");
> exit;
> }
>
> $var(i)=0;
> while($(avp(lcr_gw_uri)[$var(i)])!= $null){
> xlog("L_INFO", "loaded
> gw_uri_avp[$var(i)]=$(avp(lcr_gw_uri)[$var(i)]) \n");
> $var(i) = $var(i)+1;
> }
>
> if (!next_gw()) {
> send_reply("503", "No available gateways");
> exit;
> }
>
> xlog("L_INFO", "request-uri $ru \n");
> xlog("L_INFO", "$avp(lcr_gw_uri), $avp(lcr_id)\n");
>
> xlog("L_INFO", "flag $avp(lcr_flag) \n");
>
> t_set_fr(0, 4000);
> t_on_failure("RTF_LCR_ROUTE");
> t_on_branch("BRANCH_CUST");
> route(RELAY);
> exit;
> }
>
> branch_route[BRANCH_CUST] {
> if ( $avp(lcr_flag) == 4) {
> $fU=$avp(cliplus); #here $fU=1234567+1234567
> $fn=$avp(cliplus); #here $fn=1234567+1234567
> }
> }
>
> Jurijs
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Changing $fU or $fn in branch_route

2019-10-17 Thread Jurijs Ivolga
Hi!

I have small problem. When I assign $fU or $fn in request-route and then
one more time I make new assignment in branch_route.  Instead of rewriting
it is just concatenate needed value at the end. lets assume
$avp(cli)=1234567 and $avp(cliplus)=+1234567. So if in request_route I
do $fU=$avp(cli); and then in branch_route $fU=$avp(cliplus);. $fU becomes
one string: "1234567+1234567". Is it a bug or I missing something?

Here is config snippet:

request_route {
...
route(MY);
...
}

route[MY] {

...
$avp(cli) = "1234567"
$avp(cliplus) = "+"+$avp(cli);
$fU=$avp(cli); # here $fU=1234567
$fn=$avp(cli); # here $fn=1234567
route(LCR_ROUTE);
exit;
}

route[LCR_ROUTE]
{
if(!is_method("INVITE"))
return;
if (!load_gws("1",$rU,$avp(cli))) {
send_reply("503", "Error loading gateways");
exit;
}

$var(i)=0;
while($(avp(lcr_gw_uri)[$var(i)])!= $null){
xlog("L_INFO", "loaded
gw_uri_avp[$var(i)]=$(avp(lcr_gw_uri)[$var(i)]) \n");
$var(i) = $var(i)+1;
}

if (!next_gw()) {
send_reply("503", "No available gateways");
exit;
}

xlog("L_INFO", "request-uri $ru \n");
xlog("L_INFO", "$avp(lcr_gw_uri), $avp(lcr_id)\n");

xlog("L_INFO", "flag $avp(lcr_flag) \n");

t_set_fr(0, 4000);
t_on_failure("RTF_LCR_ROUTE");
t_on_branch("BRANCH_CUST");
route(RELAY);
exit;
}

branch_route[BRANCH_CUST] {
if ( $avp(lcr_flag) == 4) {
$fU=$avp(cliplus); #here $fU=1234567+1234567
$fn=$avp(cliplus); #here $fn=1234567+1234567
}
}

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


Re: [SR-Users] Kamailio stop to process incoming SIP traffic via TCP.

2019-10-03 Thread Jurijs Ivolga
Hi Daniel,

I hope you are well. Do you have any updates on this issue? Did you get any
response on openssl mailing list? Thank you!

With kind regards,

Jurijs


On Mon, Apr 1, 2019 at 11:55 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> an update on this issue -- I spent a bit of time looking at
> libssl/libcrypto library and the problem can be the type of mutexes they
> use now internally starting with v1.1, respectively the pthread mutex.
> They are not process shared and kamailio is a multi-process application,
> working with the same tls connection from multiple processes.
>
> Today I wrote to openssl mailing list, waiting now to see if I get any
> hints from there.
>
> Cheers,
> Daniel
>
> On 01.04.19 10:33, Kristijan Vrban wrote:
> > Hi Andrew,
> >
> > yes, with openssl 1.0.2 Kamailio is now up and running since five
> > days. Looks good so far.
> >
> > Kristijan
> >
> > Am Do., 28. März 2019 um 11:09 Uhr schrieb Andrew Pogrebennyk
> > :
> >> On 3/26/19 3:52 PM, Kristijan Vrban wrote:
>  Just curious, did you get to compile with OpenSSL 1.0 and test?
> >>> Just compiled with OpenSSL 1.0 . Gone test now.
> >> Kristijan,
> >> any new occurrences since you have recompiled kamailio with openssl 1.0?
> >>
> >> Regards,
> >> Andrew
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>
>
> ___
> 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] Kamailio stop to process incoming SIP traffic via TCP.

2019-02-27 Thread Jurijs Ivolga
Hi,

Just to add that in my case I had a problem when after some period of time
with a lot of TLS clients(100k+) I got a lot of TCP connections in
CLOSE_WAIT state. When connections in CLOSE_WAIT state hit more then 1k,
then kamailio stopped to receive traffic via TLS, nevertheless UDP at same
time worked fine. From my point of view it looked like there was issue
somewhere on Linux side, cause Kamailio never got anything... At least this
is what I remember... I still plan to work on it someday. :) And if I will
find out, I'll let you know.

Jurijs


On Wed, Feb 27, 2019 at 1:13 PM Kristijan Vrban 
wrote:

> when is strace to the kamailio process that is attached to the tcp
> port. it get sporadic this:
>
> [], 46, 5000)= 0
> epoll_wait(17, [{EPOLLIN, {u32=2692971064, u64=139924137540152}}], 46,
> 5000) = 1
> accept(14, {sa_family=AF_INET, sin_port=htons(59766),
> sin_addr=inet_addr("xxx.xx.xxx.xxx")}, [28->16]) = 275
> fcntl(275, F_GETFL) = 0x2 (flags O_RDWR)
> fcntl(275, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
> epoll_ctl(17, EPOLL_CTL_ADD, 275, {EPOLLIN|EPOLLRDHUP,
> {u32=2692977328, u64=139924137546416}}) = 0
> epoll_wait(17, [{EPOLLIN, {u32=2692977328, u64=139924137546416}}], 47,
> 5000) = 1
> epoll_ctl(17, EPOLL_CTL_DEL, 275, 0x7ffdae44ee4c) = 0
> recvmsg(53, {msg_namelen=0}, MSG_DONTWAIT) = -1 EAGAIN (Resource
> temporarily unavailable)
> recvfrom(56, 0x7ffdae44ed90, 16, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN
> (Resource temporarily unavailable)
> sendmsg(56, {msg_name=NULL, msg_namelen=0,
> msg_iov=[{iov_base="\210ku\230B\177\0\0", iov_len=8}], msg_iovlen=1,
> msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET,
> cmsg_type=SCM_RIGHTS, cmsg_data=[275]}], msg_controllen=20,
> msg_flags=0}, 0) = 8
> epoll_wait(17,
>
> But that's all, no further processing by kamailio.
>
> Am Mi., 27. Feb. 2019 um 11:53 Uhr schrieb Kristijan Vrban
> :
> >
> > Hi kamailios,
> >
> > i have a creepy situation with v5.2.1 stable Kamilio. After a day or
> > so, Kamailio stop to process incoming SIP traffic via TCP. The
> > incoming TCP network packages get TCP-ACK from the OS (Debian 9,
> > 4.18.0-15-generic-Linux) but Kamailio does not show any processing for
> > the SIP-Traffic incoming via TCP. No logs, nothing. While traffic via
> > UDP is working just totally fine.
> >
> > When i look via command "netstat -ntp" is see, that the Recv-Q get
> > bigger and bigger. e.g.:
> >
> > Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program
> > name tcp 4566 0 172.17.217.12:5060 xxx.xxx.xxx.xxx:57252 ESTABLISHED
> > 31347/kamailio
> >
> > After Kamailio restart, all is working fine again for a day. We have
> > maybe 10-20 devices online via TCP and low call volume (1-2 call per
> > minute). The only settings for tcp we have is "tcp_delayed_ack=no"
> >
> > How to could we debug this situation? Again, no error, no warings in
> > the log. Just nothing.
> >
> > Kristijan
>
> ___
> 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] Kamailio stop to process incoming SIP traffic via TCP.

2019-02-27 Thread Jurijs Ivolga
Hi,

I experienced something similar on Debian Stretch, nevertheless on Debian
Jessie it worked fine. We use TLS and I was thinking that it is something
to do with SSL libraries, but never had chance to find out. But maybe my
problem was nothing to do with what you just described.

Jurijs


On Wed, Feb 27, 2019 at 12:54 PM Kristijan Vrban 
wrote:

> Hi kamailios,
>
> i have a creepy situation with v5.2.1 stable Kamilio. After a day or
> so, Kamailio stop to process incoming SIP traffic via TCP. The
> incoming TCP network packages get TCP-ACK from the OS (Debian 9,
> 4.18.0-15-generic-Linux) but Kamailio does not show any processing for
> the SIP-Traffic incoming via TCP. No logs, nothing. While traffic via
> UDP is working just totally fine.
>
> When i look via command "netstat -ntp" is see, that the Recv-Q get
> bigger and bigger. e.g.:
>
> Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program
> name tcp 4566 0 172.17.217.12:5060 xxx.xxx.xxx.xxx:57252 ESTABLISHED
> 31347/kamailio
>
> After Kamailio restart, all is working fine again for a day. We have
> maybe 10-20 devices online via TCP and low call volume (1-2 call per
> minute). The only settings for tcp we have is "tcp_delayed_ack=no"
>
> How to could we debug this situation? Again, no error, no warings in
> the log. Just nothing.
>
> Kristijan
>
> ___
> 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] invalid version 8 for table aliases found, expected 9

2018-08-21 Thread Jurijs Ivolga
Hi,

I'm pretty sure that you just forgot to update table named - version. Just
try to dump it and see what it contains. It should contain record
version:9, but not 8 as it claims in error message.

With kind regards,

Jurijs


On Tue, Aug 21, 2018 at 2:32 PM Abdulaziz Alghosh  wrote:

> Hi everyone,
>
> i am trying to start kamailio 5.1.4 after the migration from Kamailio
> 3.0.3 but getting newly the following error:
>
> ERROR:  [db.c:450]: db_check_table_version(): invalid version 8 for
> table aliases found, expected 9 (check table structure and table "version")
>
> Allegedlly, this error is because of a wrong version of "aliases" table. I
> followed the Upgrade process starting from 3.0.3 till 5.1.x and I altered
> the structure of my aliase table accordinglly.
> The last new version of aliases is 8 as it is described at the upgrade
> from 4.2.x to 4.3.0
>
> Even though, the error here says that the newest version is 9:
>
> May someone help me to find out if the aliases table's structure was
> renewed in between ?? Is there any modification in the data types?
>
> Thanks in advance
> Abdulaziz
> ___
> 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] Memory leak in tm with push notifications

2018-06-14 Thread Jurijs Ivolga
Hi Henning,

Thank you a lot!

With kind regards,

Jurijs

On Thu, Jun 14, 2018 at 5:02 PM, Henning Westerholt  wrote:

> Am Donnerstag, 14. Juni 2018, 08:31:58 CEST schrieb Jurijs Ivolga:
> > Thank you a lot for your input.
> >
> > But I was asking if there is a point to create patch from this 2 commits
> > and apply to 4.4. Is it worth? Or there is no way to make this work
> > properly on 4.4? As I see, some part of code what is touched by this 2
> > commits differs quite a lot, so I'm bit afraid to create patch and apply
> it
> > to our production servers, especially if I don't have a clue what it
> > affects. :)
>
> Hello Juris,
>
> In my opinion there is indeed a risk that after applying the patch to 4.4
> you
> will run into other problems because the patch does not fit 100%. TM is
> one of
> the most complicated modules, I would not suggest to fiddle with it if you
> don't have a clue, as you mentioned. ;-) There is of course the
> possibility to
> get somebody else to port the patch for you.
>
> But as I already wrote - there are other important bugs which are fixed
> only
> in 5.0 and 5.1. We maintain only the last two stable release, as a project
> policy.
>
> So I would recommend that you update your production systems instead of
> trying
> to re-fit this individual patch into the older code base.
>
> Best regards,
>
> Henning
>
> --
> If you like the work that I do in Kamailio, please consider supporting me
> on
> Patreon: https://www.patreon.com/henningw
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Memory leak in tm with push notifications

2018-06-14 Thread Jurijs Ivolga
Hi Henning,

Thank you a lot for your input.

But I was asking if there is a point to create patch from this 2 commits
and apply to 4.4. Is it worth? Or there is no way to make this work
properly on 4.4? As I see, some part of code what is touched by this 2
commits differs quite a lot, so I'm bit afraid to create patch and apply it
to our production servers, especially if I don't have a clue what it
affects. :)

With kind regards,

Jurijs

On Wed, Jun 13, 2018 at 11:02 PM, Henning Westerholt 
wrote:

> Am Mittwoch, 13. Juni 2018, 09:51:45 CEST schrieb Jurijs Ivolga:
> > I think I have this issue and I'm using 4.4 and I can't use master for
> now.
> > I tried to cherry pick this 2 commits, but unfortunately it do not work.
> >
> > For example commit 5fe2a1a1c67b550431dcae3c98701073f7edd953 make
> changes in
> > function t_continue_helper, but 4.4 do not has such function, it has with
> > slightly different name - t_continue.
> >
> > Same commit add line 258 in src/modules/tm/t_suspend.c, but in 4.4 this
> > part of code is slightly different. There is no " t->flags &=
> > ~T_ASYNC_CONTINUE; " line in same if statement.
> >
> > There is no way to remove line 390 from same file, cause in 4.4 that part
> > of code differs quite a lot.
> >
> > With second patch 72f5eaeeef0239ebd16a2d645b83e83eb1a2b506 there was
> much
> > less problems, but still, there is big difference in part of code near
> line
> > 592 of this commit, but probably in 4.4 i just need to update line 527
> and
> > change "UNREF_FREE(new_cell); " to " UNREF_FREE(new_cell, 0);"
> >
> >
> > Is it a worth to try to cherry pick this 2 commits or there are too much
> > changes between 4.4 and Master and no way to make this work properly?
>
> Hello Juris,
>
> I don't know much details about your setup. But if you don't use a lot of
> custom code that needs to be touched before you can go to 5.1 then an
> update
> should be not difficult. There are also some other important fixes, some
> of
> them security relevant, that you miss as well if you stay on 4.4.
>
> Best regards,
>
> Henning
>
> --
> If you like the work that I do in Kamailio, please consider supporting me
> on
> Patreon: https://www.patreon.com/henningw
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Memory leak in tm with push notifications

2018-06-13 Thread Jurijs Ivolga
Hi,

I think I have this issue and I'm using 4.4 and I can't use master for now.
I tried to cherry pick this 2 commits, but unfortunately it do not work.

For example commit 5fe2a1a1c67b550431dcae3c98701073f7edd953 make changes in
function t_continue_helper, but 4.4 do not has such function, it has with
slightly different name - t_continue.

Same commit add line 258 in src/modules/tm/t_suspend.c, but in 4.4 this
part of code is slightly different. There is no " t->flags &=
~T_ASYNC_CONTINUE; " line in same if statement.

There is no way to remove line 390 from same file, cause in 4.4 that part
of code differs quite a lot.

With second patch 72f5eaeeef0239ebd16a2d645b83e83eb1a2b506 there was much
less problems, but still, there is big difference in part of code near line
592 of this commit, but probably in 4.4 i just need to update line 527 and
change "UNREF_FREE(new_cell); " to " UNREF_FREE(new_cell, 0);"


Is it a worth to try to cherry pick this 2 commits or there are too much
changes between 4.4 and Master and no way to make this work properly?


Please advise.

Thank you!

With kind regards,

Jurijs

On Tue, Jun 12, 2018 at 3:25 PM, Ivaylo Markov  wrote:

> Just in case anyone runs into this kind of problem in the future - commits
> 72f5eaeeef0239ebd16a2d645b83e83eb1a2b506 and
> 5fe2a1a1c67b550431dcae3c98701073f7edd953 (currently in the master branch
> only) seem to fix this.
>
> On 05/28/2018 06:01 PM, Ivaylo Markov wrote:
>
> Hello,
>
> I am trying to set up Kamailio as a push notifications proxy, closely
> following the example in the "Kamailio in a Mobile World" presentation
> (https://www.slideshare.net/FedericoCabiddu/kamailioinamobileworld-51617342).
> I am running Debian 9 and Kamailio 5.1.3 from the official Debian
> repositories.
> I believe the main modules involved in the issue below are tm, tmx, and
> tsilo.
>
> Every call passing through the proxy leads to a small memory leak in the tm
> module - there is a large amount of "delayed free" memory cells from tm's
> internal hash table. At some point the shared memory runs out and Kamailio
> restarts. Using the "kamcmd corex.shm_summary" command I was able to see
> that the top users of shared memory are "tm: h_table.c: build_cell" and
> "core: core/sip_msg_clone.c: sip_msg_shm_clone" with the same allocation
> count.
>
> I experimented with removing different parts of the configuration and
> noticed that commenting out the "t_continue(...)" call in the "PUSHJOIN"
> route
> (see slide #22) prevents the leak from happening. Maybe something in that
> function is incrementing the reference counter to the hash table cell, but
> it is not decrementing the counter when done?
>
> I tried looking around the source code of the tm and tmx modules, but saw
> nothing suspicious. I also tried using gdb with a breakpoint in
> t_continue_helper (tm/t_suspend.c:166) hoping to see what else is accessing
> the htable cell, but was unable to find anything of use.
>
> Has someone encountered anything like this? Can you provide more directions
> on debuggin this? I can provide some bits of configuration, but an entire
> test setup would be rather difficult, unfortunately.
>
> Thank you for your time,
> Ivo
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://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] Kamailio ​ds_ping_interval Performance

2018-04-10 Thread Jurijs Ivolga
Hi,

Please check how SIP works, but as far as I remember if Kamailio gets 200
from Freeswitch #2, it will send cancell to all other branches.

With kind regards,

Jurijs

On Tue, Apr 10, 2018 at 9:01 AM, Atul Thosar  wrote:

> Any pointers, suggestions.
>
> --
> ​Thanks,
> Atul Thosar
>
>
>
> On 8 April 2018 at 17:23, Atul Thosar  wrote:
>
>> Thanks all for your responses.
>>
>>
>> I am new to Kamailio, so appreciate if some one can help me with sample
>> code where kamailio routes call to another FreeSWITCH server if 1st
>> FreeSWITCH server does not respond in some time, say 3 sec. Btw I have a
>> query on this approach. Consider a following scenario -
>>
>> 0. kamailio is configured w/ 2 FreeSWITCH servers in dispatcher and with
>> configuration where on not receiving response to INVITE in 3 sec, kamailio
>> will forward the call to another FreeSWITCH server.
>> 1. kamailio receives INVITE and forwards INVITE to FreeSWITCH #1
>> 2. FreeSWITCH #1 receives INVITE, but 100 trying response could not reach
>> to kamailio bec of network break, say for 4 sec.
>> 3. So After 3 sec, since kamailio does not receive any response from
>> FreeSWITCH #1, it forwards INVITE to FreeSWITCH #2
>> 4. FreeSWITCH #2 responds with 200 OK and kamailio receives it.
>> 5. After 4 sec, when network recovers, FreeSWITCH #1 sends 200 OK to
>> kamailio. How kamailio would behave here? Will it drops the call w/
>> FreeSWITCH #1?
>>
>>
>> --
>> ​Thanks,
>> Atul Thosar
>>
>>
>>
>> On 7 April 2018 at 21:46, Julien Chavanton  wrote:
>>
>>> Hi,
>>>
>>> I would set it to a low value to make sure you avoid sending calls a
>>> Freeswitch server facing problems, in the case of Freeswitch the same GW
>>> will also handle media, if it is having hardtime repliyng to SIP OPTIONS it
>>> will very likely have problem handling the media.
>>>
>>> It may also get worst during the call even stop responsding and loose
>>> transaction in progress or in dialog transactions later like session timers
>>> and BYEs.
>>>
>>> Off loading it may able help other calls already using it.
>>>
>>>
>>> You may push your strategy further thinking about :
>>>
>>> - The risk is that you run out of GW, could be handled when ds_select is
>>> returning nothing.
>>> - Another side effect, would be that you are sending more traffic to
>>> other GW, they must be able to handle the extra load.
>>>
>>> In kamailio 5 there is a new algorithm that behaves better when one GW
>>> is put out of service.
>>>
>>> “11” - use relative weight based load distribution. You have to set the
>>> attribute 'rweight' per each address in destination set. Active host usage
>>> probability is rweight/(SUM of all active host rweights in destination
>>> group).
>>>
>>> Regards
>>> Julien
>>>
>>> On Mon, Apr 2, 2018 at 6:06 PM, Atul Thosar 
>>> wrote:
>>>
 Hi All,
 I am using Kamailio
 ​*​*
 *v4.4.x* to load balanced traffic to FreeSWITCH servers. I have query
 regarding ds_ping_interval and ds_probing_threshold. We have very high
 traffic (around 200-400
 ​ (CPS)​
 calls per sec) hitting on Kamailio which then distribute it to 2-3
 FreeSWITCH servers.
 ​ ​
 What is the optimal value should I set to ds_ping_interval and
 ds_probing_threshold?

 If I set
 ​​
 ds_ping_interval=2 and
 ​​
 ds_probing_threshold=1 then in every 2 sec, I would come to know if my
 ​​
 FreeSWITCH server is down/up. But by setting such low values, I afraid
 there would
 ​be ​
 lot of SIP traffic on network.
 ​ If I set high (say
 ​
 ds_probing_threshold=5) then I may loose high number of calls (200 CPS,
 I will loose 1000 calls) in case
 ​
 FreeSWITCH server is down. ​


 As I said earlier we have very high traffic hitting on Kamailio, can't
 kamailio use INVITE itself to probe FreeSWITCH server is down/up? In case
 of low traffic can't it switch over to OPTION mechanism?

 --
 ​Thanks in Advance​
 ,
 ​​
 Atul
 ​​
 ​​
 ​​



 ___
 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] Need useful graphics ideas

2017-12-06 Thread Jurijs Ivolga
Hi,

You can trigger kamctl and collect necessary data and then push this data
to grafana.

Check this script which collects data for zabbix, but logic should be same:

https://gist.github.com/crashdump/7751564

With kind regards,

Jurijs

On Wed, Dec 6, 2017 at 10:29 AM, Loic Chabert 
wrote:

> Hi,
>
> If you are aware about golang, you should probably wrote a telegraf input
> plugin for kamailio.
>
> Installed on kamalio's Host, telegraf will export metric to influxdb. Then
> you can graph it with grafana :)
>
> Regards.
>
> Le 6 déc. 2017 08:54, "Karsten Horsmann"  a écrit :
>
>> Hello List,
>>
>> I thought about some kind of Kamailio stats source (like registered
>> users, calls active and some other things) to collect them into influx dB
>> and draw them with grafana.
>>
>> How do you solved that?
>>
>> Timer based routes or statsd or whatever?
>>
>> Kind regards
>> Karsten Horsmann
>>
>> ___
>> 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] Kamailio new install, unable to create users

2017-11-23 Thread Jurijs Ivolga
Hi,

https://github.com/kamailio/kamailio/blob/master/utils/kamctl/kamctlrc

Please check lines 36, 39, it should be something like:


## database read/write user
DBRWUSER="root"

## password for database read/write user
DBRWPW="abc123"

Keep in mind in production using root user for this is not recommended.

With kind regards,

Jurijs

On Thu, Nov 23, 2017 at 12:07 PM, Atux Atux <atuxn...@gmail.com> wrote:

> May i have an example please?
> the ip of my kamailio is on 192.168.124.6/24
> the same machine has the mysql with user root and passwd abc123
>
> On Thu, Nov 23, 2017 at 11:43 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com>
> wrote:
>
>> Hi,
>>
>> Make sure that you have proper mysql ip-address, username  and password
>> configured in
>> */etc/kamailio/kamctlrc*
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Thu, Nov 23, 2017 at 11:37 AM, Atux Atux <atuxn...@gmail.com> wrote:
>>
>>> Hi. New to the area and trying to find my way around with kamailio.
>>> In one of my debian servers i need to have kamailio with a gui to start
>>> playing around with it.
>>> i am following the http://kb.asipto.com/kamailio:
>>> skype-like-service-in-less-than-one-hour to install kamailio.
>>> When running kamdbctl create it asks what format coding that i must have
>>> to configure the DB. i simply add latin1 and it goes on.
>>> then when i issue kamctl add daniel 1234qwet it comes with the following
>>> error:
>>> root@debian:~# kamctl add daniel 1234qwet
>>> MySQL password for user 'kamailio@localhost':
>>> ERROR 1045 (28000): Access denied for user 'kamailio'@'localhost'
>>> (using password: YES)
>>> ERROR: introducing the new user 'daniel' to the database failed
>>> root@debian:~#
>>>
>>>
>>> Any ideas on how to proceed with the following error please?
>>>
>>>
>>> ___
>>> 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] Kamailio new install, unable to create users

2017-11-23 Thread Jurijs Ivolga
Hi,

Make sure that you have proper mysql ip-address, username  and password
configured in
*/etc/kamailio/kamctlrc*

With kind regards,

Jurijs

On Thu, Nov 23, 2017 at 11:37 AM, Atux Atux  wrote:

> Hi. New to the area and trying to find my way around with kamailio.
> In one of my debian servers i need to have kamailio with a gui to start
> playing around with it.
> i am following the http://kb.asipto.com/kamailio:
> skype-like-service-in-less-than-one-hour to install kamailio.
> When running kamdbctl create it asks what format coding that i must have
> to configure the DB. i simply add latin1 and it goes on.
> then when i issue kamctl add daniel 1234qwet it comes with the following
> error:
> root@debian:~# kamctl add daniel 1234qwet
> MySQL password for user 'kamailio@localhost':
> ERROR 1045 (28000): Access denied for user 'kamailio'@'localhost' (using
> password: YES)
> ERROR: introducing the new user 'daniel' to the database failed
> root@debian:~#
>
>
> Any ideas on how to proceed with the following error please?
>
>
> ___
> 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 Jurijs Ivolga
Hi Robert,

I'm not security expert and I'm quite new in docker, but I think password
in Docker container which will be in clear text saved somewhere should not
be a problem, as far as you do not save this password to image or git and
etc...

I think best way for you is to use docker secret and generate then config
file for Kamailio using this docker secrets and then start Kamailio and for
all of this you need to write some kind of Entrypoint script. Here is
example how something similar do Homer Sipcapture, they set environment
variables in docker-compose and then generate config file based on this,
but you can use probably docker secrets instead of environment variables:

https://github.com/sipcapture/homer-docker/tree/master/kamailio

I found one more interesting link regarding docker secrets:

https://blog.mikesir87.io/2017/05/using-docker-secrets-during-development/

With kind regards,

Jurijs

On Thu, Nov 16, 2017 at 11:58 PM, Robert  wrote:

> That’d presumably leave the clear text footprint I'm trying to avoid,
> albeit in a non-Kamailio file. I’ve made a start on an approach to read
> from a file, Docker secrets are basically just files, but the Docker
> platform handles them securely.
>
> Thanks - Robert...
>
> > On 16 Nov 2017, at 21:46, Bastian Triller 
> wrote:
> >
> > 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
>
>
> ___
> 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 Jurijs Ivolga
Hi,

Not sure that this helps, but below is how I solved similar issue by
generating include file inside Docker file using env variables, but this is
not a good approach for sensitive data.

echo "\modparam(\"http_client\", \"httpcon\",
\"apiserver=>https://$apiurl\;); \" >> /kamailio.apiurl

I believe you can use docker secrets, as described below, but I never used
them so I can't help much:

https://medium.com/@basi/docker-environment-variables-expanded-from-secrets-8fa70617b3bc

With kind regards,

Jurijs

On Thu, Nov 16, 2017 at 11:34 AM, 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


Re: [SR-Users] Debian Stretch

2017-09-28 Thread Jurijs Ivolga
Hi,

Ok, I'll confess, I'm running Kamailio in docker and with root user, so
limits should be fine...

With kind regards,

Jurijs

On Thu, Sep 28, 2017 at 2:54 PM, Ludovic Gasc <gml...@gmail.com> wrote:

> Hi Jurijs,
>
> You have also DefaultLimitNOFILE in systemd that could be different of
> the values you see in console: https://www.freedesktop.org/software/
> systemd/man/systemd-system.conf.html
>
> You should test to put LimitNOFILE in systemd unit file, just to be sure.
>
> BTW, we had also some strange behaviors with TCP, Kamailio 5.0 and Debian
> Stretch.
> But with the Kamailio 4.4 integrated in Debian repository, it seems OK for
> now.
>
> Regards.
>
> --
> Ludovic Gasc (GMLudo)
> Lead Developer Architect at ALLOcloud
> https://be.linkedin.com/in/ludovicgasc
>
> 2017-09-28 10:51 GMT+02:00 Jurijs Ivolga <jurijs.ivo...@gmail.com>:
>
>> Hi,
>>
>> There no limits set...
>>
>> core file size  (blocks, -c) unlimited
>> data seg size   (kbytes, -d) unlimited
>> scheduling priority (-e) 0
>> file size   (blocks, -f) unlimited
>> pending signals (-i) 514946
>> max locked memory   (kbytes, -l) 64
>> max memory size (kbytes, -m) unlimited
>> open files  (-n) 1048576
>> pipe size(512 bytes, -p) 8
>> POSIX message queues (bytes, -q) 819200
>> real-time priority  (-r) 0
>> stack size  (kbytes, -s) 8192
>> cpu time   (seconds, -t) unlimited
>> max user processes  (-u) unlimited
>> virtual memory  (kbytes, -v) unlimited
>> file locks  (-x) unlimited
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Thu, Sep 28, 2017 at 11:40 AM, Sergey Safarov <s.safa...@gmail.com>
>> wrote:
>>
>>> Try adjust LimitNOFILE on systemd
>>> <https://www.freedesktop.org/software/systemd/man/systemd.exec.html>
>>> unit
>>> If this will help then create ticker and i will create PR
>>> Example
>>> <https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/debian/freeswitch-systemd.freeswitch.service>
>>>
>>> чт, 28 сент. 2017 г. в 8:51, Jurijs Ivolga <jurijs.ivo...@gmail.com>:
>>>
>>>> Hi Guys,
>>>>
>>>> I recently tried to use Debian Stretch in production and it didn't went
>>>> well. On load(500k-700k SIP messages per day) I get a problem that at some
>>>> point there was a pike of CLOSE_WAIT connections(up to 2k of CLOSE_WAIT
>>>> connections) and no new connections was possible, I tried to figure out
>>>> where problem is, but I didn't found anything in system or Kamailio logs,
>>>> Kamailio just stopped to receive traffic via TCP, but UDP continued to
>>>> work. Test environment where was no load I didn't faced such issue.
>>>>
>>>> Just curious is there anybody who are using Debian Stretch in
>>>> production without issues?
>>>>
>>>> Jurijs
>>>> ___
>>>> 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] Debian Stretch

2017-09-28 Thread Jurijs Ivolga
Hi,

It was just SSL connections.
I needed to restart kamailio, otherwise it just stopped to work.

kamailio 4.4.6 (x86_64/linux) 75f13d, I built from git.

TCP connection lifetime was 124 seconds.

tcp_max_connections=24000

I switched to debian 8 and now it works.

With kind regards,

Jurijs

On Thu, Sep 28, 2017 at 9:57 AM, Daniel-Constantin Mierla <mico...@gmail.com
> wrote:

> Hello,
>
> what is the kamailio version?
>
> Were these bare tcp or also tls connections? Stretch comes with libssl 1.1
> which is a major refactoring and wondering if that can be an effect.
>
> Did you have to restart or the connections were ended after a while? Being
> just a temporary pike ...
>
> What is the tcp connection lifetime value you use?
>
> Might help a bit, you can increase the number of max tcp connections in
> kamailio (default is 2024).
>   - https://www.kamailio.org/wiki/cookbooks/5.0.x/core#tcp_max_connections
>
> Cheers,
> Daniel
>
>
> On 28.09.17 07:51, Jurijs Ivolga wrote:
>
> Hi Guys,
>
> I recently tried to use Debian Stretch in production and it didn't went
> well. On load(500k-700k SIP messages per day) I get a problem that at some
> point there was a pike of CLOSE_WAIT connections(up to 2k of CLOSE_WAIT
> connections) and no new connections was possible, I tried to figure out
> where problem is, but I didn't found anything in system or Kamailio logs,
> Kamailio just stopped to receive traffic via TCP, but UDP continued to
> work. Test environment where was no load I didn't faced such issue.
>
> Just curious is there anybody who are using Debian Stretch in production
> without issues?
>
> Jurijs
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Debian Stretch

2017-09-27 Thread Jurijs Ivolga
Hi Guys,

I recently tried to use Debian Stretch in production and it didn't went
well. On load(500k-700k SIP messages per day) I get a problem that at some
point there was a pike of CLOSE_WAIT connections(up to 2k of CLOSE_WAIT
connections) and no new connections was possible, I tried to figure out
where problem is, but I didn't found anything in system or Kamailio logs,
Kamailio just stopped to receive traffic via TCP, but UDP continued to
work. Test environment where was no load I didn't faced such issue.

Just curious is there anybody who are using Debian Stretch in production
without issues?

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


Re: [SR-Users] How to change SDP in 200 Ok reply

2017-09-26 Thread Jurijs Ivolga
Hi,

Sorry it was my mistake, I was searching for wrong string. :)

With kind regards,

Jurijs

On Tue, Sep 26, 2017 at 10:47 AM, Daniel-Constantin Mierla <
mico...@gmail.com> wrote:

> Hello,
>
> if it is onreply_route{} (or reply_route{}), then it is executed for SIP
> replies, not requests.
>
> Are you sure it is executed against the INVITE request? You can add an
> xlog at the top of the block and see in the logs if it is reply or request
> (there are functions or variables for it).
>
> Cheers,
> Daniel
>
> On 26.09.17 09:17, Jurijs Ivolga wrote:
>
> Hi,
>
> I have difficult times to edit SDP in 200 ok replies, I need to change
> RTP/SAVPF to UDP/TLS/RTP/SAVPF in all 200 Ok.
>
> Here is code snippet:
>
> onreply_route {
> if ( $rm == "INVITE" && status=="200") {
> if (search_body("a=fingerprint")) {
> if (search_body(" RTP/SAVPF ")) {
> xlog("L_INFO","200 OK DTLS
> call.\n");
> replace_body_all(" RTP/SAVPF ","
> UDP/TLS/RTP/SAVPF ");
> }
> }
> }
> }
>
> What I'm doing wrong?
>
> I think my code is executed against SDP of Invite, but not 200 OK.
>
> Jurijs
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] How to change SDP in 200 Ok reply

2017-09-26 Thread Jurijs Ivolga
Hi,

I have difficult times to edit SDP in 200 ok replies, I need to change
RTP/SAVPF to UDP/TLS/RTP/SAVPF in all 200 Ok.

Here is code snippet:

onreply_route {
if ( $rm == "INVITE" && status=="200") {
if (search_body("a=fingerprint")) {
if (search_body(" RTP/SAVPF ")) {
xlog("L_INFO","200 OK DTLS
call.\n");
replace_body_all(" RTP/SAVPF ","
UDP/TLS/RTP/SAVPF ");
}
}
}
}

What I'm doing wrong?

I think my code is executed against SDP of Invite, but not 200 OK.

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


Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
Hi,

First try to set variable in vars.xml, as I sent if didn't help, you can
try to turn encryption off on your CSipSimple

With kind regards,

Jurijs

On Fri, Sep 22, 2017 at 11:43 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

>
> Thanks man,
> I didn't explicitly set srtp in kamailio nor freeswitch, how do i turn
> it off?
>
>
> At 2017-09-22 16:32:10, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:
>
> Hi,
>
> 1) You need to change default password
> *"Open /usr/local/freeswitch/conf/**vars.xml and change the
> default_password."*
>
> 2) You are calling into Freeswitch with encryption on and probably of this
> your call is failing, maybe you can try first to try without SRTP and if it
> works, then you can try to make it work with SRTP
>
> With kind regards,
>
> Jurijs
>
> On Fri, Sep 22, 2017 at 11:25 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>
>>
>> Hello,
>>No luck. Still the same. Here goes the full log, sorry if it's a
>> little overwhelming
>>
>> 
>>INVITE sip:prompt-1000@10.240.0.90:5095 SIP/2.0
>>Record-Route: <sip:35.202.167.70:5060;r2=on;lr;nat=yes>
>>Record-Route: <sip:35.202.167.70:5061;transport=tls;r2=on;lr;nat=yes>
>>Via: SIP/2.0/UDP 35.202.167.70:5060;branch=z9hG
>> 4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1
>>Via: SIP/2.0/TLS 10.60.208.121:43603;received=1
>> 75.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380
>> xv2U0w0JRcTLD9Y;alias
>>Max-Forwards: 69
>>From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5
>> QazXW6BB
>>To: <sip:12345@35.202.167.70>
>>Contact: <sip:13112345678@175.100.202.254:33189;transport=TLS;ob;alia
>> s=175.100.202.254~33189~3>
>>Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
>>CSeq: 21643 INVITE
>>Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE,
>> NOTIFY, REFER, MESSAGE, OPTIONS
>>Supported: replaces, 100rel, timer, norefersub
>>Session-Expires: 1800
>>Min-SE: 90
>>User-Agent: CSipSimple_HWNXT-24/r2457
>>Content-Type: application/sdp
>>Content-Length:   515
>>
>>v=0
>>o=- 3715057398 3715057398 IN IP4 35.185.130.154
>>s=pjmedia
>>c=IN IP4 35.185.130.154
>>t=0 0
>>m=audio 40026 RTP/AVP 9 8 0 106 101
>>c=IN IP4 35.185.130.154
>>a=rtcp:40027
>>a=sendrecv
>>a=rtpmap:9 G722/8000
>>a=rtpmap:8 PCMA/8000
>>a=rtpmap:0 PCMU/8000
>>a=rtpmap:106 speex/16000
>>a=rtpmap:101 telephone-event/8000
>>a=fmtp:101 0-16
>>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BrFCcbuKqPea6vy8L9Imh6d
>> qhorYovx1RdXKlLsP
>>a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:9iwM/BpOGlSBK115waMNkpa
>> mPBj6prelcsjywL+M
>>a=nortpproxy:yes
>>---
>> -
>> send 664 bytes to udp/[10.240.0.90]:5060 at 08:23:19.816105:
>>---
>> -
>>SIP/2.0 100 Trying
>>Via: SIP/2.0/UDP 35.202.167.70:5060;branch=z9hG
>> 4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1;received=10.240.0.90
>>Via: SIP/2.0/TLS 10.60.208.121:43603;received=1
>> 75.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380
>> xv2U0w0JRcTLD9Y;alias
>>Record-Route: <sip:35.202.167.70:5060;r2=on;lr;nat=yes>
>>Record-Route: <sip:35.202.167.70:5061;transport=tls;r2=on;lr;nat=yes>
>>From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5
>> QazXW6BB
>>To: <sip:12345@35.202.167.70>
>>Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
>>CSeq: 21643 INVITE
>>User-Agent: FreeSWITCH-mod_sofia/1.4.26+gi
>> t~20160205T175853Z~ca9207aa32~64bit
>>Content-Length: 0
>>
>>---
>> -
>> 2017-09-22 08:23:19.787973 [NOTICE] switch_channel.c:1077 New Channel
>> sofia/internal/13112345678@35.202.167.70 [df38887c-8832-42f5-828d-ac89e
>> b6ccf78]
>> 2017-09-22 08:23:19.787973 [INFO] mod_dialplan_xml.c:635 Processing
>> 13112345678 <13112345678>->prompt-1000 in context public
>> 2017-09-22 08:23:19.787973 [NOTICE] switch_ivr.c:1863 Transfer
>> sofia/internal/13112345678@35.202.167.70 to XML[prompt-1000@default]
>> 2017-09-22 08:23:19.787973 [INFO] mod_dialplan_xml.c:635 Processing
>> 13112345678 

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
Hi,

Please check this:

http://lists.freeswitch.org/pipermail/freeswitch-dev/2013-November/006889.html

Probably you need to set

rtp_allow_crypto_in_avp=true in vars.xml

With kind regards,

Jurijs

On Fri, Sep 22, 2017 at 11:32 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com>
wrote:

> Hi,
>
> 1) You need to change default password
> *"Open /usr/local/freeswitch/conf/**vars.xml and change the
> default_password."*
>
> 2) You are calling into Freeswitch with encryption on and probably of this
> your call is failing, maybe you can try first to try without SRTP and if it
> works, then you can try to make it work with SRTP
>
> With kind regards,
>
> Jurijs
>
> On Fri, Sep 22, 2017 at 11:25 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>
>>
>> Hello,
>>No luck. Still the same. Here goes the full log, sorry if it's a
>> little overwhelming
>>
>> 
>>INVITE sip:prompt-1000@10.240.0.90:5095 SIP/2.0
>>Record-Route: <sip:35.202.167.70:5060;r2=on;lr;nat=yes>
>>Record-Route: <sip:35.202.167.70:5061;transport=tls;r2=on;lr;nat=yes>
>>Via: SIP/2.0/UDP 35.202.167.70:5060;branch=z9hG
>> 4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1
>>Via: SIP/2.0/TLS 10.60.208.121:43603;received=1
>> 75.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380
>> xv2U0w0JRcTLD9Y;alias
>>Max-Forwards: 69
>>From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5
>> QazXW6BB
>>To: <sip:12345@35.202.167.70>
>>Contact: <sip:13112345678@175.100.202.254:33189;transport=TLS;ob;alia
>> s=175.100.202.254~33189~3>
>>Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
>>CSeq: 21643 INVITE
>>Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE,
>> NOTIFY, REFER, MESSAGE, OPTIONS
>>Supported: replaces, 100rel, timer, norefersub
>>Session-Expires: 1800
>>Min-SE: 90
>>User-Agent: CSipSimple_HWNXT-24/r2457
>>Content-Type: application/sdp
>>Content-Length:   515
>>
>>v=0
>>o=- 3715057398 3715057398 IN IP4 35.185.130.154
>>s=pjmedia
>>c=IN IP4 35.185.130.154
>>t=0 0
>>m=audio 40026 RTP/AVP 9 8 0 106 101
>>c=IN IP4 35.185.130.154
>>a=rtcp:40027
>>a=sendrecv
>>a=rtpmap:9 G722/8000
>>a=rtpmap:8 PCMA/8000
>>a=rtpmap:0 PCMU/8000
>>a=rtpmap:106 speex/16000
>>a=rtpmap:101 telephone-event/8000
>>a=fmtp:101 0-16
>>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BrFCcbuKqPea6vy8L9Imh6d
>> qhorYovx1RdXKlLsP
>>a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:9iwM/BpOGlSBK115waMNkpa
>> mPBj6prelcsjywL+M
>>a=nortpproxy:yes
>>---
>> -
>> send 664 bytes to udp/[10.240.0.90]:5060 at 08:23:19.816105:
>>---
>> -
>>SIP/2.0 100 Trying
>>Via: SIP/2.0/UDP 35.202.167.70:5060;branch=z9hG
>> 4bK04d4.2c5c86a459371d838623651e8f5b6984.0;i=1;received=10.240.0.90
>>Via: SIP/2.0/TLS 10.60.208.121:43603;received=1
>> 75.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380
>> xv2U0w0JRcTLD9Y;alias
>>Record-Route: <sip:35.202.167.70:5060;r2=on;lr;nat=yes>
>>Record-Route: <sip:35.202.167.70:5061;transport=tls;r2=on;lr;nat=yes>
>>From: <sip:13112345678@35.202.167.70>;tag=MW06SkJdOZIiqvT4T9DFn0X5
>> QazXW6BB
>>To: <sip:12345@35.202.167.70>
>>Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
>>CSeq: 21643 INVITE
>>User-Agent: FreeSWITCH-mod_sofia/1.4.26+gi
>> t~20160205T175853Z~ca9207aa32~64bit
>>Content-Length: 0
>>
>>---
>> -
>> 2017-09-22 08:23:19.787973 [NOTICE] switch_channel.c:1077 New Channel
>> sofia/internal/13112345678@35.202.167.70 [df38887c-8832-42f5-828d-ac89e
>> b6ccf78]
>> 2017-09-22 08:23:19.787973 [INFO] mod_dialplan_xml.c:635 Processing
>> 13112345678 <13112345678>->prompt-1000 in context public
>> 2017-09-22 08:23:19.787973 [NOTICE] switch_ivr.c:1863 Transfer
>> sofia/internal/13112345678@35.202.167.70 to XML[prompt-1000@default]
>> 2017-09-22 08:23:19.787973 [INFO] mod_dialplan_xml.c:635 Processing
>> 13112345678 <13112345678>->prompt-1000 in context default
>> 2017-09-22 08:23:19.787973 [CRIT] mod_dptools.c:1670 WARNING WARNING
>> WARNING WARNING WARNIN

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
 bytes to udp/[10.240.0.90]:5060 at 08:23:29.858628:
>---
> -
>SIP/2.0 488 Not Acceptable Here
>Via: SIP/2.0/UDP 35.202.167.70:5060;branch=z9hG4bK04d4.
> 2c5c86a459371d838623651e8f5b6984.0;i=1;received=10.240.0.90
>Via: SIP/2.0/TLS 10.60.208.121:43603;received=
> 175.100.202.254;rport=33189;branch=z9hG4bKPj4dLalct0388uwB380xv2U
> 0w0JRcTLD9Y;alias
>Max-Forwards: 68
>From: <sip:13112345678@35.202.167.70>;tag=
> MW06SkJdOZIiqvT4T9DFn0X5QazXW6BB
>To: <sip:12345@35.202.167.70>;tag=3N0c8m5X06NBj
>Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
>CSeq: 21643 INVITE
>User-Agent: FreeSWITCH-mod_sofia/1.4.26+git~20160205T175853Z~
> ca9207aa32~64bit
>Accept: application/sdp
>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
>Supported: timer, path, replaces
>Allow-Events: talk, hold, conference, presence, as-feature-event,
> dialog, line-seize, call-info, sla, include-session-description,
> presence.winfo, message-summary, refer
>Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
>Content-Length: 0
>Remote-Party-ID: "prompt-1000" <sip:prompt-1000@35.202.167.70
> >;party=calling;privacy=off;screen=no
>
>---
> -
> 2017-09-22 08:23:29.847976 [NOTICE] switch_core_session.c:1642 Session 1
> (sofia/internal/13112345678@35.202.167.70) Ended
> 2017-09-22 08:23:29.847976 [NOTICE] switch_core_session.c:1646 Close
> Channel sofia/internal/13112345678@35.202.167.70 [CS_DESTROY]
> recv 365 bytes from udp/[10.240.0.90]:5060 at 08:23:29.859597:
>---
> -----
>ACK sip:prompt-1000@10.240.0.90:5095 SIP/2.0
>Via: SIP/2.0/UDP 35.202.167.70:5060;branch=z9hG4bK04d4.
> 2c5c86a459371d838623651e8f5b6984.0;i=1
>Max-Forwards: 69
>From: <sip:13112345678@35.202.167.70>;tag=
> MW06SkJdOZIiqvT4T9DFn0X5QazXW6BB
>To: <sip:12345@35.202.167.70>;tag=3N0c8m5X06NBj
>Call-ID: 8-vmGoxxMxWlb.xQ-VwWyCQ-xnqxNwVe
>CSeq: 21643 ACK
>Content-Length: 0
>
>---
> -
>
>
> At 2017-09-22 16:14:37, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:
>
> Hi,
>
> You need to answer call too...
>
> Try this:
>
> * in freeswitch/conf/dialplan/default.xml*
> 
>   
>
> 
>
> 
>   
> 
>
> Please send full logs next time, you can remove IP-addresses and other info, 
> but one line is not really helpful.
>
> With kind regards,
>
>
> Jurijs
>
> On Fri, Sep 22, 2017 at 11:00 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com>
> wrote:
>
>> Hi,
>>
>> You probably don't need record route and you need to remove "> application="bridge" data="user/$1@${domain_name}"/>"
>>
>> Try in this way:
>>
>>   *In kamailio.cfg* I added if ($rU=="12345") {
>> if(is_method("INVITE")) {
>> #record_route();
>> $ru = "sip:prompt-1000@" +
>> $sel(cfg_get.voicemail.srv_ip)
>> + ":" +
>> $sel(cfg_get.voicemail.srv_port);
>> route(RELAY);
>> exit;
>> }
>> }
>>
>> * in freeswitch/conf/dialplan/default.xml*, i added
>> 
>>   
>> 
>>   
>> 
>>
>> Jurijs
>>
>> On Fri, Sep 22, 2017 at 10:54 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>>
>>> Hi guy.
>>>sorry for the confusion. I'll try to reorganize it.
>>>
>>>   * In kamailio.cfg* I added
>>> if ($rU=="12345") {
>>> if(is_method("INVITE")) {
>>> #record_route();
>>> $ru = "sip:prompt-1000@" +
>>> $sel(cfg_get.voicemail.srv_ip)
>>> + ":" +
>>> $sel(cfg_get.voicemail.srv_port);
>>> route(RELAY);
>>> exit;
>>> }
>>> }
>>>
>>> * in freeswitch/conf/dialplan/default.xml*, i added
>>> 
>>>   
>>> 
>>> 
>>>   
>>> 
>>>
>&g

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
Hi,

You probably don't need record route and you need to remove ""

Try in this way:

  *In kamailio.cfg* I added if ($rU=="12345") {
if(is_method("INVITE")) {
#record_route();
$ru = "sip:prompt-1000@" +
$sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_
port);
route(RELAY);
exit;
}
}

* in freeswitch/conf/dialplan/default.xml*, i added

  

  


Jurijs

On Fri, Sep 22, 2017 at 10:54 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

> Hi guy.
>sorry for the confusion. I'll try to reorganize it.
>
>   * In kamailio.cfg* I added
> if ($rU=="12345") {
> if(is_method("INVITE")) {
> #record_route();
> $ru = "sip:prompt-1000@" +
> $sel(cfg_get.voicemail.srv_ip)
> + ":" + $sel(cfg_get.voicemail.srv_
> port);
> route(RELAY);
> exit;
> }
> }
>
> * in freeswitch/conf/dialplan/default.xml*, i added
> 
>   
> 
> 
>   
> 
>
> *sofia log:*
>[NOTICE] switch_channel.c:1077 New Channel sofia/internal/
> 13112345678@35.202.167.70 [848d0dd5-0513-41bd-982c-45a2a886e194]
>[INFO] mod_dialplan_xml.c:635 Processing 13112345678
> <13112345678>->prompt-1000 in context public
>[NOTICE] switch_ivr.c:1863 Transfer sofia/internal/13112345678@35.
> 202.167.70 to XML[prompt-1000@default]
>[INFO] mod_dialplan_xml.c:635 Processing 13112345678
> <13112345678>->prompt-1000 in context default
>[NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of
> type [error] cause: [USER_NOT_REGISTERED]
>[NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of
> type [user] cause: [USER_NOT_REGISTERED]
>---
> -
>SIP/2.0 480 Temporarily Unavailable
>..
>Reason: SIP;cause=606;text="USER_NOT_REGISTERED"
>
>-------
> -
>
> However, if i delete:
> ,
> the FS returns 488 instead of 480.  Reason: Q.850;cause=88;text="
> INCOMPATIBLE_DESTINATION"
>
> Thanks
>
>
>
>
> At 2017-09-22 15:31:51, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:
>
> Hi,
>
> You need to add:
>
>  
>   
> 
>   
> 
>
> to conf/dialplan/default.xml
>
> in your code, you had extra line what was sending a call to 1000 extension.
>
> With kind regards,
>
> Jurijs
>
> On Fri, Sep 22, 2017 at 10:29 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com>
> wrote:
>
>> Hi,
>>
>> So, problem is not related to record route but to config of freeswitch.
>>
>> Not sure what you wrote in mail above, but you need to add code what
>> provided Sergey to:
>>
>> /usr/local/freeswitch/conf/dialplan/default.xml
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Fri, Sep 22, 2017 at 10:11 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>>
>>> Hello,
>>> Thanks for the heads up. The siptrace does help.
>>> Now the FS returns(with or without record_route();):
>>>   SIP/2.0 480 Temporarily Unavailable
>>>   Reason: SIP;cause=606;text="USER_NOT_REGISTERED"
>>>
>>>I have generate offline.xml under conf/directory/default. Where did i
>>> miss?
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>> At 2017-09-22 14:53:06, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> Sip trace from Freeswitch will help, but I think you need to insert
>>> Record-Route, try in following way:
>>>
>>> if ($rU=="12345") {
>>> if(is_method("INVITE")) {
>>> record_route();
>>> $ru = "sip:" + "offline" + "@" +
>>> $sel(cfg_get.voicemail.srv_ip)
>>> + ":" +
>>> $sel(cfg_get.voicemail.srv_port);
>>> route(RELAY);
>>> exit;
>>> }
>>> }
>>>
>>> Wit

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
Hi,

You need to add:

 
  

  


to conf/dialplan/default.xml

in your code, you had extra line what was sending a call to 1000 extension.

With kind regards,

Jurijs

On Fri, Sep 22, 2017 at 10:29 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com>
wrote:

> Hi,
>
> So, problem is not related to record route but to config of freeswitch.
>
> Not sure what you wrote in mail above, but you need to add code what
> provided Sergey to:
>
> /usr/local/freeswitch/conf/dialplan/default.xml
>
> With kind regards,
>
> Jurijs
>
> On Fri, Sep 22, 2017 at 10:11 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>
>> Hello,
>> Thanks for the heads up. The siptrace does help.
>> Now the FS returns(with or without record_route();):
>>   SIP/2.0 480 Temporarily Unavailable
>>   Reason: SIP;cause=606;text="USER_NOT_REGISTERED"
>>
>>I have generate offline.xml under conf/directory/default. Where did i
>> miss?
>>
>> Thanks
>>
>>
>>
>>
>>
>> At 2017-09-22 14:53:06, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:
>>
>> Hi,
>>
>> Sip trace from Freeswitch will help, but I think you need to insert
>> Record-Route, try in following way:
>>
>> if ($rU=="12345") {
>> if(is_method("INVITE")) {
>> record_route();
>> $ru = "sip:" + "offline" + "@" +
>> $sel(cfg_get.voicemail.srv_ip)
>> + ":" +
>> $sel(cfg_get.voicemail.srv_port);
>> route(RELAY);
>> exit;
>> }
>> }
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Fri, Sep 22, 2017 at 7:19 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>>
>>> Hello
>>> I added below code to let kamailio route invite to freeswitch:
>>> if ($rU=="12345") {
>>> if(is_method("INVITE")) {
>>> $ru = "sip:" + "offline" + "@" +
>>> $sel(cfg_get.voicemail.srv_ip)
>>> + ":" +
>>> $sel(cfg_get.voicemail.srv_port);
>>> route(RELAY);
>>> exit;
>>> }
>>> }
>>>
>>>   in freeswitch dialplan/default.xml, i added
>>>  
>>>   
>>> 
>>> 
>>>   
>>> 
>>>
>>> when i dialed 12345 on sip client, I can see the invite package to
>>> freeswitch, and that's it. No package coming back from freeswitch.
>>> Eventually, the sip client timeout. I
>>> was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav"
>>> will be played. What did i do wrong?
>>>
>>> Thanks
>>>
>>> At 2017-09-20 19:32:14, "Sergey Safarov" <s.safa...@gmail.com> wrote:
>>>
>>> You can add this example to dialplan and make test
>>>
>>> 
>>>   
>>> 
>>> 
>>> 
>>>   
>>> 
>>>
>>>
>>> ср, 20 сент. 2017 г. в 10:14, 赵国杰 <zhaoguojie2...@163.com>:
>>>
>>>> Hello Sergey,
>>>>  I installed freeswitch, what should i do next?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> At 2017-09-19 12:07:23, "Sergey Safarov" <s.safa...@gmail.com> wrote:
>>>>
>>>> This can be implemenred using freeswitch.
>>>> Ping me directly after you install freeswith on linux and configure ssh
>>>> remote access
>>>>
>>>> вт, 19 сент. 2017 г., 6:27 赵国杰 <zhaoguojie2...@163.com>:
>>>>
>>>>> Thanks Daniel,
>>>>> I've done some digging, and from Andrew Prokop's blog, it says
>>>>> this envolves early midia. Usually this is done by reply a 183 to the
>>>>> caller with media ip and port in the SDP. This makes sense but i still 
>>>>> have
>>>>> no idea how to generate 183 response with embedded SDP.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> At 2017-09-18 18:05:46, "Daniel Tryba" <d.tr...@pocos.nl> wrote:
>>>>> >On Mon, Sep 18, 2017 a

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
Hi,

So, problem is not related to record route but to config of freeswitch.

Not sure what you wrote in mail above, but you need to add code what
provided Sergey to:

/usr/local/freeswitch/conf/dialplan/default.xml

With kind regards,

Jurijs

On Fri, Sep 22, 2017 at 10:11 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:

> Hello,
> Thanks for the heads up. The siptrace does help.
> Now the FS returns(with or without record_route();):
>   SIP/2.0 480 Temporarily Unavailable
>   Reason: SIP;cause=606;text="USER_NOT_REGISTERED"
>
>I have generate offline.xml under conf/directory/default. Where did i
> miss?
>
> Thanks
>
>
>
>
>
> At 2017-09-22 14:53:06, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote:
>
> Hi,
>
> Sip trace from Freeswitch will help, but I think you need to insert
> Record-Route, try in following way:
>
> if ($rU=="12345") {
> if(is_method("INVITE")) {
> record_route();
> $ru = "sip:" + "offline" + "@" +
> $sel(cfg_get.voicemail.srv_ip)
> + ":" +
> $sel(cfg_get.voicemail.srv_port);
> route(RELAY);
> exit;
> }
> }
>
> With kind regards,
>
> Jurijs
>
> On Fri, Sep 22, 2017 at 7:19 AM, 赵国杰 <zhaoguojie2...@163.com> wrote:
>
>> Hello
>> I added below code to let kamailio route invite to freeswitch:
>> if ($rU=="12345") {
>> if(is_method("INVITE")) {
>> $ru = "sip:" + "offline" + "@" +
>> $sel(cfg_get.voicemail.srv_ip)
>> + ":" +
>> $sel(cfg_get.voicemail.srv_port);
>> route(RELAY);
>> exit;
>> }
>> }
>>
>>   in freeswitch dialplan/default.xml, i added
>>  
>>   
>> 
>> 
>>   
>> 
>>
>> when i dialed 12345 on sip client, I can see the invite package to
>> freeswitch, and that's it. No package coming back from freeswitch.
>> Eventually, the sip client timeout. I
>> was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav"
>> will be played. What did i do wrong?
>>
>> Thanks
>>
>> At 2017-09-20 19:32:14, "Sergey Safarov" <s.safa...@gmail.com> wrote:
>>
>> You can add this example to dialplan and make test
>>
>> 
>>   
>> 
>> 
>> 
>>   
>> 
>>
>>
>> ср, 20 сент. 2017 г. в 10:14, 赵国杰 <zhaoguojie2...@163.com>:
>>
>>> Hello Sergey,
>>>  I installed freeswitch, what should i do next?
>>>
>>>
>>>
>>>
>>>
>>> At 2017-09-19 12:07:23, "Sergey Safarov" <s.safa...@gmail.com> wrote:
>>>
>>> This can be implemenred using freeswitch.
>>> Ping me directly after you install freeswith on linux and configure ssh
>>> remote access
>>>
>>> вт, 19 сент. 2017 г., 6:27 赵国杰 <zhaoguojie2...@163.com>:
>>>
>>>> Thanks Daniel,
>>>> I've done some digging, and from Andrew Prokop's blog, it says this
>>>> envolves early midia. Usually this is done by reply a 183 to the caller
>>>> with media ip and port in the SDP. This makes sense but i still have no
>>>> idea how to generate 183 response with embedded SDP.
>>>>
>>>>
>>>>
>>>>
>>>> At 2017-09-18 18:05:46, "Daniel Tryba" <d.tr...@pocos.nl> wrote:
>>>> >On Mon, Sep 18, 2017 at 03:37:22PM +0800, 赵国杰 wrote:
>>>> >>  I want the caller to play a short audio(like "the number your are 
>>>> >> calling is busy") when the callee declines the call. How can i do that?
>>>> >
>>>> >You need to check for the status codes in a failure route and then
>>>> >somehow generate audio somewhere, which is out of the scope of kamailio
>>>> >(maybe rtpproxy can do this, otherwise use something like asterisk):
>>>> >
>>>> >failure_route[MANAGE_FAILURE] {
>>>> >if (t_check_status("486"))
>>>> >{
>>>> >  $du=null;
>>>> >  $ru="busymess...@asterisk.example.org";
>>>> >  ro

Re: [SR-Users] how to play ring tune when callee declines

2017-09-22 Thread Jurijs Ivolga
Hi,

Sip trace from Freeswitch will help, but I think you need to insert
Record-Route, try in following way:

if ($rU=="12345") {
if(is_method("INVITE")) {
record_route();
$ru = "sip:" + "offline" + "@" +
$sel(cfg_get.voicemail.srv_ip)
+ ":" + $sel(cfg_get.voicemail.srv_
port);
route(RELAY);
exit;
}
}

With kind regards,

Jurijs

On Fri, Sep 22, 2017 at 7:19 AM, 赵国杰  wrote:

> Hello
> I added below code to let kamailio route invite to freeswitch:
> if ($rU=="12345") {
> if(is_method("INVITE")) {
> $ru = "sip:" + "offline" + "@" +
> $sel(cfg_get.voicemail.srv_ip)
> + ":" + $sel(cfg_get.voicemail.srv_
> port);
> route(RELAY);
> exit;
> }
> }
>
>   in freeswitch dialplan/default.xml, i added
>  
>   
> 
> 
>   
> 
>
> when i dialed 12345 on sip client, I can see the invite package to
> freeswitch, and that's it. No package coming back from freeswitch.
> Eventually, the sip client timeout. I
> was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav"
> will be played. What did i do wrong?
>
> Thanks
>
> At 2017-09-20 19:32:14, "Sergey Safarov"  wrote:
>
> You can add this example to dialplan and make test
>
> 
>   
> 
> 
> 
>   
> 
>
>
> ср, 20 сент. 2017 г. в 10:14, 赵国杰 :
>
>> Hello Sergey,
>>  I installed freeswitch, what should i do next?
>>
>>
>>
>>
>>
>> At 2017-09-19 12:07:23, "Sergey Safarov"  wrote:
>>
>> This can be implemenred using freeswitch.
>> Ping me directly after you install freeswith on linux and configure ssh
>> remote access
>>
>> вт, 19 сент. 2017 г., 6:27 赵国杰 :
>>
>>> Thanks Daniel,
>>> I've done some digging, and from Andrew Prokop's blog, it says this
>>> envolves early midia. Usually this is done by reply a 183 to the caller
>>> with media ip and port in the SDP. This makes sense but i still have no
>>> idea how to generate 183 response with embedded SDP.
>>>
>>>
>>>
>>>
>>> At 2017-09-18 18:05:46, "Daniel Tryba"  wrote:
>>> >On Mon, Sep 18, 2017 at 03:37:22PM +0800, 赵国杰 wrote:
>>> >>  I want the caller to play a short audio(like "the number your are 
>>> >> calling is busy") when the callee declines the call. How can i do that?
>>> >
>>> >You need to check for the status codes in a failure route and then
>>> >somehow generate audio somewhere, which is out of the scope of kamailio
>>> >(maybe rtpproxy can do this, otherwise use something like asterisk):
>>> >
>>> >failure_route[MANAGE_FAILURE] {
>>> >if (t_check_status("486"))
>>> >{
>>> >  $du=null;
>>> >  $ru="busymess...@asterisk.example.org";
>>> >  route(RELAY);
>>> >  exit;
>>> >}
>>> >
>>> >___
>>> >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] Kamailio example configuration: auth section incomplete?

2017-08-02 Thread Jurijs Ivolga
Hi George,

Kamailio is very flexible application and don't be afraid to change default
config file. ;)

So if default config file do not fit you, just update accordingly.

With kind regards,

Jurijs

On Wed, Aug 2, 2017 at 10:17 PM, George Diamantopoulos <georged...@gmail.com
> wrote:

> Sorry, I replied before I could read your second post.
>
> Ah, I can see now where this is going, although it's completely unfit for
> the use of kamailio I'm investigating. Thanks!
>
> On 2 August 2017 at 22:11, Jurijs Ivolga <jurijs.ivo...@gmail.com> wrote:
>
>> Hi George,
>>
>> I misread your email, sorry.
>>
>> In your case scenario is when somebody from outside tries to call user
>> registered in kamailio, by default it is allowed. We do not need to
>> challenge such request, because it is user from outside, not our subscriber
>> and by default kamailio allows such calls and in this case such call will
>> finish in location route and eventually will reach user.
>>
>> I hope I understood you and I didn't messed anything again. :)
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Wed, Aug 2, 2017 at 4:01 PM, George Diamantopoulos <
>> georged...@gmail.com> wrote:
>>
>>> Hello again,
>>>
>>> Still getting familiar with kamailio, and I'm wondering about the AUTH
>>> route in the example configuration file. Here's a reducted-simplified
>>> version of it for reference (from git master, without IP AUTH and comments):
>>>
>>> __
>>> route[AUTH] {
>>> if (is_method("REGISTER") || from_uri==myself) {
>>> if (!auth_check("$fd", "subscriber", "1")) {
>>> auth_challenge("$fd", "0");
>>> exit;
>>> }
>>> if(!is_method("REGISTER|PUBLISH"))
>>> consume_credentials();
>>> }
>>> if (from_uri!=myself && uri!=myself) {
>>> sl_send_reply("403","Not relaying");
>>> exit;
>>> }
>>> return;
>>> }
>>> __
>>>
>>> So the way I see it, what happens is the following:
>>>
>>> * All REGISTERs will be challenged
>>> * All SIP messages with kamailio's aliases in the "From" header URI will
>>> be challenged
>>> * All SIP messages with no reference to kamailio's aliases in both R-URI
>>> and "From" header URI will be dropped
>>>
>>> The question is, what about messages that do not enter either of the two
>>> conditionals? For example, I expect the following to be very common:
>>>
>>> * Method: INVITE
>>> * R-URI: myself
>>> * From: username@"UAC's local IP address" (not myself)
>>> * To: myself
>>>
>>> So in the example above, the auth route will return without either
>>> having challenged or dropped the request, am I correct? This is because:
>>>
>>> * For the challenge: Method is not REGISTER and "From URI" is not one of
>>> kamailio host's aliases (cumulatively)
>>> * For dropping after sending 403: "From URI" is not one of kamailio's
>>> host's aliases (which calculates to true) but R-URI is "myself"
>>>
>>> So I'm guessing we're expecting the challenge to come from elsewhere in
>>> cases like the example above? Or is there something else I'm missing here?
>>> Thanks!
>>>
>>> BR,
>>> George
>>>
>>> ___
>>> 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] Kamailio example configuration: auth section incomplete?

2017-08-02 Thread Jurijs Ivolga
Hi George,

I misread your email, sorry.

In your case scenario is when somebody from outside tries to call user
registered in kamailio, by default it is allowed. We do not need to
challenge such request, because it is user from outside, not our subscriber
and by default kamailio allows such calls and in this case such call will
finish in location route and eventually will reach user.

I hope I understood you and I didn't messed anything again. :)

With kind regards,

Jurijs

On Wed, Aug 2, 2017 at 4:01 PM, George Diamantopoulos 
wrote:

> Hello again,
>
> Still getting familiar with kamailio, and I'm wondering about the AUTH
> route in the example configuration file. Here's a reducted-simplified
> version of it for reference (from git master, without IP AUTH and comments):
>
> __
> route[AUTH] {
> if (is_method("REGISTER") || from_uri==myself) {
> if (!auth_check("$fd", "subscriber", "1")) {
> auth_challenge("$fd", "0");
> exit;
> }
> if(!is_method("REGISTER|PUBLISH"))
> consume_credentials();
> }
> if (from_uri!=myself && uri!=myself) {
> sl_send_reply("403","Not relaying");
> exit;
> }
> return;
> }
> __
>
> So the way I see it, what happens is the following:
>
> * All REGISTERs will be challenged
> * All SIP messages with kamailio's aliases in the "From" header URI will
> be challenged
> * All SIP messages with no reference to kamailio's aliases in both R-URI
> and "From" header URI will be dropped
>
> The question is, what about messages that do not enter either of the two
> conditionals? For example, I expect the following to be very common:
>
> * Method: INVITE
> * R-URI: myself
> * From: username@"UAC's local IP address" (not myself)
> * To: myself
>
> So in the example above, the auth route will return without either having
> challenged or dropped the request, am I correct? This is because:
>
> * For the challenge: Method is not REGISTER and "From URI" is not one of
> kamailio host's aliases (cumulatively)
> * For dropping after sending 403: "From URI" is not one of kamailio's
> host's aliases (which calculates to true) but R-URI is "myself"
>
> So I'm guessing we're expecting the challenge to come from elsewhere in
> cases like the example above? Or is there something else I'm missing here?
> Thanks!
>
> BR,
> George
>
> ___
> 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] Kamailio example configuration: auth section incomplete?

2017-08-02 Thread Jurijs Ivolga
Hi George,

If you are asking about this part:

if (from_uri!=myself && uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}

Then this mean that we do not want to deal with sip requests which not send
to us or not by us. So any request which is not related to us we will not
serve.

Keep in mind that "to" header by sip RFC can contain anything and we don't
care in most cases what is there.

https://tools.ietf.org/html/rfc3261#page-36

With kind regards,

Jurijs

On Wed, Aug 2, 2017 at 4:01 PM, George Diamantopoulos 
wrote:

> Hello again,
>
> Still getting familiar with kamailio, and I'm wondering about the AUTH
> route in the example configuration file. Here's a reducted-simplified
> version of it for reference (from git master, without IP AUTH and comments):
>
> __
> route[AUTH] {
> if (is_method("REGISTER") || from_uri==myself) {
> if (!auth_check("$fd", "subscriber", "1")) {
> auth_challenge("$fd", "0");
> exit;
> }
> if(!is_method("REGISTER|PUBLISH"))
> consume_credentials();
> }
> if (from_uri!=myself && uri!=myself) {
> sl_send_reply("403","Not relaying");
> exit;
> }
> return;
> }
> __
>
> So the way I see it, what happens is the following:
>
> * All REGISTERs will be challenged
> * All SIP messages with kamailio's aliases in the "From" header URI will
> be challenged
> * All SIP messages with no reference to kamailio's aliases in both R-URI
> and "From" header URI will be dropped
>
> The question is, what about messages that do not enter either of the two
> conditionals? For example, I expect the following to be very common:
>
> * Method: INVITE
> * R-URI: myself
> * From: username@"UAC's local IP address" (not myself)
> * To: myself
>
> So in the example above, the auth route will return without either having
> challenged or dropped the request, am I correct? This is because:
>
> * For the challenge: Method is not REGISTER and "From URI" is not one of
> kamailio host's aliases (cumulatively)
> * For dropping after sending 403: "From URI" is not one of kamailio's
> host's aliases (which calculates to true) but R-URI is "myself"
>
> So I'm guessing we're expecting the challenge to come from elsewhere in
> cases like the example above? Or is there something else I'm missing here?
> Thanks!
>
> BR,
> George
>
> ___
> 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