Re: [SR-Users] Dev documentation on implementing event_route events in custom module

2019-01-18 Thread Mojtaba
Yes, as YASIN  said, you could look register module. In the following i
paste a simple example of definition:

  int route_no;

if(hi1_eventrb){
route_no = route_get(_rt, hi1_eventrb);
if (route_no == -1){
LM_ERR("Failed to hi1 route block number of \"%s\", route_get()
function is failed\n", hi1_eventrb);
return -1;
}
if (main_rt.rlist[route_no]==0){
LM_WARN("The hi1 route block \"%s\" is empty, doesn't
exist\n",hi1_eventrb);
return -1;
}
LM_DBG("hi1_eventrb is set successfully to %s route block\n",
hi1_eventrb);
hi1_eventrb_no = route_no;
}
return 1
=
And here sipmle example of calling event_route in your code:
int ret;
struct run_act_ctx ra_ctx;
struct sip_msg *msg;


init_run_actions_ctx(_ctx);

if (run_actions(_ctx, main_rt.rlist[hi1_eventrb_no], msg) < 0) {
ret = -1;
LM_DBG("Error while trying run script in route block\n");
return ret;
}
return 1;


With Regards.Mojtaba

On Fri, Jan 18, 2019 at 11:07 PM YASIN CANER  wrote:

> Hello
>
> You can look registrar module that has usrloc:contact-expire
>
> Good luck
>
> Yasin Caner
>
> Mojtaba  şunları yazdı (18 Oca 2019 22:34):
>
> I'm gone away right now. I'll send for you as soon as
>
> On Fri, 18 Jan 2019, 22:34 Ivan Ribakov,  wrote:
>
>> Thanks for the suggestion. I thought about that, but TM module is not one
>> of the smallest. If there is a smaller, simpler model that uses events that
>> someone could recommend I could look into it. But in any case, I was
>> looking for something more documented to learn about all capabilities of
>> the events, not just the ones that might be used by some module.
>>
>> On 18 Jan 2019, at 17:43, Mojtaba  wrote:
>>
>> Hello Ivan,
>> Actually i haven't seen documentation but there is a good reference for
>> it, the impelemention of modules. You could look around them to find out.
>> It is very strightforwards.
>>
>>
>> On Fri, 18 Jan 2019, 18:57 Ivan Ribakov,  wrote:
>>
>>> Is there any documentation for module developers that lays out API for
>>> registering and triggering events from a custom Kamailio module (similar to
>>> https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes)?
>>>
>>>
>>> I have been referring to
>>> https://www.kamailio.org/docs/kamailio-devel-guide/ up until now but it
>>> doesn’t seem to cover event_routes.
>>>
>>> Thanks in advance,
>>> Ivan
>>> ___
>>> 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
>


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


Re: [SR-Users] handling BYEs generated by dialog-timeout

2019-01-18 Thread Alex Balashov
Hi Paolo,

Have a look at this article (shameless plug - I am the author):

http://www.evaristesys.com/blog/sip-udp-fragmentation-and-kamailio-the-sip-header-diet/

-- Alex

On Fri, Jan 18, 2019 at 11:20:59PM +0100, * Paolo Visintin - evosip.cloud wrote:

> Hi Alex,
> thanks for your suggestion,
> maybe RR with DNS alias could be a way to go!
> Will try asap !
> And another question,  how do you suggest do make a diet to an INVITE with
> Auth , RR and SDP that exceed the 1500 mtu size ? (without using topos )
> 
> Many thanks!
> 
> Paolo
> 
> Il giorno ven 18 gen 2019 alle ore 22:19 Alex Balashov <
> abalas...@evaristesys.com> ha scritto:
> 
> > It seems to me this problem would be more easily solved by using
> > Record-Route as intended, and finding a way to float the IP address of
> > the proxy, or injecting a (reliably resolvable!) DNS alias into RR.
> >
> > On Fri, Jan 18, 2019 at 10:14:28PM +0100, * Paolo Visintin - evosip.cloud
> > wrote:
> >
> > > Hi Alex,
> > >
> > > I relay packets with another kamailio on top, that is not using
> > > record-route; the "inner" kamailio sends packets setting the $du relaying
> > > always to proxy.
> > > It works well except for packets generated directly in "inner" kamailio
> > > (double bye generated by dialog-timeout).
> > >
> > > Paolo
> > >
> > >
> > > Il giorno ven 18 gen 2019 alle ore 22:06 Alex Balashov <
> > > abalas...@evaristesys.com> ha scritto:
> > >
> > > > Hi,
> > > >
> > > > Perhaps it is worthwhile to ask the question: why do you want to
> > > > manipulate $du for these internally generated BYEs? What is the root
> > > > problem you are trying to solve?
> > > >
> > > > -- Alex
> > > >
> > > > On Fri, Jan 18, 2019 at 03:27:19PM +0100, * Paolo Visintin -
> > evosip.cloud
> > > > wrote:
> > > >
> > > > > Hello!
> > > > >
> > > > > I'm wondering if someone have experience in changing $du on local
> > > > kamailio
> > > > > generated packets (like BYE generated at the dialog-timeout) I'm
> > trying
> > > > to
> > > > > manipulate in `event_route[tm:local-request]` with no success.
> > > > >
> > > > > In the end I have it working using the `forward()` function and then
> > > > using
> > > > > `exit;` but in this case instead of having 2 BYEs , kamailio sends 4
> > BYEs
> > > > > (2 with original $du, 2 with new $du)
> > > > >
> > > > > this an example :
> > > > > event_route[tm:local-request] {
> > > > >   if ($rm == "BYE") {
> > > > > route(SELECT_OUTBOUND_PROXY);
> > > > > forward();
> > > > > exit;
> > > > >   }
> > > > > }
> > > > >
> > > > > I'm using a kamailio proxy on top with no record-route (we want to
> > have
> > > > > multiple instances of proxy that can change ip address).
> > > > >
> > > > > Thanks in advance!
> > > > >
> > > > > Paolo
> > > >
> > > > > ___
> > > > > Kamailio (SER) - Users Mailing List
> > > > > sr-users@lists.kamailio.org
> > > > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > > >
> > > >
> > > > --
> > > > Alex Balashov | Principal | Evariste Systems LLC
> > > >
> > > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > > >
> > > > ___
> > > > Kamailio (SER) - Users Mailing List
> > > > sr-users@lists.kamailio.org
> > > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > > >
> >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] handling BYEs generated by dialog-timeout

2019-01-18 Thread * Paolo Visintin - evosip.cloud
Hi Alex,
thanks for your suggestion,
maybe RR with DNS alias could be a way to go!
Will try asap !
And another question,  how do you suggest do make a diet to an INVITE with
Auth , RR and SDP that exceed the 1500 mtu size ? (without using topos )

Many thanks!

Paolo

Il giorno ven 18 gen 2019 alle ore 22:19 Alex Balashov <
abalas...@evaristesys.com> ha scritto:

> It seems to me this problem would be more easily solved by using
> Record-Route as intended, and finding a way to float the IP address of
> the proxy, or injecting a (reliably resolvable!) DNS alias into RR.
>
> On Fri, Jan 18, 2019 at 10:14:28PM +0100, * Paolo Visintin - evosip.cloud
> wrote:
>
> > Hi Alex,
> >
> > I relay packets with another kamailio on top, that is not using
> > record-route; the "inner" kamailio sends packets setting the $du relaying
> > always to proxy.
> > It works well except for packets generated directly in "inner" kamailio
> > (double bye generated by dialog-timeout).
> >
> > Paolo
> >
> >
> > Il giorno ven 18 gen 2019 alle ore 22:06 Alex Balashov <
> > abalas...@evaristesys.com> ha scritto:
> >
> > > Hi,
> > >
> > > Perhaps it is worthwhile to ask the question: why do you want to
> > > manipulate $du for these internally generated BYEs? What is the root
> > > problem you are trying to solve?
> > >
> > > -- Alex
> > >
> > > On Fri, Jan 18, 2019 at 03:27:19PM +0100, * Paolo Visintin -
> evosip.cloud
> > > wrote:
> > >
> > > > Hello!
> > > >
> > > > I'm wondering if someone have experience in changing $du on local
> > > kamailio
> > > > generated packets (like BYE generated at the dialog-timeout) I'm
> trying
> > > to
> > > > manipulate in `event_route[tm:local-request]` with no success.
> > > >
> > > > In the end I have it working using the `forward()` function and then
> > > using
> > > > `exit;` but in this case instead of having 2 BYEs , kamailio sends 4
> BYEs
> > > > (2 with original $du, 2 with new $du)
> > > >
> > > > this an example :
> > > > event_route[tm:local-request] {
> > > >   if ($rm == "BYE") {
> > > > route(SELECT_OUTBOUND_PROXY);
> > > > forward();
> > > > exit;
> > > >   }
> > > > }
> > > >
> > > > I'm using a kamailio proxy on top with no record-route (we want to
> have
> > > > multiple instances of proxy that can change ip address).
> > > >
> > > > Thanks in advance!
> > > >
> > > > Paolo
> > >
> > > > ___
> > > > Kamailio (SER) - Users Mailing List
> > > > sr-users@lists.kamailio.org
> > > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
> > >
> > > --
> > > Alex Balashov | Principal | Evariste Systems LLC
> > >
> > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
>
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Mid-Registrar

2019-01-18 Thread Alex Balashov
By way of further answer: 

While it can perhaps be argued that OpenSIPS have done a better job of
"packaging" certain very specific functionalities from a marketing and
ease-of-use standpoint, I've learned time and time again that the raw
functionality for equivalent uses - and the flexibility that comes with
it, by virtue of the lower-level interface - almost always exists in
Kamailio as well. This is certainly one of those cases. :-) I learned
something in that thread.

On Fri, Jan 18, 2019 at 04:38:31PM -0500, Alex Balashov wrote:

> Hi Mark,
> 
> On Fri, Jan 18, 2019 at 04:37:05PM -0500, Mark Thomas wrote:
> 
> > I’m currently and OpenSIPS user and I really want to be able to use
> > their software on OpenWRT, but I have found it really hard to
> > cross-compile. Is there a possibility to run Kamailio as a
> > mid-registrar? For my application this is required, and I haven’t been
> > able to find any information on this.
> 
> Please see this thread:
> 
> https://puck.nether.net/pipermail/voiceops/2018-June/007716.html
> 
> -- Alex
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Mid-Registrar

2019-01-18 Thread Alex Balashov
Hi Mark,

On Fri, Jan 18, 2019 at 04:37:05PM -0500, Mark Thomas wrote:

> I’m currently and OpenSIPS user and I really want to be able to use
> their software on OpenWRT, but I have found it really hard to
> cross-compile. Is there a possibility to run Kamailio as a
> mid-registrar? For my application this is required, and I haven’t been
> able to find any information on this.

Please see this thread:

https://puck.nether.net/pipermail/voiceops/2018-June/007716.html

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


[SR-Users] Mid-Registrar

2019-01-18 Thread Mark Thomas
I’m currently and OpenSIPS user and I really want to be able to use their 
software on OpenWRT, but I have found it really hard to cross-compile. Is there 
a possibility to run Kamailio as a mid-registrar? For my application this is 
required, and I haven’t been able to find any information on this.

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


Re: [SR-Users] handling BYEs generated by dialog-timeout

2019-01-18 Thread Alex Balashov
It seems to me this problem would be more easily solved by using
Record-Route as intended, and finding a way to float the IP address of
the proxy, or injecting a (reliably resolvable!) DNS alias into RR.

On Fri, Jan 18, 2019 at 10:14:28PM +0100, * Paolo Visintin - evosip.cloud wrote:

> Hi Alex,
> 
> I relay packets with another kamailio on top, that is not using
> record-route; the "inner" kamailio sends packets setting the $du relaying
> always to proxy.
> It works well except for packets generated directly in "inner" kamailio
> (double bye generated by dialog-timeout).
> 
> Paolo
> 
> 
> Il giorno ven 18 gen 2019 alle ore 22:06 Alex Balashov <
> abalas...@evaristesys.com> ha scritto:
> 
> > Hi,
> >
> > Perhaps it is worthwhile to ask the question: why do you want to
> > manipulate $du for these internally generated BYEs? What is the root
> > problem you are trying to solve?
> >
> > -- Alex
> >
> > On Fri, Jan 18, 2019 at 03:27:19PM +0100, * Paolo Visintin - evosip.cloud
> > wrote:
> >
> > > Hello!
> > >
> > > I'm wondering if someone have experience in changing $du on local
> > kamailio
> > > generated packets (like BYE generated at the dialog-timeout) I'm trying
> > to
> > > manipulate in `event_route[tm:local-request]` with no success.
> > >
> > > In the end I have it working using the `forward()` function and then
> > using
> > > `exit;` but in this case instead of having 2 BYEs , kamailio sends 4 BYEs
> > > (2 with original $du, 2 with new $du)
> > >
> > > this an example :
> > > event_route[tm:local-request] {
> > >   if ($rm == "BYE") {
> > > route(SELECT_OUTBOUND_PROXY);
> > > forward();
> > > exit;
> > >   }
> > > }
> > >
> > > I'm using a kamailio proxy on top with no record-route (we want to have
> > > multiple instances of proxy that can change ip address).
> > >
> > > Thanks in advance!
> > >
> > > Paolo
> >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] handling BYEs generated by dialog-timeout

2019-01-18 Thread * Paolo Visintin - evosip.cloud
Hi Alex,

I relay packets with another kamailio on top, that is not using
record-route; the "inner" kamailio sends packets setting the $du relaying
always to proxy.
It works well except for packets generated directly in "inner" kamailio
(double bye generated by dialog-timeout).

Paolo


Il giorno ven 18 gen 2019 alle ore 22:06 Alex Balashov <
abalas...@evaristesys.com> ha scritto:

> Hi,
>
> Perhaps it is worthwhile to ask the question: why do you want to
> manipulate $du for these internally generated BYEs? What is the root
> problem you are trying to solve?
>
> -- Alex
>
> On Fri, Jan 18, 2019 at 03:27:19PM +0100, * Paolo Visintin - evosip.cloud
> wrote:
>
> > Hello!
> >
> > I'm wondering if someone have experience in changing $du on local
> kamailio
> > generated packets (like BYE generated at the dialog-timeout) I'm trying
> to
> > manipulate in `event_route[tm:local-request]` with no success.
> >
> > In the end I have it working using the `forward()` function and then
> using
> > `exit;` but in this case instead of having 2 BYEs , kamailio sends 4 BYEs
> > (2 with original $du, 2 with new $du)
> >
> > this an example :
> > event_route[tm:local-request] {
> >   if ($rm == "BYE") {
> > route(SELECT_OUTBOUND_PROXY);
> > forward();
> > exit;
> >   }
> > }
> >
> > I'm using a kamailio proxy on top with no record-route (we want to have
> > multiple instances of proxy that can change ip address).
> >
> > Thanks in advance!
> >
> > Paolo
>
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] handling BYEs generated by dialog-timeout

2019-01-18 Thread Alex Balashov
Hi,

Perhaps it is worthwhile to ask the question: why do you want to
manipulate $du for these internally generated BYEs? What is the root
problem you are trying to solve?

-- Alex

On Fri, Jan 18, 2019 at 03:27:19PM +0100, * Paolo Visintin - evosip.cloud wrote:

> Hello!
> 
> I'm wondering if someone have experience in changing $du on local kamailio
> generated packets (like BYE generated at the dialog-timeout) I'm trying to
> manipulate in `event_route[tm:local-request]` with no success.
> 
> In the end I have it working using the `forward()` function and then using
> `exit;` but in this case instead of having 2 BYEs , kamailio sends 4 BYEs
> (2 with original $du, 2 with new $du)
> 
> this an example :
> event_route[tm:local-request] {
>   if ($rm == "BYE") {
> route(SELECT_OUTBOUND_PROXY);
> forward();
> exit;
>   }
> }
> 
> I'm using a kamailio proxy on top with no record-route (we want to have
> multiple instances of proxy that can change ip address).
> 
> Thanks in advance!
> 
> Paolo

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Dev documentation on implementing event_route events in custom module

2019-01-18 Thread YASIN CANER
Hello

You can look registrar module that has usrloc:contact-expire

Good luck

Yasin Caner

Mojtaba mailto:mes...@gmail.com>> şunları yazdı (18 Oca 2019 
22:34):

I'm gone away right now. I'll send for you as soon as

On Fri, 18 Jan 2019, 22:34 Ivan Ribakov, 
mailto:i.riba...@zaleos.net>> wrote:
Thanks for the suggestion. I thought about that, but TM module is not one of 
the smallest. If there is a smaller, simpler model that uses events that 
someone could recommend I could look into it. But in any case, I was looking 
for something more documented to learn about all capabilities of the events, 
not just the ones that might be used by some module.

On 18 Jan 2019, at 17:43, Mojtaba mailto:mes...@gmail.com>> 
wrote:

Hello Ivan,
Actually i haven't seen documentation but there is a good reference for it, the 
impelemention of modules. You could look around them to find out. It is very 
strightforwards.


On Fri, 18 Jan 2019, 18:57 Ivan Ribakov, 
mailto:i.riba...@zaleos.net>> wrote:
Is there any documentation for module developers that lays out API for 
registering and triggering events from a custom Kamailio module (similar to 
https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes)?

I have been referring to https://www.kamailio.org/docs/kamailio-devel-guide/ up 
until now but it doesn’t seem to cover event_routes.

Thanks in advance,
Ivan
___
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] Dev documentation on implementing event_route events in custom module

2019-01-18 Thread Mojtaba
I'm gone away right now. I'll send for you as soon as

On Fri, 18 Jan 2019, 22:34 Ivan Ribakov,  wrote:

> Thanks for the suggestion. I thought about that, but TM module is not one
> of the smallest. If there is a smaller, simpler model that uses events that
> someone could recommend I could look into it. But in any case, I was
> looking for something more documented to learn about all capabilities of
> the events, not just the ones that might be used by some module.
>
> On 18 Jan 2019, at 17:43, Mojtaba  wrote:
>
> Hello Ivan,
> Actually i haven't seen documentation but there is a good reference for
> it, the impelemention of modules. You could look around them to find out.
> It is very strightforwards.
>
>
> On Fri, 18 Jan 2019, 18:57 Ivan Ribakov,  wrote:
>
>> Is there any documentation for module developers that lays out API for
>> registering and triggering events from a custom Kamailio module (similar to
>> https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes)?
>>
>> I have been referring to
>> https://www.kamailio.org/docs/kamailio-devel-guide/ up until now but it
>> doesn’t seem to cover event_routes.
>>
>> Thanks in advance,
>> Ivan
>> ___
>> 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] Diameter (CDP) crashes on startup. ERROR: cdp [peerstatemachine.c:634]: I_Snd_CER(): I_Snd_CER(): Error on finding local host address > Socket operation on non-socket

2019-01-18 Thread Denys Pozniak
I have just tested on Kamailio 5.2 and result is the same.
Maybe issue is with config?

[root@test]# kamailio -v
version: kamailio 5.2.1 (x86_64/linux) 947769
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 947769
compiled on 11:35:28 Jan 16 2019 with gcc 4.8.5

[root@test]#kamailio -f ./kamailio.cfg - -E
...
26(17359) DEBUG: cdp [peermanager.c:263]: peer_timer(): peer_timer():
taking care of peers...
26(17359) DEBUG: cdp [peermanager.c:280]: peer_timer(): peer_timer(): Peer
dev-diameter-1.ams.proxy.dev State 0
26(17359) DEBUG: cdp [peerstatemachine.c:90]: sm_process(): sm_process():
Peer dev-diameter-1.ams.proxy.dev State Closed Event Start
26(17359) INFO: cdp [peerstatemachine.c:525]: I_Snd_Conn_Req():
I_Snd_Conn_Req(): Peer dev-diameter-1.ams.proxy.dev
26(17359) INFO: cdp [receiver.c:875]: peer_connect(): peer_connect():
Trying to connect to 10.10.10.20 port 3868
23(17356) DEBUG: cdp [receiver.c:106]: log_serviced_peers(): --- Receiver
cdp receiver peer unknown Serviced Peers: ---
23(17356) DEBUG: cdp [receiver.c:114]: log_serviced_peers():

24(17357) DEBUG: cdp [receiver.c:106]: log_serviced_peers(): --- Receiver
cdp_receiver_peer=dev-diameter-1.ams.proxy.dev Serviced Peers: ---
24(17357) DEBUG: cdp [receiver.c:112]: log_serviced_peers():  Peer:
dev-diameter-1.ams.proxy.dev  TCP Socket: -1  Recv.State: 0
24(17357) DEBUG: cdp [receiver.c:114]: log_serviced_peers():

26(17359) INFO: cdp [receiver.c:954]: peer_connect(): peer_connect(): Peer
dev-diameter-1.ams.proxy.dev:3868 connected
24(17357) DEBUG: cdp [receiver.c:702]: receive_loop(): select_recv(): There
is something on the fd exchange pipe
24(17357) DEBUG: cdp [receiver.c:711]: receive_loop(): select_recv(): fd
exchange pipe says fd [10] for peer
0x7fc375dedbe8:[dev-diameter-1.ams.proxy.dev]
26(17359) DEBUG: cdp [peermanager.c:143]: log_peer_list(): --- Peer List:
---
24(17357) DEBUG: cdp [peerstatemachine.c:90]: sm_process(): sm_process():
Peer dev-diameter-1.ams.proxy.dev State Wait_Conn_Ack Event I_Rcv_Conn_Ack
24(17357) DEBUG: cdp [diameter_msg.c:184]: AAANewMessage(): AAANewMessage:
param session received null and it's a request!!
24(17357) ERROR: cdp [peerstatemachine.c:634]: I_Snd_CER(): I_Snd_CER():
Error on finding local host address > Socket operation on non-socket
24(17357) DEBUG: cdp [diameter_msg.c:81]: AAABuildMsgBuffer():
AAABuildMsgBuffer(): len=188
24(17357) DEBUG: cdp [receiver.c:1013]: peer_send_msg(): peer_send_msg():
Pipe push [0x7fc375e01da0]
24(17357) DEBUG: cdp [receiver.c:106]: log_serviced_peers(): --- Receiver
cdp_receiver_peer=dev-diameter-1.ams.proxy.dev Serviced Peers: ---
24(17357) DEBUG: cdp [receiver.c:112]: log_serviced_peers():  Peer:
dev-diameter-1.ams.proxy.dev  TCP Socket: 10  Recv.State: 0
24(17357) DEBUG: cdp [receiver.c:114]: log_serviced_peers():

24(17357) DEBUG: cdp [receiver.c:756]: receive_loop(): select_recv(): There
is something on the send pipe
24(17357) DEBUG: cdp [receiver.c:769]: receive_loop(): select_recv(): Send
pipe says [0x7fc375e01da0] 8
24(17357) DEBUG: cdp [diameter_msg.c:410]: AAAFreeMessage():
AAAFreeMessage: Freeing message (0x7fc375e01da0) 257
24(17357) DEBUG: cdp [receiver.c:106]: log_serviced_peers(): --- Receiver
cdp_receiver_peer=dev-diameter-1.ams.proxy.dev Serviced Peers: ---
24(17357) DEBUG: cdp [receiver.c:112]: log_serviced_peers():  Peer:
dev-diameter-1.ams.proxy.dev  TCP Socket: 10  Recv.State: 0
24(17357) DEBUG: cdp [receiver.c:114]: log_serviced_peers():

26(17359) DEBUG: cdp [peermanager.c:145]: log_peer_list(): State of peer:
Wait_I_CEA FQDN: dev-diameter-1.ams.proxy.dev Port: 3868 Is dynamic
26(17359) DEBUG: cdp [peermanager.c:149]: log_peer_list():
--
24(17357) DEBUG: cdp [receiver.c:106]: log_serviced_peers(): --- Receiver
cdp_receiver_peer=dev-diameter-1.ams.proxy.dev Serviced Peers: ---
24(17357) DEBUG: cdp [receiver.c:112]: log_serviced_peers():  Peer:
dev-diameter-1.ams.proxy.dev  TCP Socket: 10  Recv.State: 1
24(17357) DEBUG: cdp [receiver.c:114]: log_serviced_peers():

24(17357) DEBUG: cdp [receiver.c:579]: do_receive(): receive_loop():
[dev-diameter-1.ams.proxy.dev] Recv Version 1 Length 204
24(17357) DEBUG: cdp [receiver.c:106]: log_serviced_peers(): --- Receiver
cdp_receiver_peer=dev-diameter-1.ams.proxy.dev Serviced Peers: ---

Re: [SR-Users] Dev documentation on implementing event_route events in custom module

2019-01-18 Thread Ivan Ribakov
Thanks for the suggestion. I thought about that, but TM module is not one of 
the smallest. If there is a smaller, simpler model that uses events that 
someone could recommend I could look into it. But in any case, I was looking 
for something more documented to learn about all capabilities of the events, 
not just the ones that might be used by some module.

> On 18 Jan 2019, at 17:43, Mojtaba  wrote:
> 
> Hello Ivan,
> Actually i haven't seen documentation but there is a good reference for it, 
> the impelemention of modules. You could look around them to find out. It is 
> very strightforwards.
> 
> 
> On Fri, 18 Jan 2019, 18:57 Ivan Ribakov,  > wrote:
> Is there any documentation for module developers that lays out API for 
> registering and triggering events from a custom Kamailio module (similar to 
> https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes 
> )?
> 
> I have been referring to https://www.kamailio.org/docs/kamailio-devel-guide/ 
>  up until now but it 
> doesn’t seem to cover event_routes.
> 
> Thanks in advance,
> Ivan
> ___
> 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


[SR-Users] database reconnection db_unixodbc

2019-01-18 Thread Karthik Srinivasan
Hello,

I am testing how kamailio reacts to various database conditions.   One such
condition is if the database engine is simply shut down (that is, database
server process no longer running, tcp listening socket closed, etc...)

I am utilizing the db_unixodbc module to connect to an Informix database
engine.

I am currently running on Kamailio version 5.0.

I have a test query that executes against the database engine every 10
seconds.

Here is what i have noticed if i shut down the database engine at some
point after i run Kamailio.

the first test query that attempts to run against the db engine fails;  it
tries to reconnect and fails.

The second test query (10 seconds after the 1st) results in a SIG_CHILD and
shuts down the entire Kamailio process.

Has anyone experienced this?  Is there a solution to this?   Ideally the
second query should also fail and return gracefully; and ideally queries
continue to fail until the database engine is back up.

See logs below:

Jan 17 20:07:25 [29297]: INFO: (s)  SQL query: FIRST TEST QUERY
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:135]:
db_unixodbc_submit_query(): rv=-1. Query= FIRST TEST QUERY
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
db_unixodbc_extract_error():
unixodbc:SQLExecDirect=08S01:1:-11020:[Informix][Informix ODBC
Driver]Communication link failure.
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:59]: reconnect():
Attempting DB reconnect
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:74]: reconnect():
failed to connect
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
db_unixodbc_extract_error():
unixodbc:SQLDriverConnect=08002:1:0:[unixODBC][Driver Manager]Connection
name in use
Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
db_unixodbc_extract_error():
unixodbc:SQLDriverConnect=HY010:2:-11067:[Informix][Informix ODBC
Driver]Function sequence error.
Jan 17 20:07:25 [29297]: ERROR:  [db_query.c:181]: db_do_raw_query():
error while submitting query
Jan 17 20:07:25 [29297]: ERROR: sqlops [sql_api.c:265]: sql_do_query():
cannot do the query FIRST TEST QUERY
Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL ret: fail (-1)
Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL res: no rows
Jan 17 20:07:35 [29297]: INFO: (s) [123] SQL query: 10 seconds later the
SECOND TEST QUERY (it's the same query as the first one)
Jan 17 20:07:35 [29301]: CRITICAL:  [core/pass_fd.c:277]:
receive_fd(): EOF on 28
Jan 17 20:07:35 [29283]: ALERT:  [main.c:744]: handle_sigs(): child
process 29297 exited by a signal 11
Jan 17 20:07:35 [29283]: ALERT:  [main.c:747]: handle_sigs(): core
was not generated
Jan 17 20:07:35 [29283]: INFO:  [main.c:759]: handle_sigs():
terminating due to SIGCHLD
Jan 17 20:07:35 [29301]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29295]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29291]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29288]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29300]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29284]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29286]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29293]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29289]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29287]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29292]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29296]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29298]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29299]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29285]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29294]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29290]: INFO:  [main.c:814]: sig_usr(): signal 15
received
Jan 17 20:07:35 [29283]: INFO:  [core/sctp_core.c:53]:
sctp_core_destroy(): SCTP API not initialized

Thank you,

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


Re: [SR-Users] Dev documentation on implementing event_route events in custom module

2019-01-18 Thread Mojtaba
Hello Ivan,
Actually i haven't seen documentation but there is a good reference for it,
the impelemention of modules. You could look around them to find out. It is
very strightforwards.


On Fri, 18 Jan 2019, 18:57 Ivan Ribakov,  wrote:

> Is there any documentation for module developers that lays out API for
> registering and triggering events from a custom Kamailio module (similar to
> https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes)?
>
> I have been referring to
> https://www.kamailio.org/docs/kamailio-devel-guide/ up until now but it
> doesn’t seem to cover event_routes.
>
> Thanks in advance,
> Ivan
> ___
> 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] event_route[usrloc:contact-expired]

2019-01-18 Thread Javier Valencia

Hi Daniel


After update my test kamailio to latest 5.2 branch, it's seems to work 
properly.



Best regards, Javier Valencia.



El 18/1/19 a las 13:33, Daniel-Constantin Mierla escribió:


Hello,


can you try with latest 5.1.x or 5.2.x to see if it is about something 
already fixed? Then could be tracked back via commit logs. Or if still 
an issue, it is easier to troubleshoot from dev team point of view.



Cheers,
Daniel


On 18.01.19 11:47, Javier Valencia wrote:


Hi Yasin and Daniel


I upgrade my testing kamailio to 4.4.7, the last branch on 4.4.x 
version, but it's still running like 4.4.3, don't run event_route.



Saludos, Javier Valencia.



El 18/1/19 a las 10:01, Daniel-Constantin Mierla escribió:


Hello,


4.4.3 is very old to remember if there was any related issue and 
moreover it is not the latest in its series, so try first to upgrade 
to latest 4.4.x version, to ensure that you have all fixes for what 
was found wrong during maintenance of 4.4.x.



Cheers,
Daniel


On 18.01.19 09:20, YASIN CANER wrote:

Hello,

this option is added after 4.4.x . Sorry that I looked wrong 
branch.  I tested it on new versions and it is working.



Good luck.


*From:* Javier Valencia 
*Sent:* Friday, January 18, 2019 11:07 AM
*To:* YASIN CANER; Kamailio (SER) - Users Mailing List
*Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]

No,


It's a hidden feature? I can't see in docs.


I made the changes, but Kamailio (as expected) don't start

ERROR:  [modparam.c:141]: set_mod_param_regex():
parameter  of type <1> not found in module


Best regards, Javier Valencia.


El 18/1/19 a las 6:46, YASIN CANER escribió:

Hello

Could you try to set parameter on your test environment?

modparam("registrar", "event_callback","usrloc:contact-expired")
Cheers
Yasin CANER


*From:* Javier Valencia  
*Sent:* Thursday, January 17, 2019 6:51 PM
*To:* YASIN CANER; Kamailio (SER) - Users Mailing List
*Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]

Hi Yasin.


I change debug from 2 to 3 and was turn crazy. But when debug=2 I 
can see other L_INFO entries.



The problem it's this event_route it's not called.


Best regards


Javier Valencia



El 17/1/19 a las 16:37, YASIN CANER escribió:

Hello,

could you check debug level is enough to write logs? Probably it 
is debug=2


https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages

Best Regards

Yasin CANER


tutorials:debug-syslog-messages - Kamailio (OpenSER) Wiki 

Authors of initial tutorial: Daniel-Constantin Mierla (at) gmail.com> Elena-Ramona Modroiu  
Abstract Tutorial about how to print debug and syslog messages 
with Kamailio (OpenSER) SIP Server.

www.kamailio.org 




*From:* sr-users  
 on behalf of Javier 
Valencia  

*Sent:* Thursday, January 17, 2019 6:33 PM
*To:* sr-users@lists.kamailio.org 


*Subject:* [SR-Users] event_route[usrloc:contact-expired]

Hi there!

I'm using Kamailio 4.4.3, and I add this code to my Kamailio:

event_route[usrloc:contact-expired] {

    xlog("L_INFO", "EXPIRED CONTACT START\n");
    xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
    xlog("L_INFO", "EXPIRED CONTACT END\n");
}

I can't see this entries in the log.

I read many times the docs and code, but I don't understand why 
it's not working.


I have two phone with 60 and 300 expiry seconds, if then expire, 
when it's event_route[usrloc:contact-expired] triggered?


Why this event route it's named as usrloc but it's documented in 
registrar module?


I need to provide more info about?

Thank you very much.





___
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA --www.asipto.com

--
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA --www.asipto.com
<>___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Dev documentation on implementing event_route events in custom module

2019-01-18 Thread Ivan Ribakov
Is there any documentation for module developers that lays out API for 
registering and triggering events from a custom Kamailio module (similar to 
https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes)?

I have been referring to https://www.kamailio.org/docs/kamailio-devel-guide/ 
 up until now but it 
doesn’t seem to cover event_routes.

Thanks in advance,
Ivan___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] handling BYEs generated by dialog-timeout

2019-01-18 Thread * Paolo Visintin - evosip.cloud
Hello!

I'm wondering if someone have experience in changing $du on local kamailio
generated packets (like BYE generated at the dialog-timeout) I'm trying to
manipulate in `event_route[tm:local-request]` with no success.

In the end I have it working using the `forward()` function and then using
`exit;` but in this case instead of having 2 BYEs , kamailio sends 4 BYEs
(2 with original $du, 2 with new $du)

this an example :
event_route[tm:local-request] {
  if ($rm == "BYE") {
route(SELECT_OUTBOUND_PROXY);
forward();
exit;
  }
}

I'm using a kamailio proxy on top with no record-route (we want to have
multiple instances of proxy that can change ip address).

Thanks in advance!

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


Re: [SR-Users] event_route[usrloc:contact-expired]

2019-01-18 Thread YASIN CANER
Hello,

I already tested on 5.2.x and it is working.

Yasin CANER


From: Daniel-Constantin Mierla 
Sent: Friday, January 18, 2019 3:33 PM
To: Javier Valencia; Kamailio (SER) - Users Mailing List; YASIN CANER
Subject: Re: [SR-Users] event_route[usrloc:contact-expired]


Hello,


can you try with latest 5.1.x or 5.2.x to see if it is about something already 
fixed? Then could be tracked back via commit logs. Or if still an issue, it is 
easier to troubleshoot from dev team point of view.


Cheers,
Daniel


On 18.01.19 11:47, Javier Valencia wrote:

Hi Yasin and Daniel


I upgrade my testing kamailio to 4.4.7, the last branch on 4.4.x version, but 
it's still running like 4.4.3, don't run event_route.


Saludos, Javier Valencia.



El 18/1/19 a las 10:01, Daniel-Constantin Mierla escribió:

Hello,


4.4.3 is very old to remember if there was any related issue and moreover it is 
not the latest in its series, so try first to upgrade to latest 4.4.x version, 
to ensure that you have all fixes for what was found wrong during maintenance 
of 4.4.x.


Cheers,
Daniel


On 18.01.19 09:20, YASIN CANER wrote:
Hello,

this option is added after 4.4.x . Sorry that I looked wrong branch.  I tested 
it on new versions and it is working.


Good luck.


From: Javier Valencia 
Sent: Friday, January 18, 2019 11:07 AM
To: YASIN CANER; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] event_route[usrloc:contact-expired]


No,


It's a hidden feature? I can't see in docs.


I made the changes, but Kamailio (as expected) don't start

ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter 
 of type <1> not found in module 

Best regards, Javier Valencia.


El 18/1/19 a las 6:46, YASIN CANER escribió:
Hello

Could you try to set parameter on your test environment?


modparam("registrar", "event_callback", "usrloc:contact-expired")

Cheers
Yasin CANER


From: Javier Valencia 
Sent: Thursday, January 17, 2019 6:51 PM
To: YASIN CANER; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] event_route[usrloc:contact-expired]


Hi Yasin.


I change debug from 2 to 3 and was turn crazy. But when debug=2 I can see other 
L_INFO entries.


The problem it's this event_route it's not called.


Best regards


Javier Valencia



El 17/1/19 a las 16:37, YASIN CANER escribió:
Hello,

could you check debug level is enough to write logs? Probably it is debug=2

https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages

Best Regards

Yasin CANER


tutorials:debug-syslog-messages - Kamailio (OpenSER) 
Wiki
Authors of initial tutorial: Daniel-Constantin Mierla  
Elena-Ramona Modroiu  Abstract Tutorial about how to 
print debug and syslog messages with Kamailio (OpenSER) SIP Server.
www.kamailio.org




From: sr-users 

 on behalf of Javier Valencia 
Sent: Thursday, January 17, 2019 6:33 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] event_route[usrloc:contact-expired]


Hi there!

I'm using Kamailio 4.4.3, and I add this code to my Kamailio:

event_route[usrloc:contact-expired] {

xlog("L_INFO", "EXPIRED CONTACT START\n");
xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
xlog("L_INFO", "EXPIRED CONTACT END\n");
}

I can't see this entries in the log.

I read many times the docs and code, but I don't understand why it's not 
working.

I have two phone with 60 and 300 expiry seconds, if then expire, when it's 
event_route[usrloc:contact-expired] triggered?

Why this event route it's named as usrloc but it's documented in registrar 
module?

I need to provide more info about?

Thank you very much.





___
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

--
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- 

Re: [SR-Users] event_route[usrloc:contact-expired]

2019-01-18 Thread Daniel-Constantin Mierla
Hello,


can you try with latest 5.1.x or 5.2.x to see if it is about something
already fixed? Then could be tracked back via commit logs. Or if still
an issue, it is easier to troubleshoot from dev team point of view.


Cheers,
Daniel


On 18.01.19 11:47, Javier Valencia wrote:
>
> Hi Yasin and Daniel
>
>
> I upgrade my testing kamailio to 4.4.7, the last branch on 4.4.x
> version, but it's still running like 4.4.3, don't run event_route.
>
>
> Saludos, Javier Valencia.
>
>
>
> El 18/1/19 a las 10:01, Daniel-Constantin Mierla escribió:
>>
>> Hello,
>>
>>
>> 4.4.3 is very old to remember if there was any related issue and
>> moreover it is not the latest in its series, so try first to upgrade
>> to latest 4.4.x version, to ensure that you have all fixes for what
>> was found wrong during maintenance of 4.4.x.
>>
>>
>> Cheers,
>> Daniel
>>
>>
>> On 18.01.19 09:20, YASIN CANER wrote:
>>> Hello,
>>>
>>> this option is added after 4.4.x . Sorry that I looked wrong
>>> branch.  I tested it on new versions and it is working.
>>>
>>>
>>> Good luck.
>>>
>>> 
>>> *From:* Javier Valencia 
>>> *Sent:* Friday, January 18, 2019 11:07 AM
>>> *To:* YASIN CANER; Kamailio (SER) - Users Mailing List
>>> *Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]
>>>  
>>>
>>> No,
>>>
>>>
>>> It's a hidden feature? I can't see in docs.
>>>
>>>
>>> I made the changes, but Kamailio (as expected) don't start
>>>
>>> ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter
>>>  of type <1> not found in module 
>>>
>>> Best regards, Javier Valencia.
>>>
>>>
>>> El 18/1/19 a las 6:46, YASIN CANER escribió:
 Hello

 Could you try to set parameter on your test environment?

 modparam("registrar", "event_callback", "usrloc:contact-expired")
 Cheers
 Yasin CANER

 
 *From:* Javier Valencia  
 *Sent:* Thursday, January 17, 2019 6:51 PM
 *To:* YASIN CANER; Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]
  

 Hi Yasin.


 I change debug from 2 to 3 and was turn crazy. But when debug=2 I
 can see other L_INFO entries.


 The problem it's this event_route it's not called.


 Best regards


 Javier Valencia



 El 17/1/19 a las 16:37, YASIN CANER escribió:
> Hello,
>
> could you check debug level is enough to write logs? Probably it
> is debug=2
>
> https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages
>
> Best Regards
>
> Yasin CANER
>
>
> tutorials:debug-syslog-messages - Kamailio (OpenSER) Wiki
> 
> Authors of initial tutorial: Daniel-Constantin Mierla  (at) gmail.com> Elena-Ramona Modroiu 
> Abstract Tutorial about how to print debug and syslog messages
> with Kamailio (OpenSER) SIP Server.
> www.kamailio.org 
>
>
>
> 
> *From:* sr-users 
>  on behalf of Javier
> Valencia  
> *Sent:* Thursday, January 17, 2019 6:33 PM
> *To:* sr-users@lists.kamailio.org 
> *Subject:* [SR-Users] event_route[usrloc:contact-expired]
>  
>
> Hi there!
>
> I'm using Kamailio 4.4.3, and I add this code to my Kamailio:
>
> event_route[usrloc:contact-expired] {
>
>     xlog("L_INFO", "EXPIRED CONTACT START\n");
>     xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
>     xlog("L_INFO", "EXPIRED CONTACT END\n");
> }
>
> I can't see this entries in the log.
>
> I read many times the docs and code, but I don't understand why
> it's not working.
>
> I have two phone with 60 and 300 expiry seconds, if then expire,
> when it's event_route[usrloc:contact-expired] triggered?
>
> Why this event route it's named as usrloc but it's documented in
> registrar module?
>
> I need to provide more info about?
>
> Thank you very much.
>
>
>
>>>
>>> ___
>>> 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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
>> Washington, DC, USA -- www.asipto.com

-- 
Daniel-Constantin Mierla -- www.asipto.com

Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-18 Thread Sergey Safarov
kamailio is debian based. If you know debian then for you may be more easy
extend this image.
This primary dist that is supported by kamailio team.

kamailio-ci is Alpine dist based. Alpine dist allow create more thin and
secure docker images.
Please check kamailio images sizes
1)
https://cloud.docker.com/u/kamailio/repository/docker/kamailio/kamailio/tags
2)
https://cloud.docker.com/u/kamailio/repository/docker/kamailio/kamailio-ci/tags

and vulnerabilities
1) https://hub.docker.com/_/debian/scans/library/debian/9.6
2) https://hub.docker.com/_/alpine/scans/library/alpine/3.8


пт, 18 янв. 2019 г. в 12:48, Grant Bagdasarian :

> Thanks for the explanation, but I meant the different docker images like
> kamailio, kamailio-ci and pkg-kamailio-docker.
>
> Ive been building upon the kamailio/kamailio docker image, as that one
> made the most sense to me.
> ___
> 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] event_route[usrloc:contact-expired]

2019-01-18 Thread Javier Valencia

Hi Yasin and Daniel


I upgrade my testing kamailio to 4.4.7, the last branch on 4.4.x 
version, but it's still running like 4.4.3, don't run event_route.



Saludos, Javier Valencia.



El 18/1/19 a las 10:01, Daniel-Constantin Mierla escribió:


Hello,


4.4.3 is very old to remember if there was any related issue and 
moreover it is not the latest in its series, so try first to upgrade 
to latest 4.4.x version, to ensure that you have all fixes for what 
was found wrong during maintenance of 4.4.x.



Cheers,
Daniel


On 18.01.19 09:20, YASIN CANER wrote:

Hello,

this option is added after 4.4.x . Sorry that I looked wrong branch.  
I tested it on new versions and it is working.



Good luck.


*From:* Javier Valencia 
*Sent:* Friday, January 18, 2019 11:07 AM
*To:* YASIN CANER; Kamailio (SER) - Users Mailing List
*Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]

No,


It's a hidden feature? I can't see in docs.


I made the changes, but Kamailio (as expected) don't start

ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter
 of type <1> not found in module 

Best regards, Javier Valencia.


El 18/1/19 a las 6:46, YASIN CANER escribió:

Hello

Could you try to set parameter on your test environment?

modparam("registrar", "event_callback","usrloc:contact-expired")
Cheers
Yasin CANER


*From:* Javier Valencia  
*Sent:* Thursday, January 17, 2019 6:51 PM
*To:* YASIN CANER; Kamailio (SER) - Users Mailing List
*Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]

Hi Yasin.


I change debug from 2 to 3 and was turn crazy. But when debug=2 I 
can see other L_INFO entries.



The problem it's this event_route it's not called.


Best regards


Javier Valencia



El 17/1/19 a las 16:37, YASIN CANER escribió:

Hello,

could you check debug level is enough to write logs? Probably it is 
debug=2


https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages

Best Regards

Yasin CANER


tutorials:debug-syslog-messages - Kamailio (OpenSER) Wiki 

Authors of initial tutorial: Daniel-Constantin Mierla gmail.com> Elena-Ramona Modroiu  Abstract 
Tutorial about how to print debug and syslog messages with Kamailio 
(OpenSER) SIP Server.

www.kamailio.org 




*From:* sr-users  
 on behalf of Javier 
Valencia  

*Sent:* Thursday, January 17, 2019 6:33 PM
*To:* sr-users@lists.kamailio.org 
*Subject:* [SR-Users] event_route[usrloc:contact-expired]

Hi there!

I'm using Kamailio 4.4.3, and I add this code to my Kamailio:

event_route[usrloc:contact-expired] {

    xlog("L_INFO", "EXPIRED CONTACT START\n");
    xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
    xlog("L_INFO", "EXPIRED CONTACT END\n");
}

I can't see this entries in the log.

I read many times the docs and code, but I don't understand why 
it's not working.


I have two phone with 60 and 300 expiry seconds, if then expire, 
when it's event_route[usrloc:contact-expired] triggered?


Why this event route it's named as usrloc but it's documented in 
registrar module?


I need to provide more info about?

Thank you very much.





___
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA --www.asipto.com
<>___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-18 Thread Victor Seva
On Fri, 18 Jan 2019 at 00:09, Victor Seva <
linuxman...@torreviejawireless.org> wrote:

> On Thu, Jan 17, 2019, 23:28 Grant Bagdasarian  wrote:
>
>> Hello,
>>
>> I was wondering when the Kamailio Docker image will be updated to use
>> 5.2.1 and be available
>>
>
>  I'll try to find some spare cycles tomorrow morning. Oh wait, this
> morning.
>

Updated and building https://hub.docker.com/r/kamailio/kamailio/builds
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-18 Thread Grant Bagdasarian
Thanks for the explanation, but I meant the different docker images like
kamailio, kamailio-ci and pkg-kamailio-docker.

Ive been building upon the kamailio/kamailio docker image, as that one made
the most sense to me.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Problem with ghost dialogs

2019-01-18 Thread Cyrille Demaret
Hi Daniel,

 

I have checked and I have a SIP trace of the call. Can I send it to you to
your email?

 

Best regards,

 

Cyrille

 

De : Daniel-Constantin Mierla  
Envoyé : vendredi 18 janvier 2019 10:06
À : Kamailio (SER) - Users Mailing List ;
Cyrille Demaret 
Objet : Re: [SR-Users] Problem with ghost dialogs

 

Hello,

they should not stay that long, there are some parameters related to it,
see:

  -
https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.early_t
imeout

Does it happen that you have the sip trace for this call?

Cheers,
Daniel

On 17.01.19 20:25, Cyrille Demaret wrote:

Hi,

 

I’m running Kamailio 5.1.4 and I have some problem with some random dialogs
sometimes staying in early state and never ends until I restart Kamailio.

 

According to the init_ts, this dialog is there since 11/01/2019.

 

*   Do you have an idea how I can diagnose this problem?
*   Is there a way to kill these dialogs? I have tried with
“dlg.end_dlg” but It seems it’s not possible to kill dialogs in early
states.

 

{

h_entry: 3382

h_id: 4069

call-id: d6e6de79-7d55-486f-889f-01b05c003411

from_uri: sip:0037...@mydomain.com

to_uri: sip:1...@mydomain.com

state: 2

start_ts: 0

init_ts: 1547195739

timeout: 0

lifetime: 43200

dflags: 1536

sflags: 0

iflags: 0

caller: {

tag: a909d6fa-cee9-44ac-ad76-3697fcd5cb0e

contact:
sip:asterisk@192.168.102.20:5080;alias=192.168.102.20~5080~1

cseq: 7362

route_set: 

socket: udp:192.168.102.10:5060

}

callee: {

tag: 

contact: 

cseq: 

route_set: 

socket: 

}

profiles: {

{

caller: sip:0037...@mydomain.com

}

{

callee: sip:1...@mydomain.com

}

}

variables: {

}

}

 

Thank you for your help.

 

Best regards,

 

Cyrille





___
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in
Washington, DC, USA -- www.asipto.com  
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-18 Thread Sergey Safarov
This from image description

Tags master, latest, 5.2 and 5.1 based on alpine image with removed all
libs except libc, busybox, tcpdump, dumpcap, gawk, kamailio and dependent
libs.
Tags that contains -alpine keyword based on alpine image. All OS tools is
untouched and possible to use apk utility.
Tags that contains -alpine.debug keyword based on alpine image and includes
gdb utility with kamailio debug files.



пт, 18 янв. 2019 г. в 12:05, Grant Bagdasarian :

> Thanks!
>
> What’s the difference and purpose of the three different images?
>
>
> ___
> 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] segfault at 0 - process stopped

2019-01-18 Thread Daniel-Constantin Mierla
Hello,

as pointed before, the  use a more recent version is strongly recommended.

Then 3.7 was never a kamailio release, maybe you just have 3.3.7.

For the records, if you want to go ahead and troubleshoot yourself that
version, here are some hints to start with:

  -
https://stackoverflow.com/questions/2179403/how-do-you-read-a-segfault-kernel-log-message

Cheers,
Daniel

On 14.01.19 20:40, YASIN CANER wrote:
> Hello. 
> Kamailio version is really old. 5.2 is available now. Without core
> dump backtrace , it is hard to find out. Until version5.2 , tons of
> buga are fixed and improved. 
>
>
> Good luck
>
>
>
> AL RSM mailto:ali...@mail.com>> şunları yazdı (14
> Oca 2019 21:54):
>
>> Hi 
>>  
>> We are running Kamailio 3.7 on our production servers. The Kamailio
>> process stopped running on one of the 4 servers. Log shows "segfault
>> error".
>> No core file generated. Any suggestion on how to verify the issue
>> would be appreciated.
>>  
>> kernel: [63574875.776269] kamailio[1558]: segfault at 0 ip
>> 0055933a sp 7fffd4ca6700 error 4 in kamailio[40+211000]
>> /usr/sbin/kamailio[1545]: ALERT:  [main.c:785]: child process
>> 1558 exited by a signal 11
>> /usr/sbin/kamailio[1545]: ALERT:  [main.c:788]: core was not
>> generated
>> CRON[21436]: (root) CMD (command -v debian-sa1 > /dev/null &&
>> debian-sa1 1 1)
>>  
>> Thanks,
>> AL
>>
>> ___
>> 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

-- 
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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

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


Re: [SR-Users] rtpengine_manage() in async tasks

2019-01-18 Thread Daniel-Constantin Mierla
Hello,

rtpengine_manage() as well as rtpproxy_manage() do a delete command if
it is a failure processing context, like failure_route or resuming a
suspended transaction (which is like canceling the suspended branch).

The reason for doing delete is to allow disengaging rtpengine after a
forwarding failure, to allow the option of no rtp relay for next
attempts. The manage function has its roots in the default configuration
time from several years ago where in failur_route there was an unforce
proxy command, and engaging the rtpproxy was in branch route.

So, in such cases, if you want to route to a new destination, you should
use the function in branch_route. Which is actually a good practice,
using rtp relay makes sense only if there is an outgoing branch.

Cheers,
Daniel

On 15.01.19 02:36, Alex Balashov wrote:
> Hi,
>
> I've run into an issue with handling reinvites in async task
> workers--which I need to do in order to introduce a small delay to avoid
> a UA race condition--in which some state that is necessary for
> rtpengine_manage() to do the right thing seems to be lost.
>
> Specifically, if I do this:
>
> --
> loadmodule "mqueue"
> loadmodule "rtimer"
>
> ...
>
> modparam("rtimer", "timer", "name=reinvite_q1;interval=1u;mode=1;")
> modparam("rtimer", "exec", "timer=reinvite_q1;route=REINVITE_DEQUEUE")
>
> modparam("mqueue", "mqueue", "name=reinvite_q");
>
> ...
>
> route {
>...
>
>if(has_totag()) {
>   if(loose_route()) {
>  ...
>
>if(is_method("INVITE")) {
>   if(!t_suspend()) {
>  sl_send_reply("500", "Server Internal Error");
>exit;
> }
>
> mq_add("reinvite_q", "$T(id_index):$T(id_label)", "");
>  } else 
>   route(IN_DLG_REQ);
>   
>   exit;
>}
>
>...
> }
>
> route[REINVITE_DEQUEUE] {
>while(mq_fetch("reinvite_q")) {
>   $var(id) = $(mqk(reinvite_q){s.select,0,:}{s.int});
>   $var(label) = $(mqk(reinvite_q){s.select,1,:}{s.int});
>
>   t_continue("$var(id)", "$var(label)", "IN_DLG_REQ");
>}
> }
>
> route[IN_DLG_REQ] {
>handle_ruri_alias();
>
>if(is_method("BYE"))
>   rtpengine_manage();
>else if(is_method("INVITE") && sdp_content()) 
>   rtpengine_manage("replace-origin replace-session-connection ICE=remove")
>
>t_on_reply("MAIN_REPLY");
>
>if(!t_relay())
>   sl_reply_error();
> }
>
> onreply_route[MAIN_REPLY] {
>if(is_method("INVITE") && sdp_content()) 
>   rtpengine_manage("replace-origin replace-session-connection 
> ICE=remove");
> }
> --
>
> What I find is that if I generate a reinvite from either side,
> rtpengine_manage() passes through the SDP offer in the reinvite
> unadulterated, although the answer returns properly adulterated by
> RTPEngine.
>
> The same thing occurs if I use 'async', which as I gather is just a
> wrapper of convenience around t_suspend/t_continue() anyway. That module
> won't do for my purposes because I need a millisecond-level delay
> resolution rather than second-level, anyhow.
>
> Anyway, surely enough, this is because the execution context is one that
> insinuates a stream deletion. When the reinvite offer comes across and I
> call rtpengine_manage(), the command sent is 'delete':
>
> --
> Jan 14 20:24:23 staccato.evaristesys.com rtpengine[33830]: INFO: 
> [c94347dcf92e7ccc10dee84c4e0d1c8a]: Received command 'delete' from 
> 209.51.167.66:39788
> --
>
> The RTPEngine module documentation actually warns about this:
>
> https://kamailio.org/docs/modules/5.2.x/modules/rtpengine.html#rtpengine.f.rtpengine_manage
>
> But this insight is buried in the fourth bullet point:
>
>"If BYE or CANCEL, or called within a FAILURE_ROUTE[], then call 
> rtpengine_delete(). Be careful with calling this function after 
> resuming a suspended transaction (e.g., after t_continue()), 
> because the context of executed route is FAILURE ROUTE (in other 
> words, rtpengine_manage() in the route block of t_continue() 
> does the same as in failure_route)."
>
> This would lead one to believe that it applies only in the context of
> handling a BYE or CANCEL in a resumed transaction, when in fact it seems
> to hold true of non-BYE/CANCEL and non-failure contexts as well, as can
> be clearly seen with the reinvite. 
>
> The behaviour is exactly as expected if I don't use rtpengine_manage()
> and instead manually call rtpengine_offer()/rtpengine_answer(). And
> expected behaviour comes from rtpengine_manage() if I don't handle the
> request in a resumed transaction context. 
>
> This yields the fundamental question:
>
> Is there any way to have my cake and eat it too? I really want to use
> rtpengine_manage() because I need to handle a potential SDP offer-in-ACK
> scenario and don't want to do a bunch of state-keeping in order to use
> the correct choice of rtpengine_{offer|answer}() in the right context,
> which is a problem rtpengine_manage() solves beautifully. At the same
> time, 

Re: [SR-Users] authentification issue when nb user increase

2019-01-18 Thread Daniel-Constantin Mierla
Hello,

is the database server using a lot of cpu? You can also try to set a
larger value for tcp_children global parameter -- note that for all
tcp/tls sockets, there is a single pool of processes, not per socket
like for udp.

Cheers,
Daniel

On 15.01.19 11:32, Laurent Schweizer wrote:
> Hello,
>
> I have a proxy with Kamailio 5.0.6 working since few month without any issue.
> Around 4500 locations and 5300 contacts
>
> This weekend we move a very old proxy (Kamailio 3.3.2 with an old server )to 
> this new one, adding around 14’000 users and 15’000 contacts.
>
> Yesterday when calls was starting we get an big issue with this new proxy, 
> lot of phones was disconnected and some calls was rejected.
>
> I see that the issue was the authentication (done via a mysql DB with the 
> cluster db module) many phone get a failure and was disconnected, mostly 
> phone connected via TCP or TLS we see less issue with UDP even we have much 
> more .
>
> The issue was not the number of TCP/TLS connection as we see the REGISTER and 
> the 401 going back, so connection was correctly done
>
>
> Currently it’s working but I don’t know exactly why ☹,  I mean I have done a 
> change but it has really no relation … , during the same time I get another 
> issue, some calls have no voice…
> We are using rtpengine (on the old proxy we was using rtpproxy) and with the 
> rtproxy we already face a long time ago such case and to solve it we setup 
> multiple rtpproxy (on the same host) 
> So I try to do the same, I setup a second rtpengine on the same host and when 
> I reload the config with :  kamcmd rtpengine.reload all registration was 
> working perfectly ...
>
> As they is no relation with the registration end the rtpengine  I don't know 
> why now it's working.
>  
> Any idea ?
>
> BR
>
> Laurent
>
>
>
>
>
>
>
>
> ___
> 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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com


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


Re: [SR-Users] Problem with ghost dialogs

2019-01-18 Thread Daniel-Constantin Mierla
Hello,

they should not stay that long, there are some parameters related to it,
see:

  -
https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.early_timeout

Does it happen that you have the sip trace for this call?

Cheers,
Daniel

On 17.01.19 20:25, Cyrille Demaret wrote:
>
> Hi,
>
>  
>
> I’m running Kamailio 5.1.4 and I have some problem with some random
> dialogs sometimes staying in early state and never ends until I
> restart Kamailio.
>
>  
>
> According to the init_ts, this dialog is there since 11/01/2019.
>
>  
>
>   * Do you have an idea how I can diagnose this problem?
>   * Is there a way to kill these dialogs? I have tried with
> “dlg.end_dlg” but It seems it’s not possible to kill dialogs in
> early states.
>
>  
>
> {
>
>     h_entry: 3382
>
>     h_id: 4069
>
>     call-id: d6e6de79-7d55-486f-889f-01b05c003411
>
>     from_uri: sip:0037...@mydomain.com
>
>     to_uri: sip:1...@mydomain.com
>
>     state: 2
>
>     start_ts: 0
>
>     init_ts: 1547195739
>
>     timeout: 0
>
>     lifetime: 43200
>
>     dflags: 1536
>
>     sflags: 0
>
>     iflags: 0
>
>     caller: {
>
>     tag: a909d6fa-cee9-44ac-ad76-3697fcd5cb0e
>
>     contact:
> sip:asterisk@192.168.102.20:5080;alias=192.168.102.20~5080~1
>
>     cseq: 7362
>
>     route_set:
>
> socket: udp:192.168.102.10:5060
>
>     }
>
>     callee: {
>
>     tag:
>
> contact:
>
> cseq:
>
> route_set:
>
> socket:
>
> }
>
>     profiles: {
>
>     {
>
>     caller: sip:0037...@mydomain.com
>
>     }
>
>     {
>
>     callee: sip:1...@mydomain.com
>
>     }
>
>     }
>
>     variables: {
>
>     }
>
> }
>
>  
>
> Thank you for your help.
>
>  
>
> Best regards,
>
>  
>
> Cyrille
>
>
> ___
> 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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

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


Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-18 Thread Grant Bagdasarian
Thanks!

What’s the difference and purpose of the three different images?
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] event_route[usrloc:contact-expired]

2019-01-18 Thread Daniel-Constantin Mierla
Hello,


4.4.3 is very old to remember if there was any related issue and
moreover it is not the latest in its series, so try first to upgrade to
latest 4.4.x version, to ensure that you have all fixes for what was
found wrong during maintenance of 4.4.x.


Cheers,
Daniel


On 18.01.19 09:20, YASIN CANER wrote:
> Hello,
>
> this option is added after 4.4.x . Sorry that I looked wrong branch. 
> I tested it on new versions and it is working.
>
>
> Good luck.
>
> 
> *From:* Javier Valencia 
> *Sent:* Friday, January 18, 2019 11:07 AM
> *To:* YASIN CANER; Kamailio (SER) - Users Mailing List
> *Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]
>  
>
> No,
>
>
> It's a hidden feature? I can't see in docs.
>
>
> I made the changes, but Kamailio (as expected) don't start
>
> ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter
>  of type <1> not found in module 
>
> Best regards, Javier Valencia.
>
>
> El 18/1/19 a las 6:46, YASIN CANER escribió:
>> Hello
>>
>> Could you try to set parameter on your test environment?
>>
>> modparam("registrar", "event_callback", "usrloc:contact-expired")
>> Cheers
>> Yasin CANER
>>
>> 
>> *From:* Javier Valencia  
>> *Sent:* Thursday, January 17, 2019 6:51 PM
>> *To:* YASIN CANER; Kamailio (SER) - Users Mailing List
>> *Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]
>>  
>>
>> Hi Yasin.
>>
>>
>> I change debug from 2 to 3 and was turn crazy. But when debug=2 I can
>> see other L_INFO entries.
>>
>>
>> The problem it's this event_route it's not called.
>>
>>
>> Best regards
>>
>>
>> Javier Valencia
>>
>>
>>
>> El 17/1/19 a las 16:37, YASIN CANER escribió:
>>> Hello,
>>>
>>> could you check debug level is enough to write logs? Probably it is
>>> debug=2
>>>
>>> https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages
>>>
>>> Best Regards
>>>
>>> Yasin CANER
>>>
>>>
>>> tutorials:debug-syslog-messages - Kamailio (OpenSER) Wiki
>>> 
>>> Authors of initial tutorial: Daniel-Constantin Mierla >> gmail.com> Elena-Ramona Modroiu  Abstract
>>> Tutorial about how to print debug and syslog messages with Kamailio
>>> (OpenSER) SIP Server.
>>> www.kamailio.org 
>>>
>>>
>>>
>>> 
>>> *From:* sr-users 
>>>  on behalf of Javier
>>> Valencia  
>>> *Sent:* Thursday, January 17, 2019 6:33 PM
>>> *To:* sr-users@lists.kamailio.org 
>>> *Subject:* [SR-Users] event_route[usrloc:contact-expired]
>>>  
>>>
>>> Hi there!
>>>
>>> I'm using Kamailio 4.4.3, and I add this code to my Kamailio:
>>>
>>> event_route[usrloc:contact-expired] {
>>>
>>>     xlog("L_INFO", "EXPIRED CONTACT START\n");
>>>     xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
>>>     xlog("L_INFO", "EXPIRED CONTACT END\n");
>>> }
>>>
>>> I can't see this entries in the log.
>>>
>>> I read many times the docs and code, but I don't understand why it's
>>> not working.
>>>
>>> I have two phone with 60 and 300 expiry seconds, if then expire,
>>> when it's event_route[usrloc:contact-expired] triggered?
>>>
>>> Why this event route it's named as usrloc but it's documented in
>>> registrar module?
>>>
>>> I need to provide more info about?
>>>
>>> Thank you very much.
>>>
>>>
>>>
>
> ___
> 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 Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

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


Re: [SR-Users] event_route[usrloc:contact-expired]

2019-01-18 Thread YASIN CANER
Hello,

this option is added after 4.4.x . Sorry that I looked wrong branch.  I tested 
it on new versions and it is working.


Good luck.


From: Javier Valencia 
Sent: Friday, January 18, 2019 11:07 AM
To: YASIN CANER; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] event_route[usrloc:contact-expired]


No,


It's a hidden feature? I can't see in docs.


I made the changes, but Kamailio (as expected) don't start

ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter 
 of type <1> not found in module 

Best regards, Javier Valencia.


El 18/1/19 a las 6:46, YASIN CANER escribió:
Hello

Could you try to set parameter on your test environment?


modparam("registrar", "event_callback", "usrloc:contact-expired")

Cheers
Yasin CANER


From: Javier Valencia 
Sent: Thursday, January 17, 2019 6:51 PM
To: YASIN CANER; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] event_route[usrloc:contact-expired]


Hi Yasin.


I change debug from 2 to 3 and was turn crazy. But when debug=2 I can see other 
L_INFO entries.


The problem it's this event_route it's not called.


Best regards


Javier Valencia



El 17/1/19 a las 16:37, YASIN CANER escribió:
Hello,

could you check debug level is enough to write logs? Probably it is debug=2

https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages

Best Regards

Yasin CANER


tutorials:debug-syslog-messages - Kamailio (OpenSER) 
Wiki
Authors of initial tutorial: Daniel-Constantin Mierla  
Elena-Ramona Modroiu  Abstract Tutorial about how to 
print debug and syslog messages with Kamailio (OpenSER) SIP Server.
www.kamailio.org




From: sr-users 

 on behalf of Javier Valencia 
Sent: Thursday, January 17, 2019 6:33 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] event_route[usrloc:contact-expired]


Hi there!

I'm using Kamailio 4.4.3, and I add this code to my Kamailio:

event_route[usrloc:contact-expired] {

xlog("L_INFO", "EXPIRED CONTACT START\n");
xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
xlog("L_INFO", "EXPIRED CONTACT END\n");
}

I can't see this entries in the log.

I read many times the docs and code, but I don't understand why it's not 
working.

I have two phone with 60 and 300 expiry seconds, if then expire, when it's 
event_route[usrloc:contact-expired] triggered?

Why this event route it's named as usrloc but it's documented in registrar 
module?

I need to provide more info about?

Thank you very much.


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


Re: [SR-Users] event_route[usrloc:contact-expired]

2019-01-18 Thread Javier Valencia

No,


It's a hidden feature? I can't see in docs.


I made the changes, but Kamailio (as expected) don't start

   ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter
of type <1> not found in module 

Best regards, Javier Valencia.


El 18/1/19 a las 6:46, YASIN CANER escribió:

Hello

Could you try to set parameter on your test environment?

modparam("registrar", "event_callback","usrloc:contact-expired")
Cheers
Yasin CANER


*From:* Javier Valencia 
*Sent:* Thursday, January 17, 2019 6:51 PM
*To:* YASIN CANER; Kamailio (SER) - Users Mailing List
*Subject:* Re: [SR-Users] event_route[usrloc:contact-expired]

Hi Yasin.


I change debug from 2 to 3 and was turn crazy. But when debug=2 I can 
see other L_INFO entries.



The problem it's this event_route it's not called.


Best regards


Javier Valencia



El 17/1/19 a las 16:37, YASIN CANER escribió:

Hello,

could you check debug level is enough to write logs? Probably it is 
debug=2


https://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages

Best Regards

Yasin CANER


tutorials:debug-syslog-messages - Kamailio (OpenSER) Wiki 

Authors of initial tutorial: Daniel-Constantin Mierla gmail.com> Elena-Ramona Modroiu  Abstract 
Tutorial about how to print debug and syslog messages with Kamailio 
(OpenSER) SIP Server.

www.kamailio.org 




*From:* sr-users  
 on behalf of Javier 
Valencia  

*Sent:* Thursday, January 17, 2019 6:33 PM
*To:* sr-users@lists.kamailio.org 
*Subject:* [SR-Users] event_route[usrloc:contact-expired]

Hi there!

I'm using Kamailio 4.4.3, and I add this code to my Kamailio:

event_route[usrloc:contact-expired] {

    xlog("L_INFO", "EXPIRED CONTACT START\n");
    xlog("L_INFO", "EXPIRED CONTACT for $ulc(exp=>aor)\n");
    xlog("L_INFO", "EXPIRED CONTACT END\n");
}

I can't see this entries in the log.

I read many times the docs and code, but I don't understand why it's 
not working.


I have two phone with 60 and 300 expiry seconds, if then expire, when 
it's event_route[usrloc:contact-expired] triggered?


Why this event route it's named as usrloc but it's documented in 
registrar module?


I need to provide more info about?

Thank you very much.



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