Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Sergey Safarov
I have testes build on 5.7 kernel on CentOS 8 (custom rpm package)

You will find commit here
https://github.com/sipwise/rtpengine/issues/975

Sergey

On Fri, Sep 11, 2020 at 10:53 PM Daniel-Constantin Mierla 
wrote:

> Related to tainted kernel, I faced the same issue when I deployed
> rtpengine on a Suse Enterprise many months ago, so I do not really remember
> the exact steps, but there is a way to disable the check of signed kernel
> modules (iirc, these are only the ones coming from the kernel source tree,
> so if you need to load any external kernel module, you have to disable this
> option).
>
> Quick check on the net, it may have to do with module.sig_enforce option
> for kernel loading.
>
> Cheers,
> Daniel
> On 11.09.20 21:31, Andrew Chen wrote:
>
> Sorry let me clarify this line here:
>
> "...at the time, I was running an older version 8.0.x so I recompiled all
> the ngcp packages under this kernel and completed the installation without
> issues.."
>
> 8.0.x is the older ngcp version. I recompiled version 9.0.1.0 under that
> new kernel version 5.3.0-1035-aws #37-Ubuntu
>
>
> On Fri, Sep 11, 2020 at 3:29 PM Andrew Chen  wrote:
>
>> Thanks Alex.
>>
>> So it turns out my rtpengine stopped working after our latest kernel
>> upgrade to:
>>
>> Linux sjomainrtpe30 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6 01:17:09 UTC
>> 2020 x86_64 x86_64 x86_64 GNU/Linux
>>
>> at the time, I was running an older version 8.0.x so I recompiled all the
>> ngcp packages under this kernel and completed the installation without
>> issues.
>>
>> As soon as we started making test calls, I received 0 audio from those
>> test endpoints.  Looking at the rtpengine logs, I see several messages
>> that's quite concerning:
>>
>> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434623] xt_RTPENGINE:
>> loading out-of-tree module taints kernel.
>> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434670] xt_RTPENGINE: module
>> verification failed: signature and/or required key missing - tainting kernel
>> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434938] Registering
>> xt_RTPENGINE module - version 9.0.1.0+0~mr9.0.1.0
>>
>> and
>>
>> Sep 11 18:49:50 sjomainrtpe30 rtpengine[1030]: WARNING: 
>> [2-7859@2600:1f1c:4ff:3e01:f64d:2f67:c0fa:c931
>> port 5]: No support for kernel packet forwarding available (decryption
>> cipher or HMAC not supported by kernel module)
>>
>> which I assume is due to the first error I pasted.
>>
>> So I tried
>>
>> - rebooting the system which maybe the module wasn't loaded properly.
>> - I reran modprobe to make sure the module is installed
>> - I ran some dkms command to see if any error pop up due to the kernel
>> version I'm running and I see no errors:
>>
>> dkms status
>> falco, 0.20.0+d77080a, 5.3.0-1032-aws, x86_64: installed
>> falco, 0.20.0+d77080a, 5.3.0-1035-aws, x86_64: installed
>> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1032-aws, x86_64: installed
>> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1035-aws, x86_64: installed
>>
>> So I'm running out of options.
>>
>> Any advice?
>>
>>
>> On Fri, Sep 11, 2020 at 3:17 PM Alex Balashov 
>> wrote:
>>
>>> There is an RTPEngine mailing list, I believe, but RTPEngine questions
>>> are often posed here given its close association with Kamailio. What's
>>> going on?
>>>
>>> On 9/11/20 2:57 PM, Andrew Chen wrote:
>>> > Hey guys,
>>> >
>>> > Is this the right place to ask about rtpengine (ngcp) related issues
>>> > with kernel packet forwarding?
>>> >
>>> > Thanks.
>>> >
>>> > --
>>> > Andy Chen
>>> > Sr. Telephony Lead Engineer
>>> > achen@ fuze.com 
>>> >
>>> >
>>> >
>>> > *Confidentiality Notice: The information contained in this e-mail and
>>> any
>>> > attachments may be confidential. If you are not an intended recipient,
>>> you
>>> > are hereby notified that any dissemination, distribution or copying of
>>> this
>>> > e-mail is strictly prohibited. If you have received this e-mail in
>>> error,
>>> > please notify the sender and permanently delete the e-mail and any
>>> > attachments immediately. You should not retain, copy or use this
>>> e-mail or
>>> > any attachment for any purpose, nor disclose all or any part of the
>>> > contents to any other person. Thank you.*
>>> >
>>> > ___
>>> > 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
>>>
>>
>>
>> --
>> Andy Chen
>> Sr. Telephony Lead Engineer
>> 415 516 5535 (M)
>> achen@ fuze.com
>>
>>
>
> --
> Andy Chen
> Sr. Telephony Lead Engineer
> 415

Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Andrew Chen
Thanks Daniel.  Let me look at that option.

On Fri, Sep 11, 2020 at 3:52 PM Daniel-Constantin Mierla 
wrote:

> Related to tainted kernel, I faced the same issue when I deployed
> rtpengine on a Suse Enterprise many months ago, so I do not really remember
> the exact steps, but there is a way to disable the check of signed kernel
> modules (iirc, these are only the ones coming from the kernel source tree,
> so if you need to load any external kernel module, you have to disable this
> option).
>
> Quick check on the net, it may have to do with module.sig_enforce option
> for kernel loading.
>
> Cheers,
> Daniel
> On 11.09.20 21:31, Andrew Chen wrote:
>
> Sorry let me clarify this line here:
>
> "...at the time, I was running an older version 8.0.x so I recompiled all
> the ngcp packages under this kernel and completed the installation without
> issues.."
>
> 8.0.x is the older ngcp version. I recompiled version 9.0.1.0 under that
> new kernel version 5.3.0-1035-aws #37-Ubuntu
>
>
> On Fri, Sep 11, 2020 at 3:29 PM Andrew Chen  wrote:
>
>> Thanks Alex.
>>
>> So it turns out my rtpengine stopped working after our latest kernel
>> upgrade to:
>>
>> Linux sjomainrtpe30 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6 01:17:09 UTC
>> 2020 x86_64 x86_64 x86_64 GNU/Linux
>>
>> at the time, I was running an older version 8.0.x so I recompiled all the
>> ngcp packages under this kernel and completed the installation without
>> issues.
>>
>> As soon as we started making test calls, I received 0 audio from those
>> test endpoints.  Looking at the rtpengine logs, I see several messages
>> that's quite concerning:
>>
>> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434623] xt_RTPENGINE:
>> loading out-of-tree module taints kernel.
>> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434670] xt_RTPENGINE: module
>> verification failed: signature and/or required key missing - tainting kernel
>> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434938] Registering
>> xt_RTPENGINE module - version 9.0.1.0+0~mr9.0.1.0
>>
>> and
>>
>> Sep 11 18:49:50 sjomainrtpe30 rtpengine[1030]: WARNING: 
>> [2-7859@2600:1f1c:4ff:3e01:f64d:2f67:c0fa:c931
>> port 5]: No support for kernel packet forwarding available (decryption
>> cipher or HMAC not supported by kernel module)
>>
>> which I assume is due to the first error I pasted.
>>
>> So I tried
>>
>> - rebooting the system which maybe the module wasn't loaded properly.
>> - I reran modprobe to make sure the module is installed
>> - I ran some dkms command to see if any error pop up due to the kernel
>> version I'm running and I see no errors:
>>
>> dkms status
>> falco, 0.20.0+d77080a, 5.3.0-1032-aws, x86_64: installed
>> falco, 0.20.0+d77080a, 5.3.0-1035-aws, x86_64: installed
>> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1032-aws, x86_64: installed
>> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1035-aws, x86_64: installed
>>
>> So I'm running out of options.
>>
>> Any advice?
>>
>>
>> On Fri, Sep 11, 2020 at 3:17 PM Alex Balashov 
>> wrote:
>>
>>> There is an RTPEngine mailing list, I believe, but RTPEngine questions
>>> are often posed here given its close association with Kamailio. What's
>>> going on?
>>>
>>> On 9/11/20 2:57 PM, Andrew Chen wrote:
>>> > Hey guys,
>>> >
>>> > Is this the right place to ask about rtpengine (ngcp) related issues
>>> > with kernel packet forwarding?
>>> >
>>> > Thanks.
>>> >
>>> > --
>>> > Andy Chen
>>> > Sr. Telephony Lead Engineer
>>> > achen@ fuze.com 
>>> >
>>> >
>>> >
>>> > *Confidentiality Notice: The information contained in this e-mail and
>>> any
>>> > attachments may be confidential. If you are not an intended recipient,
>>> you
>>> > are hereby notified that any dissemination, distribution or copying of
>>> this
>>> > e-mail is strictly prohibited. If you have received this e-mail in
>>> error,
>>> > please notify the sender and permanently delete the e-mail and any
>>> > attachments immediately. You should not retain, copy or use this
>>> e-mail or
>>> > any attachment for any purpose, nor disclose all or any part of the
>>> > contents to any other person. Thank you.*
>>> >
>>> > ___
>>> > 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
>>>
>>
>>
>> --
>> Andy Chen
>> Sr. Telephony Lead Engineer
>> 415 516 5535 (M)
>> achen@ fuze.com
>>
>>
>
> --
> Andy Chen
> Sr. Telephony Lead Engineer
> 415 516 5535 (M)
> achen@ fuze.com
>
>
> *Confidentiality Notice: The information contained in this e-mail and

Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Andrew Chen
Sorry let me clarify this line here:

"...at the time, I was running an older version 8.0.x so I recompiled all
the ngcp packages under this kernel and completed the installation without
issues.."

8.0.x is the older ngcp version. I recompiled version 9.0.1.0 under that
new kernel version 5.3.0-1035-aws #37-Ubuntu


On Fri, Sep 11, 2020 at 3:29 PM Andrew Chen  wrote:

> Thanks Alex.
>
> So it turns out my rtpengine stopped working after our latest kernel
> upgrade to:
>
> Linux sjomainrtpe30 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6 01:17:09 UTC
> 2020 x86_64 x86_64 x86_64 GNU/Linux
>
> at the time, I was running an older version 8.0.x so I recompiled all the
> ngcp packages under this kernel and completed the installation without
> issues.
>
> As soon as we started making test calls, I received 0 audio from those
> test endpoints.  Looking at the rtpengine logs, I see several messages
> that's quite concerning:
>
> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434623] xt_RTPENGINE: loading
> out-of-tree module taints kernel.
> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434670] xt_RTPENGINE: module
> verification failed: signature and/or required key missing - tainting kernel
> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434938] Registering
> xt_RTPENGINE module - version 9.0.1.0+0~mr9.0.1.0
>
> and
>
> Sep 11 18:49:50 sjomainrtpe30 rtpengine[1030]: WARNING: 
> [2-7859@2600:1f1c:4ff:3e01:f64d:2f67:c0fa:c931
> port 5]: No support for kernel packet forwarding available (decryption
> cipher or HMAC not supported by kernel module)
>
> which I assume is due to the first error I pasted.
>
> So I tried
>
> - rebooting the system which maybe the module wasn't loaded properly.
> - I reran modprobe to make sure the module is installed
> - I ran some dkms command to see if any error pop up due to the kernel
> version I'm running and I see no errors:
>
> dkms status
> falco, 0.20.0+d77080a, 5.3.0-1032-aws, x86_64: installed
> falco, 0.20.0+d77080a, 5.3.0-1035-aws, x86_64: installed
> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1032-aws, x86_64: installed
> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1035-aws, x86_64: installed
>
> So I'm running out of options.
>
> Any advice?
>
>
> On Fri, Sep 11, 2020 at 3:17 PM Alex Balashov 
> wrote:
>
>> There is an RTPEngine mailing list, I believe, but RTPEngine questions
>> are often posed here given its close association with Kamailio. What's
>> going on?
>>
>> On 9/11/20 2:57 PM, Andrew Chen wrote:
>> > Hey guys,
>> >
>> > Is this the right place to ask about rtpengine (ngcp) related issues
>> > with kernel packet forwarding?
>> >
>> > Thanks.
>> >
>> > --
>> > Andy Chen
>> > Sr. Telephony Lead Engineer
>> > achen@ fuze.com 
>> >
>> >
>> >
>> > *Confidentiality Notice: The information contained in this e-mail and
>> any
>> > attachments may be confidential. If you are not an intended recipient,
>> you
>> > are hereby notified that any dissemination, distribution or copying of
>> this
>> > e-mail is strictly prohibited. If you have received this e-mail in
>> error,
>> > please notify the sender and permanently delete the e-mail and any
>> > attachments immediately. You should not retain, copy or use this e-mail
>> or
>> > any attachment for any purpose, nor disclose all or any part of the
>> > contents to any other person. Thank you.*
>> >
>> > ___
>> > 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
>>
>
>
> --
> Andy Chen
> Sr. Telephony Lead Engineer
> 415 516 5535 (M)
> achen@ fuze.com
>
>

-- 
Andy Chen
Sr. Telephony Lead Engineer
415 516 5535 (M)
achen@ fuze.com

-- 
*Confidentiality Notice: The information contained in this e-mail and any

attachments may be confidential. If you are not an intended recipient, you

are hereby notified that any dissemination, distribution or copying of this

e-mail is strictly prohibited. If you have received this e-mail in error,

please notify the sender and permanently delete the e-mail and any

attachments immediately. You should not retain, copy or use this e-mail or

any attachment for any purpose, nor disclose all or any part of the

contents to any other person. Thank you.*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Andrew Chen
Thanks Alex.

So it turns out my rtpengine stopped working after our latest kernel
upgrade to:

Linux sjomainrtpe30 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6 01:17:09 UTC
2020 x86_64 x86_64 x86_64 GNU/Linux

at the time, I was running an older version 8.0.x so I recompiled all the
ngcp packages under this kernel and completed the installation without
issues.

As soon as we started making test calls, I received 0 audio from those test
endpoints.  Looking at the rtpengine logs, I see several messages that's
quite concerning:

Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434623] xt_RTPENGINE: loading
out-of-tree module taints kernel.
Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434670] xt_RTPENGINE: module
verification failed: signature and/or required key missing - tainting kernel
Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434938] Registering
xt_RTPENGINE module - version 9.0.1.0+0~mr9.0.1.0

and

Sep 11 18:49:50 sjomainrtpe30 rtpengine[1030]: WARNING:
[2-7859@2600:1f1c:4ff:3e01:f64d:2f67:c0fa:c931
port 5]: No support for kernel packet forwarding available (decryption
cipher or HMAC not supported by kernel module)

which I assume is due to the first error I pasted.

So I tried

- rebooting the system which maybe the module wasn't loaded properly.
- I reran modprobe to make sure the module is installed
- I ran some dkms command to see if any error pop up due to the kernel
version I'm running and I see no errors:

dkms status
falco, 0.20.0+d77080a, 5.3.0-1032-aws, x86_64: installed
falco, 0.20.0+d77080a, 5.3.0-1035-aws, x86_64: installed
ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1032-aws, x86_64: installed
ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1035-aws, x86_64: installed

So I'm running out of options.

Any advice?


On Fri, Sep 11, 2020 at 3:17 PM Alex Balashov 
wrote:

> There is an RTPEngine mailing list, I believe, but RTPEngine questions
> are often posed here given its close association with Kamailio. What's
> going on?
>
> On 9/11/20 2:57 PM, Andrew Chen wrote:
> > Hey guys,
> >
> > Is this the right place to ask about rtpengine (ngcp) related issues
> > with kernel packet forwarding?
> >
> > Thanks.
> >
> > --
> > Andy Chen
> > Sr. Telephony Lead Engineer
> > achen@ fuze.com 
> >
> >
> >
> > *Confidentiality Notice: The information contained in this e-mail and any
> > attachments may be confidential. If you are not an intended recipient,
> you
> > are hereby notified that any dissemination, distribution or copying of
> this
> > e-mail is strictly prohibited. If you have received this e-mail in error,
> > please notify the sender and permanently delete the e-mail and any
> > attachments immediately. You should not retain, copy or use this e-mail
> or
> > any attachment for any purpose, nor disclose all or any part of the
> > contents to any other person. Thank you.*
> >
> > ___
> > 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
>


-- 
Andy Chen
Sr. Telephony Lead Engineer
415 516 5535 (M)
achen@ fuze.com

-- 
*Confidentiality Notice: The information contained in this e-mail and any

attachments may be confidential. If you are not an intended recipient, you

are hereby notified that any dissemination, distribution or copying of this

e-mail is strictly prohibited. If you have received this e-mail in error,

please notify the sender and permanently delete the e-mail and any

attachments immediately. You should not retain, copy or use this e-mail or

any attachment for any purpose, nor disclose all or any part of the

contents to any other person. Thank you.*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] RTPENGINE question

2020-09-11 Thread Andrew Chen
Hey guys,

Is this the right place to ask about rtpengine (ngcp) related issues with
kernel packet forwarding?

Thanks.

-- 
Andy Chen
Sr. Telephony Lead Engineer
achen@ fuze.com

-- 
*Confidentiality Notice: The information contained in this e-mail and any

attachments may be confidential. If you are not an intended recipient, you

are hereby notified that any dissemination, distribution or copying of this

e-mail is strictly prohibited. If you have received this e-mail in error,

please notify the sender and permanently delete the e-mail and any

attachments immediately. You should not retain, copy or use this e-mail or

any attachment for any purpose, nor disclose all or any part of the

contents to any other person. Thank you.*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread Juha Heinanen
sagar malam writes:

> I have tried ul_rm_contact but it is not working :
> curl POST --data
> '{"jsonrpc":"2.0","method":"ul.rm_contact","params":{"0":"location","1":"
> 30...@x.com
> <30...@jeff.sip.teledge.com>","2":"sip:30001@X.X.X.X:43108;x-nat=yes;pv-ip=10.212.134.167;pb-ip=X.X.X.X;pb-pt=43108;transport=tcp"}}'
> -H "Content-Type: application/json" -X POST 10.50.7.14:5060/RPC2

Second param is AOR (username@domain).  Yours does not look like it.
Use ul.dump to check.

-- Juha

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


Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Daniel-Constantin Mierla
Related to tainted kernel, I faced the same issue when I deployed
rtpengine on a Suse Enterprise many months ago, so I do not really
remember the exact steps, but there is a way to disable the check of
signed kernel modules (iirc, these are only the ones coming from the
kernel source tree, so if you need to load any external kernel module,
you have to disable this option).

Quick check on the net, it may have to do with module.sig_enforce option
for kernel loading.

Cheers,
Daniel

On 11.09.20 21:31, Andrew Chen wrote:
> Sorry let me clarify this line here:
>
> "...at the time, I was running an older version 8.0.x so I recompiled
> all the ngcp packages under this kernel and completed the installation
> without issues.."
>
> 8.0.x is the older ngcp version. I recompiled version 9.0.1.0 under
> that new kernel version 5.3.0-1035-aws #37-Ubuntu
>
>
> On Fri, Sep 11, 2020 at 3:29 PM Andrew Chen  > wrote:
>
> Thanks Alex.
>
> So it turns out my rtpengine stopped working after our latest
> kernel upgrade to:
>
> Linux sjomainrtpe30 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6
> 01:17:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
>
> at the time, I was running an older version 8.0.x so I recompiled
> all the ngcp packages under this kernel and completed the
> installation without issues.
>
> As soon as we started making test calls, I received 0 audio from
> those test endpoints.  Looking at the rtpengine logs, I see
> several messages that's quite concerning:
>
> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434623] xt_RTPENGINE:
> loading out-of-tree module taints kernel.
> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434670] xt_RTPENGINE:
> module verification failed: signature and/or required key missing
> - tainting kernel
> Sep 11 18:43:41 sjomainrtpe30 kernel: [   13.434938] Registering
> xt_RTPENGINE module - version 9.0.1.0+0~mr9.0.1.0
>
> and
>
> Sep 11 18:49:50 sjomainrtpe30 rtpengine[1030]: WARNING:
> [2-7859@2600:1f1c:4ff:3e01:f64d:2f67:c0fa:c931 port 5]: No
> support for kernel packet forwarding available (decryption cipher
> or HMAC not supported by kernel module)
>
> which I assume is due to the first error I pasted.
>
> So I tried
>
> - rebooting the system which maybe the module wasn't loaded properly.
> - I reran modprobe to make sure the module is installed
> - I ran some dkms command to see if any error pop up due to the
> kernel version I'm running and I see no errors:
>
> dkms status
> falco, 0.20.0+d77080a, 5.3.0-1032-aws, x86_64: installed
> falco, 0.20.0+d77080a, 5.3.0-1035-aws, x86_64: installed
> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1032-aws, x86_64: installed
> ngcp-rtpengine, 9.0.1.0+0~mr9.0.1.0, 5.3.0-1035-aws, x86_64: installed
>
> So I'm running out of options.
>
> Any advice?
>
>
> On Fri, Sep 11, 2020 at 3:17 PM Alex Balashov
> mailto:abalas...@evaristesys.com>> wrote:
>
> There is an RTPEngine mailing list, I believe, but RTPEngine
> questions
> are often posed here given its close association with
> Kamailio. What's
> going on?
>
> On 9/11/20 2:57 PM, Andrew Chen wrote:
> > Hey guys,
> >
> > Is this the right place to ask about rtpengine (ngcp)
> related issues
> > with kernel packet forwarding?
> >
> > Thanks.
> >
> > --
> > Andy Chen
> > Sr. Telephony Lead Engineer
> > achen@  >fuze.com 
> 
> >
> >
> >
> > *Confidentiality Notice: The information contained in this
> e-mail and any
> > attachments may be confidential. If you are not an intended
> recipient, you
> > are hereby notified that any dissemination, distribution or
> copying of this
> > e-mail is strictly prohibited. If you have received this
> e-mail in error,
> > please notify the sender and permanently delete the e-mail
> and any
> > attachments immediately. You should not retain, copy or use
> this e-mail or
> > any attachment for any purpose, nor disclose all or any part
> of the
> > contents to any other person. Thank you.*
> >
> > ___
> > 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/
>
> 

Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Richard Fuchs

On 11/09/2020 15.29, Andrew Chen wrote:

Thanks Alex.

So it turns out my rtpengine stopped working after our latest kernel 
upgrade to:


Linux sjomainrtpe30 5.3.0-1035-aws #37-Ubuntu SMP Sun Sep 6 01:17:09 
UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


at the time, I was running an older version 8.0.x so I recompiled all 
the ngcp packages under this kernel and completed the installation 
without issues.


As soon as we started making test calls, I received 0 audio from those 
test endpoints.  Looking at the rtpengine logs, I see several messages 
that's quite concerning:


Sep 11 18:43:41 sjomainrtpe30 kernel: [  13.434623] xt_RTPENGINE: 
loading out-of-tree module taints kernel.
Sep 11 18:43:41 sjomainrtpe30 kernel: [  13.434670] xt_RTPENGINE: 
module verification failed: signature and/or required key missing - 
tainting kernel
Sep 11 18:43:41 sjomainrtpe30 kernel: [  13.434938] Registering 
xt_RTPENGINE module - version 9.0.1.0+0~mr9.0.1.0


and

Sep 11 18:49:50 sjomainrtpe30 rtpengine[1030]: WARNING: 
[2-7859@2600:1f1c:4ff:3e01:f64d:2f67:c0fa:c931 port 5]: No support 
for kernel packet forwarding available (decryption cipher or HMAC not 
supported by kernel module)


We don't actually have any crypto suites in the code which aren't also 
supported by the kernel module, so there's something else going on. Even 
with this error popping, forwarding should fall back to userspace mode 
and you should have audio. There's probably some other messages in the 
log which point to the real underlying cause, possibly some SRTP-related 
negotiation issues (DTLS?)


Cheers


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


Re: [SR-Users] RTPENGINE question

2020-09-11 Thread Alex Balashov
There is an RTPEngine mailing list, I believe, but RTPEngine questions 
are often posed here given its close association with Kamailio. What's 
going on?


On 9/11/20 2:57 PM, Andrew Chen wrote:

Hey guys,

Is this the right place to ask about rtpengine (ngcp) related issues 
with kernel packet forwarding?


Thanks.

--
Andy Chen
Sr. Telephony Lead Engineer
achen@ fuze.com 



*Confidentiality Notice: The information contained in this e-mail and any
attachments may be confidential. If you are not an intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
e-mail is strictly prohibited. If you have received this e-mail in error,
please notify the sender and permanently delete the e-mail and any
attachments immediately. You should not retain, copy or use this e-mail or
any attachment for any purpose, nor disclose all or any part of the
contents to any other person. Thank you.*

___
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


[SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread Juha Heinanen
sagar malam writes:

> I am using the usrloc module to store registrations. I could not find any
> way to remove stale registrations before expires time. Most of the
> registrations are mobile app so they wont run in background to save battery
> of phone hence we end up having lots of registrations in usrloc which were
> not removed because app was killed in background by OS without letting it
> send unregister request.

There are apps (e.g. baresip) that run as foreground service to avoid
being killed and that don't consume lots of battery.

> Is there any way to remove stale registrations before expires time from
> usrloc ?

There is ul.rm_contact rpc command.

-- Juha

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


Re: [SR-Users] xlog print sdp parameters

2020-09-11 Thread Angel Elena
Ok, thanks for the info.










Ángel Elena Medina   _o)
cr...@craem.net  / \\
http://diablo.craem.net  _(___V
@craem_
www.linkedin.com/in/angel-elena-medina

Kopano Webapp.





-Original message-
From: Henning Westerholt 
Sent: Friday 11th September 2020 14:03
To: Kamailio (SER) - Users Mailing List 
Cc: Angel Elena 
Subject: RE: [SR-Users] xlog print sdp parameters

Hello,

 
you can use e.g. 
https://www.kamailio.org/docs/modules/stable/modules/sdpops.html#idm239to print 
in all xlog. Have a look to the other functions to get access to certain lines.

 
Cheers,

 
Henning

 
--

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

Kamailio services –https://gilawa.com 

 
From: sr-users  On Behalf Of Angel Elena
Sent: Friday, September 11, 2020 1:36 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] xlog print sdp parameters

 
 
Hi, good moorning.

I have a Kamailio 4.4.7 in a debian box and I need print with xlog (if is 
possible) the o,c and m values from SDP headers.

Is possible make a xlog() print this parameters with sdpops module or another ?

Thanks





Ángel Elena Medina   _o)
cr...@craem.net    / \\
http://diablo.craem.net    _(___V
@craem_
www.linkedin.com/in/angel-elena-medina 
 

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


Re: [SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread David Villasmil
Why not just expire them quickly?

On Fri, 11 Sep 2020 at 17:25, sagar malam  wrote:

> Hello Juha,
>
> baresip app is interesting. I will look at it.
>
> I have tried ul_rm_contact but it is not working :
> curl POST --data
> '{"jsonrpc":"2.0","method":"ul.rm_contact","params":{"0":"location","1":"
> 30...@x.com 
> <30...@jeff.sip.teledge.com>","2":"sip:30001@X.X.X.X:43108;x-nat=yes;pv-ip=10.212.134.167;pb-ip=X.X.X.X;pb-pt=43108;transport=tcp"}}'
> -H "Content-Type: application/json" -X POST 10.50.7.14:5060/RPC2
>
> It is throwing error :
> {
>"jsonrpc":  "2.0",
>"error":{
>"code": 404,
>"message":  "Contact not found"
>}
>
>
> On Fri, Sep 11, 2020 at 8:03 PM Juha Heinanen  wrote:
>
>> sagar malam writes:
>>
>>
>>
>>
>>
>> > I am using the usrloc module to store registrations. I could not find
>> any
>>
>>
>> > way to remove stale registrations before expires time. Most of the
>>
>>
>> > registrations are mobile app so they wont run in background to save
>> battery
>>
>>
>> > of phone hence we end up having lots of registrations in usrloc which
>> were
>>
>>
>> > not removed because app was killed in background by OS without letting
>> it
>>
>>
>> > send unregister request.
>>
>>
>>
>>
>>
>> There are apps (e.g. baresip) that run as foreground service to avoid
>>
>>
>> being killed and that don't consume lots of battery.
>>
>>
>>
>>
>>
>> > Is there any way to remove stale registrations before expires time from
>>
>>
>> > usrloc ?
>>
>>
>>
>>
>>
>> There is ul.rm_contact rpc command.
>>
>>
>>
>>
>>
>> -- Juha
>>
>>
>>
>>
>>
>> ___
>>
>>
>> Kamailio (SER) - Users Mailing List
>>
>>
>> sr-users@lists.kamailio.org
>>
>>
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>
> --
> Thanks,
>
> Sagar
>
>
> ___
>
> 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


Re: [SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread sagar malam
Hello Juha,

baresip app is interesting. I will look at it.

I have tried ul_rm_contact but it is not working :
curl POST --data
'{"jsonrpc":"2.0","method":"ul.rm_contact","params":{"0":"location","1":"
30...@x.com
<30...@jeff.sip.teledge.com>","2":"sip:30001@X.X.X.X:43108;x-nat=yes;pv-ip=10.212.134.167;pb-ip=X.X.X.X;pb-pt=43108;transport=tcp"}}'
-H "Content-Type: application/json" -X POST 10.50.7.14:5060/RPC2

It is throwing error :
{
   "jsonrpc":  "2.0",
   "error":{
   "code": 404,
   "message":  "Contact not found"
   }


On Fri, Sep 11, 2020 at 8:03 PM Juha Heinanen  wrote:

> sagar malam writes:
>
> > I am using the usrloc module to store registrations. I could not find any
> > way to remove stale registrations before expires time. Most of the
> > registrations are mobile app so they wont run in background to save
> battery
> > of phone hence we end up having lots of registrations in usrloc which
> were
> > not removed because app was killed in background by OS without letting it
> > send unregister request.
>
> There are apps (e.g. baresip) that run as foreground service to avoid
> being killed and that don't consume lots of battery.
>
> > Is there any way to remove stale registrations before expires time from
> > usrloc ?
>
> There is ul.rm_contact rpc command.
>
> -- Juha
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Thanks,

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


Re: [SR-Users] sngrep nor tcpdump showing 5060 traffic but ngrep /kama logs show something ? (outbound call)

2020-09-11 Thread Johnny Ritzer
Thanks.

That helps a lot.

From: Daniel-Constantin Mierla 
Date: Thursday, September 10, 2020 at 10:38 PM
To: Kamailio (SER) - Users Mailing List , Johnny 
Ritzer 
Subject: Re: [SR-Users] sngrep nor tcpdump showing 5060 traffic but ngrep /kama 
logs show something ? (outbound call)

Hello,

wss is not usually on port 5060, it can be on port 5061 (if you haven't 
configured another tls socket specially for wss traffic). Anyhow, wss traffic 
is encrypted, so sngrep will not match it as sip traffic.

If you want to see locally the wss sip traffic, load sipdump module, it will 
write in text files (the version in master can save the traffic in pcap files 
as well, although it will appear as being udp traffic, because it was simpler 
to build the pcap headers, however you can sport from the headers/ports what 
was the trasport layer, or enable to add the extra meta-data sip header).

If you already have homer, then you should see the wss encrypted traffic there.

Cheers,
Daniel
On 11.09.20 01:41, Johnny Ritzer wrote:
H seeing that port 127.0.0.1….9060  looks like to capture and forward  to 
homer (I know I installed it at one time to try to some triage).

Maybe homer built for additional checks.
I just disabled the module hosting that port and I no longer see it in ngrep.

 my path  issue is  wss://  webrtc over to  uac.reg and FW it  off  to  PBX. So 
ill try  and  figure out where  in kama.cfg to hopefully get  it to fw to pbx  
and make call.


From: Johnny Ritzer 
Date: Thursday, September 10, 2020 at 4:32 PM
To: Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] sngrep nor tcpdump showing 5060 traffic but ngrep /kama 
logs show something ? (outbound call)
Ya I have other  scenarios  that show  up  like  inbound call.

So I did this (made a test call)  and saved output ngrep to pcap.

And open in wireshark  and I see it as protocol  UDP  with SIP enclosed  in data

ngrep -d any -qt -W byline port 5060 -O test.pcap

heres ngrep
 2020/09/10 23:19:51.109093 10.111.0.4:5060 -> 127.0.0.1:9060 #1
...[F...
...INVITE sip:8...@24.xx.xx.xx SIP/2.0.
Via: SIP/2.0/WSS 4d8asfsdfag3f.invalid;branch=z9hG4bK2797686.
Max-Forwards: 70.
To: .
From: "Ctx-WEBSIP-1138" 
;tag=jd85ifa0f2.
Call-ID: 9pujji6vasdfasfrbn2.
CSeq: 906 INVITE.
Contact: 
.
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER.
Supported: gruu, outbound.
User-Agent: SIP.js/0.7.8.
Content-Type: application/sdp.
Content-Length: 2047.


From: sr-users 

Date: Thursday, September 10, 2020 at 4:19 PM
To: Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] sngrep nor tcpdump showing 5060 traffic but ngrep /kama 
logs show something ? (outbound call)
You sure you’re using 5060 on kamailio?

On Fri, 11 Sep 2020 at 00:04, Johnny Ritzer 
mailto:sudor...@gmail.com>> wrote:















No…  or not that I know of



This is a  temp GCP (as im building a POC to get this to a working concept.) 
trying to fine-tune config




From:

sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>


Date: Thursday, September 10, 2020 at 3:33 PM


To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>


Subject: Re: [SR-Users] sngrep nor tcpdump showing 5060 traffic but ngrep /kama 
logs show something ? (outbound call)



Are you using vlans? In the past I had issues with ngrep if the packets had 
vlan tags on them.










On Thu, Sep 10, 2020 at 6:10 PM Johnny Ritzer 
mailto:sudor...@gmail.com>> wrote:





I can see kama logs./ngrep when I try to call out (WSS -> ) . But I cant see 
anything in sngrep nor tcpdump.




“ngrep -d any -qt -W byline port 5060”



Im not sure how/why or  it could be something simple but what puzzles me is I 
know im sending data but its not captured.

Setup is pbx at 24.xx.xx.xx but ext is uac.reg to stay connected.

UA client  = sip.js / wss


Inbound works(but  1 way  audio ill fix after outbound issue)

Outbound doesn’t dial out  (UA = webRTC client) using wss. Which led  me to 
troubleshoot  via  sngrep/tcpdump.



But I seet his when  it happens knowing I ame getting  something  sent.

Sep 10 21:48:36 kamaProx /usr/sbin/kamailio[27480]: WARNING: 

Re: [SR-Users] Getting memory error on kamailio v5.1.2 tm:Free fragment not found!

2020-09-11 Thread M Arqum CH
Hello Denial ,

thank you for your reply ,  i  will work on update to 5.1.10, for time
being  i  increase the  -M to 256.

Thanks

On Wed, Sep 9, 2020 at 12:43 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> the 5.1.2 is old, unmaintained at this moment, but you should always run
> the latest version in a series to be sure you are not affected by bugs
> fixed already. For example, in this case you are in 5.1.x series, so you
> should run 5.1.10. But it is better to upgrade to a maintained series, like
> 5.3 or 5.4.
>
> Back to 5.1.x, after upgrading to 5.1.10, you can also set mem_join=1 in
> the config file, that can help in such situations, provided that to
> allocated enough shared memory for the traffic you are handling. In newer
> release series of kamailio mem_join is 1 by default, but not in 5.1.x.
>
> Cheers,
> Daniel
> On 08.09.20 23:06, egemen ulus wrote:
>
> Hi,
>
> You can check statistics of shared memory on Kamailio. In this way, you
> can decide whether you need to increase your shmem or not..
>
> Type "kamctl stats shmem" on cli of Kamailio server and share the output..
>
> Regards
> Egemen U.
>
> Get Outlook for Android 
> --
> *From:* sr-users 
>  on behalf of M Arqum CH
>  
> *Sent:* Tuesday, September 8, 2020 11:53:18 PM
> *To:* sr-users@lists.kamailio.org 
> 
> *Subject:* [SR-Users] Getting memory error on kamailio v5.1.2 tm:Free
> fragment not found!
>
> Hello Users,
>
>  I am facing memory-related error on my Kamailio  server, using  this
> kamailio version
> kamailio -v
> version: kamailio 5.1.2 (x86_64/linux)
> with -m 512 -M 32
> childern=16
>
> System Memory : 24 GB
> System Cores: 12
>
> On console getting the following error :
>
> Sep 08 14:40:29 debian /usr/sbin/kamailio[99894]: ERROR: 
> [core/mem/q_malloc.c:286]: qm_find_free(): qm_find_free(0x7fdf51eb9000,
> 11320); Free fragment not found!
> Sep 08 14:40:29 debian /usr/sbin/kamailio[99894]: ERROR: 
> [core/mem/q_malloc.c:419]: qm_malloc(): qm_malloc(0x7fdf51eb9000, 11320)
> called from tm: h_table.c: build_cell(320), module: tm; Free fragment not
> found!
> Sep 08 14:40:29 debian /usr/sbin/kamailio[99894]: ERROR: tm
> [t_lookup.c:1279]: new_t(): out of mem:
> Sep 08 14:40:29 debian /usr/sbin/kamailio[99894]: ERROR: tm
> [t_lookup.c:1422]: t_newtran(): new_t failed
> Sep 08 14:40:29 debian /usr/sbin/kamailio[99894]: ERROR: sl
> [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: No error
> (2/SL)
>
> Please guide about the possible reason of failure or its memory leakage,
> possible solution.
>
> Thanks
> --
> Regards
> M Arqum
>
> ___
> 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
>


-- 
Regards
M Arqum
___
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 handle BYE in case of serial fork

2020-09-11 Thread Björn Klasen

Hi Henning,

i think I've got a solution for this. I just make a check 
is_known_dialog. If not i reply with 481


I'm just testing, but it seem to work. The carrier is not sending 
retransmission of the BYE and the call seems to be stable.


By the way, the carrier is Telekom so discussions about standard is 
worthless here ;)


BR,
Björn

Am 11.09.20 um 16:00 schrieb Henning Westerholt:

Hello Björn,

1) about the signalisation
The different 180 responses establishing different early dialogs, each with its 
own to-tag, as required from the standard. The 200 OK for the winning branch 
will then initialize the dialog. The BYE to this dialog should include the 
winning branch to-tag (in your case the TT2). Your carrier sends also a BYE to 
the early dialog, which is not recommend from the standard, but it is not 
forbidden.

2) about Kamailio routing
I am not sure what you mean with "Kamailio cannot find the to-tag in memory". 
The method has_totag() is just checking for the existence of an to-tag in the message, 
without any memory storage involved.

The warning about the tight dialog matching failed is just a warning, if you do 
not use the dialog module for routing decision it should not cause these 
problems.

Your Kamailio should forward the BYE according to the Route header (if there is 
one) or the request-URI. In your example message below, this would be to the 
sems server.

If you want to implement some other logic, you can use e.g. the htable module 
to store information about call branches for some time and then expire it later 
on.

Cheers,

Henning


--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP)
Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg,
Sven Schade, Carsten Tolkmit, Dr. Sven Willert
Tax-Id (Steuernr.): 2029047020, VAT-Id (USt-Id): DE225201428


___
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 handle BYE in case of serial fork

2020-09-11 Thread Henning Westerholt
Hello Björn,

1) about the signalisation
The different 180 responses establishing different early dialogs, each with its 
own to-tag, as required from the standard. The 200 OK for the winning branch 
will then initialize the dialog. The BYE to this dialog should include the 
winning branch to-tag (in your case the TT2). Your carrier sends also a BYE to 
the early dialog, which is not recommend from the standard, but it is not 
forbidden.

2) about Kamailio routing
I am not sure what you mean with "Kamailio cannot find the to-tag in memory". 
The method has_totag() is just checking for the existence of an to-tag in the 
message, without any memory storage involved.

The warning about the tight dialog matching failed is just a warning, if you do 
not use the dialog module for routing decision it should not cause these 
problems.

Your Kamailio should forward the BYE according to the Route header (if there is 
one) or the request-URI. In your example message below, this would be to the 
sems server.

If you want to implement some other logic, you can use e.g. the htable module 
to store information about call branches for some time and then expire it later 
on.

Cheers,

Henning

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

-Original Message-
From: sr-users  On Behalf Of Björn Klasen
Sent: Friday, September 11, 2020 2:12 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] How to handle BYE in case of serial fork

Hi Hennning,

loose_route() is what we are using.

But we use also dialog module for call counting etc.

We did not really change the default config.

This is the snippet in our config.

     if (has_totag()) {
     # sequential requests within a dialog should
     # take the path determined by record-routing
     if (loose_route()) {
     if (is_method("BYE")) {

     t_on_reply("bye_reason");
     setflag(FLT_ACC); # ... even if the 
transaction fails

But I think that is not the point.

The responses 18x responses are my real problem, because they have the same did 
in record-route but different to-tags because of the call forwarding scenario.

That leads to the BYE of the first fork. With this BYE they try to stop the 
call with the first to-tag. But the first fork ist already canceld. 
So Kamailio behaves correctly by not answering or forwarding anythin, but 
throwing a warning with tight dialog matching not possible.

Thats because at that point Kamailio does only know about the call with the 
second. So when the BYE is received by Kamailio the dialog modules can find the 
did but not the to-tog as Kamailio only has the second one left in memory.

Now the point is, is there a way to hold the first early dialog fork in memory 
until it is either terminatet with a CANCEL or BYE or the last fork with the 
corresponding did is terminatet.

I have read that ims_dialog or dialog_ng in our can handle things like this, 
but I also can't get it to work. By the way cdr generation does also not work 
with dialog_ng or ims_dialog (i also made tests with kamailio 5.3.5).

This is the problematic BYE Message (i deleted customer relatet infomations)

BYE sip:bob@kamailio:5060 SIP/2.0
Via: SIP/2.0/UDP carrier:5060;branch=z9hG4bKh6e7ie103g9amkc8gdo0.1
Max-Forwards: 65
To: ;tag=11A2CF0C-5F578E7E000376B5-AA5BD700
From: ;tag=h7g4Esbg_h7g4Esbg_c5478d8b
Call-ID: ae36c13c31b5e910@a.b.c.d
CSeq: 1313626 BYE
Privacy: user;id
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, OPTIONS, PRACK, PUBLISH, 
REGISTER, SUBSCRIBE, UPDATE
Route: 

Route: 


This one matches to the 180 of the call to callee b

SIP/2.0 180 Ringing
Record-Route: 

Record-Route: 

Via: SIP/2.0/UDP bob@kamailiko:5060;branch=z9hG4bK1s9rar309o1uf6j41ik0.1
Call-ID: ae36c13c31b5e910@a.b.c.d
CSeq: 1313625 INVITE
To: ;tag=11A2CF0C-5F578E7E000376B5-AA5BD700
From: ;tag=h7g4Esbg_h7g4Esbg_c5478d8b
Content-Length: 0
Contact: 

I hope you can understand my problem a little better now.

BR
Björn

Am 11.09.20 um 12:26 schrieb Henning Westerholt:
> Hello Björn,
>
> I was not referring to dialog stateful routing e.g. with dialog module. I was 
> referring to the loose_route() function in your kamailio.cfg (e.g. compare to 
> the default cfg in github).
>
> Maybe you can quote the problematic BYE SIP message here.
>
> Cheers,
>
> Henning
>
--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP) Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg, Sven Schade, 
Carsten Tolkmit, Dr. Sven Willert Tax-Id (Steuernr.): 2029047020, VAT-Id 
(USt-Id): DE225201428


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.ka

Re: [SR-Users] How to check which memory allocator kamailio is using ?

2020-09-11 Thread Henning Westerholt
Hi Sagar,

yes, if you don’t specify one in the cmd line, as mentioned.

Cheers,

Henning

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

From: sagar malam 
Sent: Friday, September 11, 2020 2:25 PM
To: Henning Westerholt 
Cc: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] How to check which memory allocator kamailio is using ?

Hello Henning,

It shows all the 3 types of allocators. Does that mean that default(q_malloc) 
one is used ?
[root@SBC-4-2 ~]# kamailio -I

Print out of kamailio internals
 Version: kamailio 5.4.0 (x86_64/linux) 6c4fce
 Default config: /usr/local/etc/kamailio/kamailio.cfg
 Default paths to modules: /usr/local/lib64/kamailio/modules
 Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC
, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, 
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
 MAX_RECV_BUFFER_SIZE=262144
 MAX_URI_SIZE=1024
 BUF_SIZE=65535
 DEFAULT PKG_SIZE=8MB
 DEFAULT SHM_SIZE=64MB
 ADAPTIVE_WAIT_LOOPS=1024
 TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select
 Source code revision ID: 6c4fce
 Compiled with: gcc 4.8.5
 Compiled architecture: x86_64
 Compiled on: 11:47:52 Sep  1 2020
Thank you for flying kamailio!


On Thu, Sep 10, 2020 at 9:03 PM Henning Westerholt 
mailto:h...@skalatan.de>> wrote:
Hello,

Try to execute “kamailio -I” to get some information about the internal 
compiled variants.

If you don’t specify it on the command line it is since 2016 the qmalloc one, 
to help debugging memory problems. Before that it was the fmalloc.

Cheers,

Henning

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

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of sagar malam
Sent: Wednesday, September 9, 2020 11:09 AM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] How to check which memory allocator kamailio is using ?

Hello ,

Is there any way to check if the memory allocator is used by kamailio ? 
qmalloc,fmalloc or tlsf.


--
Thanks,

Sagar


--
Thanks,

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


[SR-Users] Ynt: Kamailio drop calls with Teams

2020-09-11 Thread egemen ulus
Hi,

I am not sure what you exactly try to achieve, but for the record-route 
parameter, I can provide two options for you.

If you are not satisfied with the second record-route, you might remove 
(remove_hf();) "Record-Route" header before adding a new one via 
'record_route_preset'.
But I think it is like a workaround solution, for better way you can check 
whether you used "record_route();" or not before/after using 
''record_route_preset''

Regards
Egemen U.

Gönderen: sip user  adına sr-users 

Gönderildi: 11 Eylül 2020 Cuma 14:25
Kime: Kamailio (SER) - Users Mailing List 
Konu: Re: [SR-Users] Kamailio drop calls with Teams

Any idea? Can i change that second récord router?

Thanks

El lun., 7 sept. 2020 8:42, sip user 
mailto:sipuser...@gmail.com>> escribió:
Hi  I've tried to add record_route_preset( 
"yourdomain.com:5061;transport=tls", "your_ip:5060" ) in incoming calls, call, 
from Teams to Asterisk, and with sipdump I see that:

INVITE:

tag: snd
pid: 15506
process: 10
time: 1599460531.198988
date: Mon Sep  7 06:35:31 2020
proto: udp ipv4
srcip: FQDN IP
srcport: 5060
dstip: IP ASTERISK
dstport: 18060

INVITE sip:s@IP ASTERISK:18060 SIP/2.0
Record-Route: 
Record-Route: 
FROM: 
AdminTeams;tag=295acf4c5acf4a3c8ae8f64dce4a9a05
TO: 
CSEQ: 1 INVITE
CALL-ID: 901952e5fbc15d8ca107fd3c6e8f2edc
MAX-FORWARDS: 69
Via: SIP/2.0/UDP FQDN 
IP;branch=z9hG4bK4108.41910a703c892d309f8aaa6eee303e1c.0;i=1
VIA: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKab9565a8
RECORD-ROUTE: 
CONTACT: 

CONTENT-LENGTH: 1102
MIN-SE: 300
SUPPORTED: timer
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.9.1.3 i.EUWE.0
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
P-ASSERTED-IDENTITY: ,
PRIVACY: id
SESSION-EXPIRES: 3600

200 OK

tag: rcv
pid: 15498
process: 2
time: 1599460531.207751
date: Mon Sep  7 06:35:31 2020
proto: udp ipv4
srcip: IP ASTERISK
srcport: 18060
dstip: FQDN IP
dstport: 5060

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
FQDNIP;branch=z9hG4bK4108.41910a703c892d309f8aaa6eee303e1c.0;i=1;received=92.222.217.64
Via: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKab9565a8
Record-Route: 
Record-Route: 
Record-Route: 
From: 
AdminTeams;tag=295acf4c5acf4a3c8ae8f64dce4a9a05
To: ;tag=as5e107437
Call-ID: 901952e5fbc15d8ca107fd3c6e8f2edc
CSeq: 1 INVITE
Server: Asterisk PBX 11.25.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: 
Content-Type: application/sdp
Require: timer
Content-Length: 345

I rewrite the first record-route in both, INVITE and 200 OK, but the second 
record-route, is the FQDN IP again..
Could be it the problem?

How can I rewrite that record-route?

Thanks

El jue., 3 sept. 2020 a las 13:53, Pepelux 
(mailto:pepel...@gmail.com>>) escribió:
I don't know. Try to write the domain directly and not an alias:

record_route_preset("yourdomain.com:5061;transport=tls", "your_ip:5060");

On Thu, 3 Sep 2020 at 13:38, sip user 
mailto:sipuser...@gmail.com>> wrote:
Yes, this is I do:

record_route();
xlog("L_INFO", "***ROUTE PSTN***");
$rU="1005";

Have I do any more? Why mu record-route is different yours?

Thanks

El jue., 3 sept. 2020 a las 13:27, Pepelux 
(mailto:pepel...@gmail.com>>) escribió:
You have to use record_route_preset when the message is sent from Kamailio to 
Teams

if (from_uri =~ ".*microsoft.com") {
   record_route();
} else {
   record_route_preset("SBC-DNS-DOMAIN:5061;transport=tls", "SBC-IP-ADDR:5060");
}

On Thu, 3 Sep 2020 at 13:13, sip user 
mailto:sipuser...@gmail.com>> wrote:
Thanks Pepelux..

Yes, I follow that post to configure it. But I don´t know where could be the 
problem and change Record-Route, because, in the post say, only I have to 
change it when I call from kamailio to Teams, so outgoing calls, right? With 
record-route-preset... I'm wrong?

Thanks

El jue., 3 sept. 2020 a las 13:07, Pepelux 
(mailto:pepel...@gmail.com>>) escribió:
It looks good but in the capture file I saw FQNDIP in RR and not FQNDDNS

This post by Henning may help you: 
https://skalatan.de/en/blog/kamailio-sbc-teams

And also you can read that:
http://sip-router.1086192.n5.nabble.com/Kamailio-as-SBC-for-Microsoft-Teams-td181493.html

This is a response from my Kamailio to Teams. Maybe it can be useful for you:

tag: snd
pid: 1394
process: 1
time: 1599126436.582012
date: Thu Sep  3 11:47:16 2020
proto: tls ipv4
srcip: SBC-IP-ADDR
srcport: 5061
dstip: 52.114.75.24
dstport: 5061

SIP/2.0 200 OK
Via: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bK8ac0b4eb
Record-Route: 
Record-Route: 
Record-Route: 
From: Pepelux 
;tag=3a6ca98c0a9a46c98ad781c82f389c4d
To: ;tag=as524dd8d6
Call-ID: 99ac64b5ad3455be9fd8c838cbdd4c6c
CSeq: 1 INVITE
Server: Asterisk PBX 16.2.1~dfsg-1+deb10u1
Allow:sINVITE, ACK, CANCEL, OPTIONS, BYE, SUBSCRIBE, NOTIFY, INFO, PUBLISH, 
MESSAGE
Supported: replace

Re: [SR-Users] How to check which memory allocator kamailio is using ?

2020-09-11 Thread sagar malam
Hello Henning,

It shows all the 3 types of allocators. Does that mean that
default(q_malloc) one is used ?
[root@SBC-4-2 ~]# kamailio -I

Print out of kamailio internals
 Version: kamailio 5.4.0 (x86_64/linux) 6c4fce
 Default config: /usr/local/etc/kamailio/kamailio.cfg
 Default paths to modules: /usr/local/lib64/kamailio/modules
 Compile flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC,
*Q_MALLOC, F_MALLOC, TLSF_MALLOC*, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
 MAX_RECV_BUFFER_SIZE=262144
 MAX_URI_SIZE=1024
 BUF_SIZE=65535
 DEFAULT PKG_SIZE=8MB
 DEFAULT SHM_SIZE=64MB
 ADAPTIVE_WAIT_LOOPS=1024
 TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select
 Source code revision ID: 6c4fce
 Compiled with: gcc 4.8.5
 Compiled architecture: x86_64
 Compiled on: 11:47:52 Sep  1 2020
Thank you for flying kamailio!



On Thu, Sep 10, 2020 at 9:03 PM Henning Westerholt  wrote:

> Hello,
>
>
>
> Try to execute “kamailio -I” to get some information about the internal
> compiled variants.
>
>
>
> If you don’t specify it on the command line it is since 2016 the qmalloc
> one, to help debugging memory problems. Before that it was the fmalloc.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *sagar
> malam
> *Sent:* Wednesday, September 9, 2020 11:09 AM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* [SR-Users] How to check which memory allocator kamailio is
> using ?
>
>
>
> Hello ,
>
>
>
> Is there any way to check if the memory allocator is used by kamailio ?
> qmalloc,fmalloc or tlsf.
>
>
>
>
>
> --
>
> Thanks,
>
>
>
> Sagar
>


-- 
Thanks,

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


[SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread sagar malam
Hello ,
I am using the usrloc module to store registrations. I could not find any
way to remove stale registrations before expires time. Most of the
registrations are mobile app so they wont run in background to save battery
of phone hence we end up having lots of registrations in usrloc which were
not removed because app was killed in background by OS without letting it
send unregister request.

Is there any way to remove stale registrations before expires time from
usrloc ?



-- 
Thanks,

Sagar
___
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 handle BYE in case of serial fork

2020-09-11 Thread Björn Klasen

Hi Hennning,

loose_route() is what we are using.

But we use also dialog module for call counting etc.

We did not really change the default config.

This is the snippet in our config.

    if (has_totag()) {
    # sequential requests within a dialog should
    # take the path determined by record-routing
    if (loose_route()) {
    if (is_method("BYE")) {

    t_on_reply("bye_reason");
    setflag(FLT_ACC); # ... even if the 
transaction fails


But I think that is not the point.

The responses 18x responses are my real problem, because they have the 
same did in record-route but different to-tags because of the call 
forwarding scenario.


That leads to the BYE of the first fork. With this BYE they try to stop 
the call with the first to-tag. But the first fork ist already canceld. 
So Kamailio behaves correctly by not answering or forwarding anythin, 
but throwing a warning with tight dialog matching not possible.


Thats because at that point Kamailio does only know about the call with 
the second. So when the BYE is received by Kamailio the dialog modules 
can find the did but not the to-tog as Kamailio only has the second one 
left in memory.


Now the point is, is there a way to hold the first early dialog fork in 
memory until it is either terminatet with a CANCEL or BYE or the last 
fork with the corresponding did is terminatet.


I have read that ims_dialog or dialog_ng in our can handle things like 
this, but I also can't get it to work. By the way cdr generation does 
also not work with dialog_ng or ims_dialog (i also made tests with 
kamailio 5.3.5).


This is the problematic BYE Message (i deleted customer relatet infomations)

BYE sip:bob@kamailio:5060 SIP/2.0
Via: SIP/2.0/UDP carrier:5060;branch=z9hG4bKh6e7ie103g9amkc8gdo0.1
Max-Forwards: 65
To: ;tag=11A2CF0C-5F578E7E000376B5-AA5BD700
From: ;tag=h7g4Esbg_h7g4Esbg_c5478d8b
Call-ID: ae36c13c31b5e910@a.b.c.d
CSeq: 1313626 BYE
Privacy: user;id
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, OPTIONS, PRACK, PUBLISH, 
REGISTER, SUBSCRIBE, UPDATE
Route: 

Route: 



This one matches to the 180 of the call to callee b

SIP/2.0 180 Ringing
Record-Route: 

Record-Route: 


Via: SIP/2.0/UDP bob@kamailiko:5060;branch=z9hG4bK1s9rar309o1uf6j41ik0.1
Call-ID: ae36c13c31b5e910@a.b.c.d
CSeq: 1313625 INVITE
To: ;tag=11A2CF0C-5F578E7E000376B5-AA5BD700
From: ;tag=h7g4Esbg_h7g4Esbg_c5478d8b
Content-Length: 0
Contact: 

I hope you can understand my problem a little better now.

BR
Björn

Am 11.09.20 um 12:26 schrieb Henning Westerholt:

Hello Björn,

I was not referring to dialog stateful routing e.g. with dialog module. I was 
referring to the loose_route() function in your kamailio.cfg (e.g. compare to 
the default cfg in github).

Maybe you can quote the problematic BYE SIP message here.

Cheers,

Henning


--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP)
Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg,
Sven Schade, Carsten Tolkmit, Dr. Sven Willert
Tax-Id (Steuernr.): 2029047020, VAT-Id (USt-Id): DE225201428


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


Re: [SR-Users] xlog print sdp parameters

2020-09-11 Thread Henning Westerholt
Hello,

you can use e.g. 
https://www.kamailio.org/docs/modules/stable/modules/sdpops.html#idm239 to 
print in all xlog. Have a look to the other functions to get access to certain 
lines.

Cheers,

Henning

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

From: sr-users  On Behalf Of Angel Elena
Sent: Friday, September 11, 2020 1:36 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] xlog print sdp parameters



Hi, good moorning.

I have a Kamailio 4.4.7 in a debian box and I need print with xlog (if is 
possible) the o,c and m values from SDP headers.

Is possible make a xlog() print this parameters with sdpops module or another ?

Thanks


Ángel Elena Medina   _o)
cr...@craem.net  / \\
http://diablo.craem.net  _(___V
@craem_
www.linkedin.com/in/angel-elena-medina

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


[SR-Users] xlog print sdp parameters

2020-09-11 Thread Angel Elena
Hi, good moorning.

I have a Kamailio 4.4.7 in a debian box and I need print with xlog (if is 
possible) the o,c and m values from SDP headers.

Is possible make a xlog() print this parameters with sdpops module or another ?

Thanks




Ángel Elena Medina   _o)
cr...@craem.net  / \\
http://diablo.craem.net  _(___V
@craem_
www.linkedin.com/in/angel-elena-medina

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


Re: [SR-Users] Kamailio drop calls with Teams

2020-09-11 Thread sip user
Any idea? Can i change that second récord router?

Thanks

El lun., 7 sept. 2020 8:42, sip user  escribió:

> Hi  I've tried to add record_route_preset( 
> "yourdomain.com:5061;transport=tls",
> "your_ip:5060" ) in incoming calls, call, from Teams to Asterisk, and with
> sipdump I see that:
>
> INVITE:
>
> tag: snd
> pid: 15506
> process: 10
> time: 1599460531.198988
> date: Mon Sep  7 06:35:31 2020
> proto: udp ipv4
> srcip: FQDN IP
> srcport: 5060
> dstip: IP ASTERISK
> dstport: 18060
> 
> INVITE sip:s@IP ASTERISK:18060 SIP/2.0
> Record-Route: 
> Record-Route: 
> FROM: AdminTeams ;user=phone>;tag=295acf4c5acf4a3c8ae8f64dce4a9a05
> TO: 
> CSEQ: 1 INVITE
> CALL-ID: 901952e5fbc15d8ca107fd3c6e8f2edc
> MAX-FORWARDS: 69
> Via: SIP/2.0/UDP FQDN
> IP;branch=z9hG4bK4108.41910a703c892d309f8aaa6eee303e1c.0;i=1
> VIA: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKab9565a8
> RECORD-ROUTE:  ;transport=tls;lr>
> CONTACT:  ;x-i=8ce77537-20fd-43b0-9a49-7c5b7fb7e198;x-c=901952e5fbc15d8ca107fd3c6e8f2edc/d/8/31abc1996a874f5a8133d653d07239f4>
> CONTENT-LENGTH: 1102
> MIN-SE: 300
> SUPPORTED: timer
> USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.9.1.3 i.EUWE.0
> CONTENT-TYPE: application/sdp
> ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
> P-ASSERTED-IDENTITY: ,
> PRIVACY: id
> SESSION-EXPIRES: 3600
>
> 200 OK
>
> tag: rcv
> pid: 15498
> process: 2
> time: 1599460531.207751
> date: Mon Sep  7 06:35:31 2020
> proto: udp ipv4
> srcip: IP ASTERISK
> srcport: 18060
> dstip: FQDN IP
> dstport: 5060
> 
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> FQDNIP;branch=z9hG4bK4108.41910a703c892d309f8aaa6eee303e1c.0;i=1;received=92.222.217.64
> Via: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKab9565a8
> Record-Route: 
> Record-Route: 
> Record-Route:  ;transport=tls;lr>
> From: AdminTeams ;user=phone>;tag=295acf4c5acf4a3c8ae8f64dce4a9a05
> To: ;tag=as5e107437
> Call-ID: 901952e5fbc15d8ca107fd3c6e8f2edc
> CSeq: 1 INVITE
> Server: Asterisk PBX 11.25.3
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Session-Expires: 1800;refresher=uas
> Contact: 
> Content-Type: application/sdp
> Require: timer
> Content-Length: 345
>
> I rewrite the first record-route in both, INVITE and 200 OK, but the
> second record-route, is the FQDN IP again..
> Could be it the problem?
>
> How can I rewrite that record-route?
>
> Thanks
>
> El jue., 3 sept. 2020 a las 13:53, Pepelux ()
> escribió:
>
>> I don't know. Try to write the domain directly and not an alias:
>>
>> record_route_preset("yourdomain.com:5061;transport=tls", "your_ip:5060");
>>
>> On Thu, 3 Sep 2020 at 13:38, sip user  wrote:
>>
>>> Yes, this is I do:
>>>
>>> record_route();
>>> xlog("L_INFO", "***ROUTE PSTN***");
>>> $rU="1005";
>>>
>>> Have I do any more? Why mu record-route is different yours?
>>>
>>> Thanks
>>>
>>> El jue., 3 sept. 2020 a las 13:27, Pepelux ()
>>> escribió:
>>>
 You have to use record_route_preset when the message is sent from
 Kamailio to Teams

 if (from_uri =~ ".*microsoft.com") {
record_route();
 } else {
record_route_preset("SBC-DNS-DOMAIN:5061;transport=tls",
 "SBC-IP-ADDR:5060");
 }

 On Thu, 3 Sep 2020 at 13:13, sip user  wrote:

> Thanks Pepelux..
>
> Yes, I follow that post to configure it. But I don´t know where could
> be the problem and change Record-Route, because, in the post say, only I
> have to change it when I call from kamailio to Teams, so outgoing calls,
> right? With record-route-preset... I'm wrong?
>
> Thanks
>
> El jue., 3 sept. 2020 a las 13:07, Pepelux ()
> escribió:
>
>> It looks good but in the capture file I saw FQNDIP in RR and not
>> FQNDDNS
>>
>> This post by Henning may help you:
>> https://skalatan.de/en/blog/kamailio-sbc-teams
>>
>> And also you can read that:
>>
>> http://sip-router.1086192.n5.nabble.com/Kamailio-as-SBC-for-Microsoft-Teams-td181493.html
>>
>> This is a response from my Kamailio to Teams. Maybe it can be useful
>> for you:
>>
>> tag: snd
>> pid: 1394
>> process: 1
>> time: 1599126436.582012
>> date: Thu Sep  3 11:47:16 2020
>> proto: tls ipv4
>> srcip: SBC-IP-ADDR
>> srcport: 5061
>> dstip: 52.114.75.24
>> dstport: 5061
>> 
>> SIP/2.0 200 OK
>> Via: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bK8ac0b4eb
>> Record-Route: 
>> Record-Route: 
>> Record-Route: > ;transport=tls;lr>
>> From: Pepelux > ;user=phone>;tag=3a6ca98c0a9a46c98ad781c82f389c4d
>> To: ;tag=as524dd8d6
>> Call-ID: 99ac64b5ad3455be9fd8c838cbdd4c6c
>> CSeq: 1 INVITE
>> Server: Asterisk PBX 16.2.1~dfsg-1+deb10u1
>> Allow:sINVITE, ACK, CANCEL, OPTIONS, BYE, SUBSCRIBE, NOTIFY, INFO,
>> PUBLISH, MESSAGE
>> Supported: replaces
>> Contact: 
>> Content-Type: applicat

[SR-Users] Ynt: Using Kamalio as a proxy for internal servers

2020-09-11 Thread egemen ulus
You can use force socket in kamailio.cfg in these ways;

1- force_send_socket(udp:10.10.10.10:5060);
or if you want to use variable in it;
2- $fs = "udp" + $var(x) + ":5060":

Regards
Egemen U.


Gönderen: Moshe Katz  adına sr-users 

Gönderildi: 7 Eylül 2020 Pazartesi 15:44
Kime: Kamailio (SER) - Users Mailing List 
Konu: Re: [SR-Users] Using Kamalio as a proxy for internal servers

Olle,

If I define another listen line, how do I tell Kamailio to use one listen line 
for inside traffic and the other for outside traffic?


Sergey,

Using IPv6 internally is a great idea. I'll have to see if I can try it.


Thank you both!



On Mon, Sep 7, 2020 at 7:39 AM Olle E. Johansson 
mailto:o...@edvina.net>> wrote:


On 7 Sep 2020, at 12:24, Sergey Safarov 
mailto:s.safa...@gmail.com>> wrote:

To resolve such an issue I switched to use IPv6 on internal SIP servers for 
signaling and IPv4 for RTPmedia.

For me works like a charm.
Very elegant solution!

/O

On Mon, Sep 7, 2020 at 9:58 AM Olle E. Johansson 
mailto:o...@edvina.net>> wrote:
You need to define another listen= without the advertise for communication with 
internal servers. Either another IP or another port.

/O

On 6 Sep 2020, at 17:34, Moshe Katz 
mailto:kohenk...@gmail.com>> wrote:

Hello all,

(Note: I previously posted a more detailed version of this question on 
StackOverflow at https://stackoverflow.com/q/63760506/829970 . This version is 
simplified to fit better in an email.)

I have Kamailio 5.4.1 (and RTPEngine) running on an internal server with a 
private IP address 172.31.7.96 and One-to-one NAT to an external IP address. 
The external IP is 192.0.2.100. (Note: The internal IP addresses are all 
unedited, but the public IPs have been replaced with TEST-NET-1 and TEST-NET-2 
example addresses.) I will eventually be doing transcoding with RTPEngine, but 
for now this is a simple SIP Proxy.

Kamailio is installed on Ubuntu 18.04 using the DEB packages from 
dev.kamailio.org/kamailio54 and is using 
the stock configuration that comes with those packages, except for the 
following changes:


#!define WITH_NAT
#!define WITH_RTPENGINE
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_IPAUTH

listen=udp:0.0.0.0:5060 advertise 
192.0.2.100:5060

#!define DBURL 
"mysql://kamailio:REAL_PASSWORD_HERE@127.0.0.1/kamailio"

I have internal SIP servers with private IP addresses in the 
172.31.7.0/24 range that I want to have send all SIP 
traffic through the Kamailio server. The internal servers are running a Java 
SIP client with the `OUTBOUND_PROXY` setting set to 172.31.7.96.

The problem I have is that the SIP `200 OK` message sent by Kamailio to my SIP 
server has its `Record-Route` header set to the public IP address `192.0.2.100` 
instead of the private address `172.31.7.96`. The SIP client therefore tries to 
send the `ACK` message back to the public address, but it has no route to the 
public address so the ACK never gets sent.

How can I configure Kamailio to use the public IP for external traffic but the 
private IP for communicating with internal machines on the same subnet?

I tried setting `mhomed=1`, but the machine isn't actually multi-homed so that 
didn't work.

I thought of adding a second listen line 
`listen=udp:172.31.7.96:5061` and having the internal 
servers talk to port 5061, but that doesn't work because Kamailio uses the 5061 
definition for the external side too.

I see in the docs that it is possible to name the listener lines, but I don't 
understand how to use those names in a way that would be relevant to my issue.

Thank you very much for your help,

Moshe
___
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] How to handle BYE in case of serial fork

2020-09-11 Thread Henning Westerholt
Hello Björn,

I was not referring to dialog stateful routing e.g. with dialog module. I was 
referring to the loose_route() function in your kamailio.cfg (e.g. compare to 
the default cfg in github).

Maybe you can quote the problematic BYE SIP message here.

Cheers,

Henning

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

-Original Message-
From: sr-users  On Behalf Of Björn Klasen
Sent: Friday, September 11, 2020 12:19 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] How to handle BYE in case of serial fork

Hi Henning,

the question is, where to route the BYE, because the first fork is terminated. 
It's a call-forward not reachable (CFNR) scenario.

So your proposal is to route the BYE to callee B after it got already a CANCEL?

The BYE is routet in-dialog. But if the Dialog is not known it could not be 
routet.

BR,
Björn

Am 11.09.20 um 11:47 schrieb Henning Westerholt:
> Hello Björn,
>
> if I understood your scenario correct: what about just forwarding the BYE 
> normally? It should be usually routed as in-dialog request without any 
> transaction matching.
> What do you mean with "Kamailio doesn't know anything about it, so it does 
> not reply".
>
> BTW, you should think about upgrading your Kamailio. 😉
>
> Cheers,
>
> Henning
>
--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP) Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg, Sven Schade, 
Carsten Tolkmit, Dr. Sven Willert Tax-Id (Steuernr.): 2029047020, VAT-Id 
(USt-Id): DE225201428


___
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] How to handle BYE in case of serial fork

2020-09-11 Thread Björn Klasen

Hi Henning,

the question is, where to route the BYE, because the first fork is 
terminated. It's a call-forward not reachable (CFNR) scenario.


So your proposal is to route the BYE to callee B after it got already a 
CANCEL?


The BYE is routet in-dialog. But if the Dialog is not known it could not 
be routet.


BR,
Björn

Am 11.09.20 um 11:47 schrieb Henning Westerholt:

Hello Björn,

if I understood your scenario correct: what about just forwarding the BYE 
normally? It should be usually routed as in-dialog request without any 
transaction matching.
What do you mean with "Kamailio doesn't know anything about it, so it does not 
reply".

BTW, you should think about upgrading your Kamailio. 😉

Cheers,

Henning


--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP)
Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg,
Sven Schade, Carsten Tolkmit, Dr. Sven Willert
Tax-Id (Steuernr.): 2029047020, VAT-Id (USt-Id): DE225201428


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


Re: [SR-Users] Using Kamalio as a proxy for internal servers

2020-09-11 Thread Henning Westerholt
Hi Moshe,

usually you specify the socket that you be used (either by IP, or in new 
release by socket name). That can be done in the cfg or also in some modules, 
e.g. dispatcher.

Cheers,

Henning

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

From: sr-users  On Behalf Of Moshe Katz
Sent: Monday, September 7, 2020 2:45 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Using Kamalio as a proxy for internal servers

Olle,
If I define another listen line, how do I tell Kamailio to use one listen line 
for inside traffic and the other for outside traffic?


Sergey,

Using IPv6 internally is a great idea. I'll have to see if I can try it.


Thank you both!


On Mon, Sep 7, 2020 at 7:39 AM Olle E. Johansson 
mailto:o...@edvina.net>> wrote:



On 7 Sep 2020, at 12:24, Sergey Safarov 
mailto:s.safa...@gmail.com>> wrote:

To resolve such an issue I switched to use IPv6 on internal SIP servers for 
signaling and IPv4 for RTPmedia.

For me works like a charm.
Very elegant solution!

/O


On Mon, Sep 7, 2020 at 9:58 AM Olle E. Johansson 
mailto:o...@edvina.net>> wrote:
You need to define another listen= without the advertise for communication with 
internal servers. Either another IP or another port.

/O


On 6 Sep 2020, at 17:34, Moshe Katz 
mailto:kohenk...@gmail.com>> wrote:

Hello all,

(Note: I previously posted a more detailed version of this question on 
StackOverflow at https://stackoverflow.com/q/63760506/829970 . This version is 
simplified to fit better in an email.)

I have Kamailio 5.4.1 (and RTPEngine) running on an internal server with a 
private IP address 172.31.7.96 and One-to-one NAT to an external IP address. 
The external IP is 192.0.2.100. (Note: The internal IP addresses are all 
unedited, but the public IPs have been replaced with TEST-NET-1 and TEST-NET-2 
example addresses.) I will eventually be doing transcoding with RTPEngine, but 
for now this is a simple SIP Proxy.

Kamailio is installed on Ubuntu 18.04 using the DEB packages from 
dev.kamailio.org/kamailio54 and is using 
the stock configuration that comes with those packages, except for the 
following changes:


#!define WITH_NAT

#!define WITH_RTPENGINE

#!define WITH_MYSQL

#!define WITH_AUTH

#!define WITH_IPAUTH



listen=udp:0.0.0.0:5060 advertise 
192.0.2.100:5060



#!define DBURL 
"mysql://kamailio:REAL_PASSWORD_HERE@127.0.0.1/kamailio"

I have internal SIP servers with private IP addresses in the 
172.31.7.0/24 range that I want to have send all SIP 
traffic through the Kamailio server. The internal servers are running a Java 
SIP client with the `OUTBOUND_PROXY` setting set to 172.31.7.96.

The problem I have is that the SIP `200 OK` message sent by Kamailio to my SIP 
server has its `Record-Route` header set to the public IP address `192.0.2.100` 
instead of the private address `172.31.7.96`. The SIP client therefore tries to 
send the `ACK` message back to the public address, but it has no route to the 
public address so the ACK never gets sent.

How can I configure Kamailio to use the public IP for external traffic but the 
private IP for communicating with internal machines on the same subnet?

I tried setting `mhomed=1`, but the machine isn't actually multi-homed so that 
didn't work.

I thought of adding a second listen line 
`listen=udp:172.31.7.96:5061` and having the internal 
servers talk to port 5061, but that doesn't work because Kamailio uses the 5061 
definition for the external side too.

I see in the docs that it is possible to name the listener lines, but I don't 
understand how to use those names in a way that would be relevant to my issue.

Thank you very much for your help,

Moshe
___
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


[SR-Users] Kamailio does not forward BYE to Asterisk

2020-09-11 Thread egemen ulus
Hi all,

I have an infrastructure with Kamailio (reg), Asterisks farm, and Kamailio 
(4.3) proxy which dispatches calls.


Trunk-1 (Vlan_A)
Kam(reg) <> Asterisk Farm (5) <> Kam(proxy) <>  Trunk-2 (Vlan_B)

Trunk-3 (Vlan_C)

For each trunk, I have to use the IP of the VLAN interface in "contact header". 
That means when I need to send a call to Trunk-1 I have to set Vlan_A IP 
address on the contact header. I have achieved that by rewriting Contact Header.

###
remove_hf("Contact:");
append_hf("Contact: \r\n", "Call-ID");   #by using db
###

But this causes a problem, Kamailio does not forward the BYE message that comes 
from Trunk-X to Asterisk (In before, the BYE message had Asterisk IP in R-URI). 
However, when I use topoh module it forward properly for one trunk. But I can 
not set multiple mask IP in topoh module.

I'm using the dialog module and I thought it can handle all requests in one 
dialog to forward to the correct asterisk but it did not.

Is there any suggestion for this case?
And also how many sub-interfaces can Kamailio handle for a good performance?  
Or do you suggest multiple Kamailio instances instead of multiple 
sub-interfaces on one server?


[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]
Virus-free. 
www.avast.com
___
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 handle BYE in case of serial fork

2020-09-11 Thread Henning Westerholt
Hello Björn,

if I understood your scenario correct: what about just forwarding the BYE 
normally? It should be usually routed as in-dialog request without any 
transaction matching.
What do you mean with "Kamailio doesn't know anything about it, so it does not 
reply".

BTW, you should think about upgrading your Kamailio. 😉

Cheers,

Henning

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

-Original Message-
From: sr-users  On Behalf Of Björn Klasen
Sent: Friday, September 11, 2020 10:46 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] How to handle BYE in case of serial fork

Hi

we are using Kamailio 4.3.7 and I have a question concerning BYE handling.

We have the following situation:

A carrier a call to us. We are forwarding the call to the destination, but it 
does not pick up the call. We have call-forward active with use of tm module, 
so we forward the call to the new destination. The first call generates a 
to-tag in 180, let's call it TT1. The second call, so the c-destination also 
answer with 180 but with another to-tag (TT2). 
Both ringing are passed to the originating carrier.

When the timer for the first call is timed out, Kamailio cancels the branch 
with a CANCEL so it does not exist any more

Now the c-destination picks up the phone, and reply with 200 OK with TT2

The carrier then sends a BYE with TT1 to us, but Kamailio doesn't know anything 
about it, so it does not reply and the carrier sends a timeout and terminates 
the complete call.

So the question is, how handle such a situation. Is it possible to store the 
first branch, or fake a OK reply to the BYE request of the carrier as for my 
understanding this behaviour is not against RFC.

To clarify the situation here comes a call-flow diagram

A    Kamailio   B   C

|---INV Bob@P1->|   |   |
|   |--INV Bob@B--->|   |
|   |<-100--|   | <-100--|  
 
||   |
|   |<-180 TT1--|   |
|<-180 TT1--|   |   |

Forward after 10 seconds

|   |--CANCEL-->|   |
|   |<-487--|   |
|   |<-200 OK---|   |
|   |--ACK->|   |
|<-181 TT1--|   |   |
|   |--INV Carol@C->|
|   |<-100--|
|   |<-180 TT2--|
|<-180 TT2--|   |   |
|   |<-200 OK TT2---|
|<-200 OK TT2---|   |   | --BYE TT1->|  
 
||   | --BYE TT1->|   |   | 
|--BYE TT1->|   |   |
|--408->|   |   |
|--ACK->|   |   |
|   |--ACK->|
|   |<-BYE TT2--| <-BYE TT2--|  
 
||
|--481->|   |
|   |--481->|

To get around the the situation with the second to-tag, we passing every call 
through SEMS now, because its B2B function rewrites the to-tag, so there is 
always only one to-tag towards the carrier A. But it's not the gold solution.

I hope somebody can help me.

BR, Björn

--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP) Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg, Sven Schade, 
Carsten Tolkmit, Dr. Sven Willert Tax-Id (Steuernr.): 2029047020, VAT-Id 
(USt-Id): DE225201428


___
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] How to handle BYE in case of serial fork

2020-09-11 Thread Björn Klasen

Hi

we are using Kamailio 4.3.7 and I have a question concerning BYE handling.

We have the following situation:

A carrier a call to us. We are forwarding the call to the destination, 
but it does not pick up the call. We have call-forward active with use 
of tm module, so we forward the call to the new destination. The first 
call generates a to-tag in 180, let's call it TT1. The second call, so 
the c-destination also answer with 180 but with another to-tag (TT2). 
Both ringing are passed to the originating carrier.


When the timer for the first call is timed out, Kamailio cancels the 
branch with a CANCEL so it does not exist any more


Now the c-destination picks up the phone, and reply with 200 OK with TT2

The carrier then sends a BYE with TT1 to us, but Kamailio doesn't know 
anything about it, so it does not reply and the carrier sends a timeout 
and terminates the complete call.


So the question is, how handle such a situation. Is it possible to store 
the first branch, or fake a OK reply to the BYE request of the carrier 
as for my understanding this behaviour is not against RFC.


To clarify the situation here comes a call-flow diagram

A    Kamailio   B   C

|---INV Bob@P1->|   |   |
|   |--INV Bob@B--->|   |
|   |<-100--|   |
|<-100--|   |   |
|   |<-180 TT1--|   |
|<-180 TT1--|   |   |

Forward after 10 seconds

|   |--CANCEL-->|   |
|   |<-487--|   |
|   |<-200 OK---|   |
|   |--ACK->|   |
|<-181 TT1--|   |   |
|   |--INV Carol@C->|
|   |<-100--|
|   |<-180 TT2--|
|<-180 TT2--|   |   |
|   |<-200 OK TT2---|
|<-200 OK TT2---|   |   |
|--BYE TT1->|   |   |
|--BYE TT1->|   |   |
|--BYE TT1->|   |   |
|--408->|   |   |
|--ACK->|   |   |
|   |--ACK->|
|   |<-BYE TT2--|
|<-BYE TT2--|   |
|--481->|   |
|   |--481->|

To get around the the situation with the second to-tag, we passing every 
call through SEMS now, because its B2B function rewrites the to-tag, so 
there is always only one to-tag towards the carrier A. But it's not the 
gold solution.


I hope somebody can help me.

BR, Björn

--
Björn Klasen, Specialist
TNG Stadtnetz GmbH, Network Management (VoIP)
Projensdorfer Straße 324
24106 Kiel
Germany

T +49 431/ 530530
F +49 431/ 7097-555
mailto: bkla...@tng.de
http://www.tng.de

Register: Amtsgericht Kiel HRB 6002 KI
Executive board (Geschäftsführung): Dr.-Ing. Volkmar Hausberg,
Sven Schade, Carsten Tolkmit, Dr. Sven Willert
Tax-Id (Steuernr.): 2029047020, VAT-Id (USt-Id): DE225201428


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