Re: [SR-Users] How to retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread Patrick Wakano
Just rectifying about the $snd variable. While the wiki tells that $snd ==
$sndfrom, I discovered that the $snd == $sndto.
So in my case, the $sndfrom(ip) gives me the local socket the message is
being sent.
However this only works from the onsend_route. I wasn't using this route at
all, so now I need to check whether a call to rtpengine_offer will properly
work from it.

On Fri, 22 Nov 2019 at 10:01, Patrick Wakano  wrote:

> Yes David, we have all sorts of weird things (specially legacy
> installations where creativity really shined). Also, in some private
> network architectures my external interface may not have a public IP at
> all
> Anyway, I first thought about applying some logic on the destination IP,
> but it is only reliable if I know my routing table, and this task Kamailio
> already performs when relaying The easiest way for now seems to save
> the info in the DB, so I explicit tell from which socket each GW is
> reachable
>
> And for curiosity I attempted the $snd() variables but they don't have the
> socket information the $snd(ip) has the destination IP, not my local
> socket as the doc may suggest.The $branch variable (
> http://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#branch_name_-_branch_attributes)
> was promising but I couldn't figure out when it is set. In my branch_routes
> it is always null..
>
>
> On Fri, 22 Nov 2019 at 09:15, David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>> Hello,
>>
>> Interesting challenge you’ve got.
>>
>>  It may fail in cases where my kernel routing table has some rule where a
>> private IP is reachable via my external interface but different GW for
>> example
>>
>> In this case then, the $du will be a rfc1918 ip but the outgoing
>> interface will be a public ip?
>>
>> Have you tried $send(name) ?
>>
>> The docs state:
>>
>> Send Address Attributes
>> $sndfrom(name)
>>
>> *$snd(name)* - return attributes of the address from where the request
>> is going to be sent (local socket).
>>
>> On Thu, 21 Nov 2019 at 22:57, Patrick Wakano  wrote:
>>
>>> Thanks for the replies and examples! Much appreciated!
>>>
>>> I was thinking of something similar to David suggestion, but I think
>>> this is not 100% reliable. It may fail in cases where my kernel routing
>>> table has some rule where a private IP is reachable via my external
>>> interface but different GW for example (multiple IPs in the same interface
>>> or more complex network architecture with VPN or direct link with some
>>> endpoint) So given Kamailio already consults the kernel looking for the
>>> correct interface to a given destination, I thought this is actually the
>>> correct information I should use in my script. The only problem is that
>>> apparently Kamailio is not exposing this info for the script writer
>>> Karsten suggestion should probably work but in short this is just a way
>>> to statically save in DB the network routing information I know before
>>> hand. If this route changes (which should not happen often I agree) then I
>>> have to update the DB. And also this DB data could be replaced by some
>>> logic in my script if I had access to the chosen socket... That's exactly
>>> the purpose of having mhomed=1 in the script, I don't need to save socket
>>> info for all my GWs in DB because I am letting Kamailio automatically
>>> decide it. And it does pretty well! The only problem now is that I don't
>>> know what this decision was and I need it to implement the RTPEngine logic
>>> in my script based on the interface the INVITE will go out.
>>>
>>> Happy to hear more ideas!
>>> Thanks,
>>> Kind regards,
>>> Patrick Wakano
>>>
>>> On Thu, 21 Nov 2019 at 20:07, Karsten Horsmann 
>>> wrote:
>>>
 Hi Patrick,

 If you don't use tls at this moment, the config from sbc OS is also an
 good example of using dispatcher with the socket params to select the right
 sendsock and using vars to give rtpengine the right internal / external
 directions. They use numbers for internal and external. To figure out where
 the direction is, this config use pseudo vars for receiving local socket


 https://github.com/voiceboys/sbcOS/blob/master/SbcOS/configs/voice/kamailio/kamailio.cfg#L450

 Cheers
 Karsten Horsmann

 Patrick Wakano  schrieb am Do., 21. Nov. 2019,
 07:11:

> Hello list,
> Hope you are all doing well!
>
> I am trying to figure out a way to retrieve the local socket the
> t_relay() has decided to use in a mhomed=1 env. Is there a way to do that?
> I couldn't find any variable other than the $snd ones that maybe have this
> info, but I am not using onsend_route anyway.
> I am after this value because this is what I can use to figure out if
> I need to engage RTPEngine with parameters "external, internal", 
> "external,
> external", "internal, external" or "internal, internal". In my case, my
> server is in between two 

Re: [SR-Users] How to retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread Patrick Wakano
Yes David, we have all sorts of weird things (specially legacy
installations where creativity really shined). Also, in some private
network architectures my external interface may not have a public IP at
all
Anyway, I first thought about applying some logic on the destination IP,
but it is only reliable if I know my routing table, and this task Kamailio
already performs when relaying The easiest way for now seems to save
the info in the DB, so I explicit tell from which socket each GW is
reachable

And for curiosity I attempted the $snd() variables but they don't have the
socket information the $snd(ip) has the destination IP, not my local
socket as the doc may suggest.The $branch variable (
http://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#branch_name_-_branch_attributes)
was promising but I couldn't figure out when it is set. In my branch_routes
it is always null..


On Fri, 22 Nov 2019 at 09:15, David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello,
>
> Interesting challenge you’ve got.
>
>  It may fail in cases where my kernel routing table has some rule where a
> private IP is reachable via my external interface but different GW for
> example
>
> In this case then, the $du will be a rfc1918 ip but the outgoing interface
> will be a public ip?
>
> Have you tried $send(name) ?
>
> The docs state:
>
> Send Address Attributes
> $sndfrom(name)
>
> *$snd(name)* - return attributes of the address from where the request is
> going to be sent (local socket).
>
> On Thu, 21 Nov 2019 at 22:57, Patrick Wakano  wrote:
>
>> Thanks for the replies and examples! Much appreciated!
>>
>> I was thinking of something similar to David suggestion, but I think this
>> is not 100% reliable. It may fail in cases where my kernel routing table
>> has some rule where a private IP is reachable via my external interface but
>> different GW for example (multiple IPs in the same interface or more
>> complex network architecture with VPN or direct link with some
>> endpoint) So given Kamailio already consults the kernel looking for the
>> correct interface to a given destination, I thought this is actually the
>> correct information I should use in my script. The only problem is that
>> apparently Kamailio is not exposing this info for the script writer
>> Karsten suggestion should probably work but in short this is just a way
>> to statically save in DB the network routing information I know before
>> hand. If this route changes (which should not happen often I agree) then I
>> have to update the DB. And also this DB data could be replaced by some
>> logic in my script if I had access to the chosen socket... That's exactly
>> the purpose of having mhomed=1 in the script, I don't need to save socket
>> info for all my GWs in DB because I am letting Kamailio automatically
>> decide it. And it does pretty well! The only problem now is that I don't
>> know what this decision was and I need it to implement the RTPEngine logic
>> in my script based on the interface the INVITE will go out.
>>
>> Happy to hear more ideas!
>> Thanks,
>> Kind regards,
>> Patrick Wakano
>>
>> On Thu, 21 Nov 2019 at 20:07, Karsten Horsmann 
>> wrote:
>>
>>> Hi Patrick,
>>>
>>> If you don't use tls at this moment, the config from sbc OS is also an
>>> good example of using dispatcher with the socket params to select the right
>>> sendsock and using vars to give rtpengine the right internal / external
>>> directions. They use numbers for internal and external. To figure out where
>>> the direction is, this config use pseudo vars for receiving local socket
>>>
>>>
>>> https://github.com/voiceboys/sbcOS/blob/master/SbcOS/configs/voice/kamailio/kamailio.cfg#L450
>>>
>>> Cheers
>>> Karsten Horsmann
>>>
>>> Patrick Wakano  schrieb am Do., 21. Nov. 2019, 07:11:
>>>
 Hello list,
 Hope you are all doing well!

 I am trying to figure out a way to retrieve the local socket the
 t_relay() has decided to use in a mhomed=1 env. Is there a way to do that?
 I couldn't find any variable other than the $snd ones that maybe have this
 info, but I am not using onsend_route anyway.
 I am after this value because this is what I can use to figure out if I
 need to engage RTPEngine with parameters "external, internal", "external,
 external", "internal, external" or "internal, internal". In my case, my
 server is in between two networks, and calls can traverse or can be routed
 back to the same interface depending on what was decide by the LCR module.
 Signalling is fine, but engaging the RTPEngine must be done with the
 correct parameters to get the correct IPs in the SDP, other else I get one
 way audio in the call.

 Any help is much appreciated!
 Thank you!
 Kind regards,
 Patrick Wakano


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

Re: [SR-Users] How to retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread David Villasmil
Hello,

Interesting challenge you’ve got.

 It may fail in cases where my kernel routing table has some rule where a
private IP is reachable via my external interface but different GW for
example

In this case then, the $du will be a rfc1918 ip but the outgoing interface
will be a public ip?

Have you tried $send(name) ?

The docs state:

Send Address Attributes
$sndfrom(name)

*$snd(name)* - return attributes of the address from where the request is
going to be sent (local socket).

On Thu, 21 Nov 2019 at 22:57, Patrick Wakano  wrote:

> Thanks for the replies and examples! Much appreciated!
>
> I was thinking of something similar to David suggestion, but I think this
> is not 100% reliable. It may fail in cases where my kernel routing table
> has some rule where a private IP is reachable via my external interface but
> different GW for example (multiple IPs in the same interface or more
> complex network architecture with VPN or direct link with some
> endpoint) So given Kamailio already consults the kernel looking for the
> correct interface to a given destination, I thought this is actually the
> correct information I should use in my script. The only problem is that
> apparently Kamailio is not exposing this info for the script writer
> Karsten suggestion should probably work but in short this is just a way to
> statically save in DB the network routing information I know before hand.
> If this route changes (which should not happen often I agree) then I have
> to update the DB. And also this DB data could be replaced by some logic in
> my script if I had access to the chosen socket... That's exactly the
> purpose of having mhomed=1 in the script, I don't need to save socket info
> for all my GWs in DB because I am letting Kamailio automatically decide it.
> And it does pretty well! The only problem now is that I don't know what
> this decision was and I need it to implement the RTPEngine logic in my
> script based on the interface the INVITE will go out.
>
> Happy to hear more ideas!
> Thanks,
> Kind regards,
> Patrick Wakano
>
> On Thu, 21 Nov 2019 at 20:07, Karsten Horsmann 
> wrote:
>
>> Hi Patrick,
>>
>> If you don't use tls at this moment, the config from sbc OS is also an
>> good example of using dispatcher with the socket params to select the right
>> sendsock and using vars to give rtpengine the right internal / external
>> directions. They use numbers for internal and external. To figure out where
>> the direction is, this config use pseudo vars for receiving local socket
>>
>>
>> https://github.com/voiceboys/sbcOS/blob/master/SbcOS/configs/voice/kamailio/kamailio.cfg#L450
>>
>> Cheers
>> Karsten Horsmann
>>
>> Patrick Wakano  schrieb am Do., 21. Nov. 2019, 07:11:
>>
>>> Hello list,
>>> Hope you are all doing well!
>>>
>>> I am trying to figure out a way to retrieve the local socket the
>>> t_relay() has decided to use in a mhomed=1 env. Is there a way to do that?
>>> I couldn't find any variable other than the $snd ones that maybe have this
>>> info, but I am not using onsend_route anyway.
>>> I am after this value because this is what I can use to figure out if I
>>> need to engage RTPEngine with parameters "external, internal", "external,
>>> external", "internal, external" or "internal, internal". In my case, my
>>> server is in between two networks, and calls can traverse or can be routed
>>> back to the same interface depending on what was decide by the LCR module.
>>> Signalling is fine, but engaging the RTPEngine must be done with the
>>> correct parameters to get the correct IPs in the SDP, other else I get one
>>> way audio in the call.
>>>
>>> Any help is much appreciated!
>>> Thank you!
>>> Kind regards,
>>> Patrick Wakano
>>>
>>>
>>> ___
>>> 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
>
-- 
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] How to retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread Patrick Wakano
Thanks for the replies and examples! Much appreciated!

I was thinking of something similar to David suggestion, but I think this
is not 100% reliable. It may fail in cases where my kernel routing table
has some rule where a private IP is reachable via my external interface but
different GW for example (multiple IPs in the same interface or more
complex network architecture with VPN or direct link with some
endpoint) So given Kamailio already consults the kernel looking for the
correct interface to a given destination, I thought this is actually the
correct information I should use in my script. The only problem is that
apparently Kamailio is not exposing this info for the script writer
Karsten suggestion should probably work but in short this is just a way to
statically save in DB the network routing information I know before hand.
If this route changes (which should not happen often I agree) then I have
to update the DB. And also this DB data could be replaced by some logic in
my script if I had access to the chosen socket... That's exactly the
purpose of having mhomed=1 in the script, I don't need to save socket info
for all my GWs in DB because I am letting Kamailio automatically decide it.
And it does pretty well! The only problem now is that I don't know what
this decision was and I need it to implement the RTPEngine logic in my
script based on the interface the INVITE will go out.

Happy to hear more ideas!
Thanks,
Kind regards,
Patrick Wakano

On Thu, 21 Nov 2019 at 20:07, Karsten Horsmann  wrote:

> Hi Patrick,
>
> If you don't use tls at this moment, the config from sbc OS is also an
> good example of using dispatcher with the socket params to select the right
> sendsock and using vars to give rtpengine the right internal / external
> directions. They use numbers for internal and external. To figure out where
> the direction is, this config use pseudo vars for receiving local socket
>
>
> https://github.com/voiceboys/sbcOS/blob/master/SbcOS/configs/voice/kamailio/kamailio.cfg#L450
>
> Cheers
> Karsten Horsmann
>
> Patrick Wakano  schrieb am Do., 21. Nov. 2019, 07:11:
>
>> Hello list,
>> Hope you are all doing well!
>>
>> I am trying to figure out a way to retrieve the local socket the
>> t_relay() has decided to use in a mhomed=1 env. Is there a way to do that?
>> I couldn't find any variable other than the $snd ones that maybe have this
>> info, but I am not using onsend_route anyway.
>> I am after this value because this is what I can use to figure out if I
>> need to engage RTPEngine with parameters "external, internal", "external,
>> external", "internal, external" or "internal, internal". In my case, my
>> server is in between two networks, and calls can traverse or can be routed
>> back to the same interface depending on what was decide by the LCR module.
>> Signalling is fine, but engaging the RTPEngine must be done with the
>> correct parameters to get the correct IPs in the SDP, other else I get one
>> way audio in the call.
>>
>> Any help is much appreciated!
>> Thank you!
>> Kind regards,
>> Patrick Wakano
>>
>>
>> ___
>> 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] Adding SIP Gateway Endpoint in Kamailio

2019-11-21 Thread David Villasmil
Hello Sujit,

On your first post you said you wanted to authenticate. By that I
understood you would want your USERS to REGISTER, is this not the case? Or
are you looking to authorize via IP address only? If so, the config is not
the same.

As Henning said, you need to enable WITH_IPAUTH

REGARDS

david

On Thu, 21 Nov 2019 at 21:39, Henning Westerholt  wrote:

> Hello,
>
>
>
> it seems that the method or module is not available (as indicated also
> from the error message).
>
>
>
> Check in your Kamailio.cfg if you load the permissions module.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
> Kamailio Merchandising – https://skalatan.de/merchandising
>
>
>
> *From:* sr-users  *On Behalf Of *Sujit
> Roy
> *Sent:* Thursday, November 21, 2019 11:14 AM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Adding SIP Gateway Endpoint in Kamailio
>
>
>
> Hello David
>
>
>
> I have successfully installed kamailio with rtp proxy.
>
>
>
> I also have added incoming sip endpoint as below
>
>
>
> kamctl address add 1 XX.YY.ZZ.177  0
>
>
>
> but when i am doing reload i m getting below output.
>
>
>
> [root@unassigned ~]# kamctl address reload
> which: no gdb in
> (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin/rtpproxy:/root/bin:/)
> {
>   "jsonrpc":  "2.0",
>   "error":  {
> "code": 500,
> "message":  "Method Not Found"
>   },
>   "id": 10086
> }
>
>
>
> Can u please let me know what should I do now ?
>
>
>
> Thanks
>
>
>
>
>
> On Fri, Nov 15, 2019 at 10:52 PM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
> Hello,
>
>
>
> I already shared a pretty well explained tutorial.
>
>
>
> It's pretty straightforward starting from the default kamailio
> configuration
> https://github.com/kamailio/kamailio/blob/5.2/etc/kamailio.cfg (that's
> for 5.2, use whichever version you have)
>
> You need to install rtpproxy locally:
> https://blog.voipxswitch.com/2015/06/18/rtpproxy-compiling-installing-on-debian-8/
>
>
>
> Then you enable:
>
>
>
> #!define WITH_MYSQL
>
> #!define WITH_AUTH
>
> #!define WITH_NAT
>
> #!define WITH_PSTN
>
>
>
> Then you need to set the B server IP and port
>
>
>
> pstn.gw_ip = "B-SERVER-IP" desc "PSTN GW Address"
> pstn.gw_port = "B-SERVER-PORT" desc "PSTN GW Port"
>
>
>
> and add your users to the db via kamctl utility (you need to configure
> /etc/kamailio/kamctlrc)
>
>
>
> Hope that helps.
>
>
> Regards,
>
>
>
> David Villasmil
>
> email: david.villasmil.w...@gmail.com
>
> phone: +34669448337
>
>
>
>
>
> On Fri, Nov 15, 2019 at 2:31 PM Sujit Roy  wrote:
>
> Thanks for the good suggestion.
>
>
>
> Can you kindly suggest the configuration in kamailio for both A & B SIP
> Gateway endpoint ?
>
>
>
> Thanks
>
>
>
> On Fri, Nov 15, 2019 at 7:31 PM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
> If you're only using Asterisk as a media server, why use it? Why not just
> use rtpproxy or mediaproxy? it'd be much simpler and you'd achieve the same
> thing.
>
> Unless you need to do something specific in Asterisk, there's really no
> need.
>
>
>
> https://dopensource.com/2017/05/31/installing-configuring-rtpproxy/
>
>
>
> Should help you getting started.
>
>
> Regards,
>
>
>
> David Villasmil
>
> email: david.villasmil.w...@gmail.com
>
> phone: +34669448337
>
>
>
>
>
> On Fri, Nov 15, 2019 at 1:21 PM Sujit Roy  wrote:
>
> Hello
>
>
>
> Here is my call flow scenario.
>
>
>
> SIP Gateway (A)
>
> Kamailio (K)
>
> Asterisk (AST)
>
> SIP Gateway (B)
>
>
>
> Now i want to send calls from A -> B by using Asterisk as media server.
>
> Kamailio shall be used to authenticate A and allow A to send calls to B.
>
>
>
> What are the configurations i need to make in Kamailio and Asterisk ?
>
>
>
> Thanks in advance.
>
>
>
> --
>
> Regards
> ===
>
> Sujit Roy
>
>
>
> ___
> 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
>
>
>
>
> --
>
> Regards
> ===
>
> Sujit Roy
>
>
>
> ___
> 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
>
>
>
>
> --
>
> Regards
> ===
>
> Sujit Roy
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: 

Re: [SR-Users] Adding SIP Gateway Endpoint in Kamailio

2019-11-21 Thread Henning Westerholt
Hello,

it seems that the method or module is not available (as indicated also from the 
error message).

Check in your Kamailio.cfg if you load the permissions module.

Cheers,

Henning

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

From: sr-users  On Behalf Of Sujit Roy
Sent: Thursday, November 21, 2019 11:14 AM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Adding SIP Gateway Endpoint in Kamailio

Hello David

I have successfully installed kamailio with rtp proxy.

I also have added incoming sip endpoint as below

kamctl address add 1 XX.YY.ZZ.177  0

but when i am doing reload i m getting below output.

[root@unassigned ~]# kamctl address reload
which: no gdb in 
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin/rtpproxy:/root/bin:/)
{
  "jsonrpc":  "2.0",
  "error":  {
"code": 500,
"message":  "Method Not Found"
  },
  "id": 10086
}

Can u please let me know what should I do now ?

Thanks


On Fri, Nov 15, 2019 at 10:52 PM David Villasmil 
mailto:david.villasmil.w...@gmail.com>> wrote:
Hello,

I already shared a pretty well explained tutorial.

It's pretty straightforward starting from the default kamailio configuration 
https://github.com/kamailio/kamailio/blob/5.2/etc/kamailio.cfg (that's for 5.2, 
use whichever version you have)
You need to install rtpproxy locally: 
https://blog.voipxswitch.com/2015/06/18/rtpproxy-compiling-installing-on-debian-8/

Then you enable:

#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_NAT
#!define WITH_PSTN

Then you need to set the B server IP and port

pstn.gw_ip = "B-SERVER-IP" desc "PSTN GW Address"
pstn.gw_port = "B-SERVER-PORT" desc "PSTN GW Port"

and add your users to the db via kamctl utility (you need to configure 
/etc/kamailio/kamctlrc)

Hope that helps.

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Fri, Nov 15, 2019 at 2:31 PM Sujit Roy 
mailto:sujitroy...@gmail.com>> wrote:
Thanks for the good suggestion.

Can you kindly suggest the configuration in kamailio for both A & B SIP Gateway 
endpoint ?

Thanks

On Fri, Nov 15, 2019 at 7:31 PM David Villasmil 
mailto:david.villasmil.w...@gmail.com>> wrote:
If you're only using Asterisk as a media server, why use it? Why not just use 
rtpproxy or mediaproxy? it'd be much simpler and you'd achieve the same thing.
Unless you need to do something specific in Asterisk, there's really no need.

https://dopensource.com/2017/05/31/installing-configuring-rtpproxy/

Should help you getting started.

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Fri, Nov 15, 2019 at 1:21 PM Sujit Roy 
mailto:sujitroy...@gmail.com>> wrote:
Hello

Here is my call flow scenario.

SIP Gateway (A)
Kamailio (K)
Asterisk (AST)
SIP Gateway (B)

Now i want to send calls from A -> B by using Asterisk as media server.
Kamailio shall be used to authenticate A and allow A to send calls to B.

What are the configurations i need to make in Kamailio and Asterisk ?

Thanks in advance.

--
Regards
===
Sujit Roy

___
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


--
Regards
===
Sujit Roy

___
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


--
Regards
===
Sujit Roy

___
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 max tcp connections

2019-11-21 Thread Jose Fco . Irles Durá
Thanks for the info!

Tomorrow I'll test it with the 5.1.9 version.

Best regards

El jue., 21 nov. 2019 a las 17:35, Daniel Tryba () escribió:
>
> On Thu, Nov 21, 2019 at 02:46:39PM +0100, Jose Fco. Irles Dur?? wrote:
> > Hi
> >
> > I have a kamailio 5.1.2 as load balancer and registration offloading,
> > but I have a problem with the max tcp connections that it can handle.
> > I suspect that is a linux limit, but I don't find the reason or config.
> > When that limit arrives, I can't connect to kamailio and I receive
> > "Connection reset by peer", but I can't view any error message in the
> > logs.
>
> I experienced the same with versions pre 5.1.9. It hasn't happened to me
> with 5.1.9 yet, so I cannot say it was fixed. Additional changes I
> applied where some sysctl tweaks:
>
> net.core.somaxconn = 128
> net.ipv4.tcp_max_syn_backlog = 1024
> net.ipv4.tcp_timestamps = 1
> net.ipv4.tcp_tw_recycle = 1
> net.ipv4.tcp_tw_reuse = 1
> net.ipv4.tcp_max_tw_buckets = 4096
> net.ipv4.ip_local_port_range = 4096 65534
> net.ipv4.tcp_syncookies = 0
>
>
> Again, not really sure if these are related.
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



-- 
Jose Fco. Irles Durá

___
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 access different uris in a header

2019-11-21 Thread Alex Balashov
Why not just split them by comma using {s.select} and then fish them out
with {nameaddr.uri}?

On Thu, Nov 21, 2019 at 06:20:30PM +, Duarte Rocha wrote:

> Greetings,
> 
> In order to identify Redirecting Number and Original Called Number on a
> given request i look for the top( Redirecting Number) and bottom (Original
> Called) Diversion headers using hdr(Diversion)[0] and hdr(Diversion)[-1].
> 
> However, i have a client that sends me all the Diversions URIS in the same
> header. Does kamailio has a similar tool for accessing the different URIS
> in the header?
> 
> Best Regards,

> ___
> 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] Re-use TCP connections on different transactions

2019-11-21 Thread Joel Serrano
Hi Daniel,

I sent you (privately) 2 pcaps. Please let me know if you need anything
else.

My current TCP params are:

disable_tcp=no
tcp_children=1
tcp_max_connections=12288
tcp_rd_buf_size=65536
tcp_conn_wq_max=131072
tcp_keepalive=yes
tcp_crlf_ping=yes
tcp_keepcnt=3
tcp_keepidle=30
tcp_keepintvl=30
tcp_connection_lifetime=3610
tcp_accept_no_cl=yes
tcp_accept_haproxy=yes
tcp_no_connect=yes

Thanks,
Joel.

On Thu, Nov 21, 2019 at 7:50 AM Joel Serrano  wrote:

> I don’t, but I’ll repeat the test with tcpdump active! I’ll report back
> shortly
>
> On Thu, Nov 21, 2019 at 03:50 Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> do you have the pcap with the sip traffic for this case?
>>
>> Cheers,
>> Daniel
>> On 20.11.19 19:45, Joel Serrano wrote:
>>
>> Hello,
>>
>> I added to the config file:
>>
>> tcp_no_connect=yes
>>
>> And with that param, the same test results in a different behavior, but
>> still not working:
>>
>> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} 
>> [core\/msg_translator.c:161]: check_via_address(): (198.1.54.228,
>> 198.1.54.228, 0)"}
>> "message":" ERROR: {1 12583750 BYE RVXZVMHKop} tm
>> [..\/..\/core\/forward.h:292]: msg_send_buffer(): tcp_send failed"}
>> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_fwd.c:1537]:
>> t_send_branch(): send to 35.191.9.20:56470 (3) failed"}
>> "message":" WARNING: {1 12583750 BYE RVXZVMHKop} tm [t_fwd.c:1557]:
>> t_send_branch(): sending request on branch 0 failed"}
>> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_funcs.c:336]:
>> t_relay_to(): t_forward_nonack returned error -1 (-477)"}
>> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_funcs.c:354]:
>> t_relay_to(): -477 error reply generation delayed "}
>>
>> Although, netstats says the connection is active:
>>
>> root@sbc-gslb-test-1:~# netstat -putan | grep 56470
>> tcp0  0 10.116.15.237:443   35.191.9.20:56470
>> ESTABLISHED 3920/kamailio
>> root@sbc-gslb-test-1:~#
>>
>>
>> Anyone?
>>
>> On Wed, Nov 20, 2019 at 9:26 AM Joel Serrano  wrote:
>>
>>> Bumping this thread up!
>>>
>>> I did some more tests trying to narrow down the problem and this is what
>>> I found...:
>>>
>>> On the INVITE, I add the TCP connection information I want to save (for
>>> later reuse). Snippets:
>>>
>>> ...(found this in the misc/examples/pkg/sip-router-oob.cfg, but I
>>> haven't noticed any changes to the headers or anything)...
>>>
>>> # Force response to received connection
>>> force_rport();
>>> if (proto==TCP || proto == TLS) {
>>> force_tcp_alias();
>>> xlog("L_NOTICE", "force_tcp_alias() done");
>>> }
>>> ...
>>>
>>> ...(I also have this)...
>>>
>>> if (is_first_hop()) {
>>> xlog("L_NOTICE", "Adding LB info to contact - M=$rm ID=$ci\n");
>>> add_contact_alias("$tcp(c_si)", "$tcp(c_sp)", "tls");
>>> }
>>> ...
>>>
>>> Which effectively makes the contact look like:
>>>
>>>
>>> 
>>>
>>> ..180..
>>> ..200 OK..
>>> ..ACK..
>>>
>>> Then, callee ends the call (so the BYE comes from callee to caller),
>>> when I run handle_ruri_alias() I see in the logs that the everything is
>>> handled correctly:
>>>
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} nathelper
>>> [nathelper.c:1144]: handle_ruri_alias(): setting dst_uri to
>>> "}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} nathelper
>>> [nathelper.c:1166]: handle_ruri_alias(): rewriting r-uri to
>>> "}
>>>
>>> But then, Kamalio won't reuse the existing TCP connection and tries to
>>> create a new one:
>>>
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:1328]:
>>> t_newtran(): msg (0x7f85883b14c8) id=27\/1974 global id=25\/1974 T
>>> start=0x"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:497]:
>>> t_lookup_request(): start searching: hash=63128, isACK=0"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:455]:
>>> matching_3261(): RFC3261 transaction matching failed - via branch
>>> [z9hG4bK896f.dc04734743b0f0997f39c4fff07c0fbb.0]"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:675]:
>>> t_lookup_request(): no transaction found"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_hooks.c:336]:
>>> run_reqin_callbacks_internal(): trans=0x7f8583b17208, callback type 1, id 0
>>> entered"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
>>> [core\/crypto\/md5utils.c:67]: MD5StringArray(): MD5 calculated:
>>> 71c229aff3c0b4f6e9e77c4990b74e5e"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} siputils [checks.c:123]:
>>> has_totag(): totag found"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} rr [loose.c:1095]:
>>> check_route_param(): route params checking against
>>> [;r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes] (orig:
>>> [r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes])"}
>>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} rr [loose.c:1101]:
>>> check_route_param(): params are
>>> <;r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes>"}
>>> "message":" DEBUG: {1 

[SR-Users] How to access different uris in a header

2019-11-21 Thread Duarte Rocha
Greetings,

In order to identify Redirecting Number and Original Called Number on a
given request i look for the top( Redirecting Number) and bottom (Original
Called) Diversion headers using hdr(Diversion)[0] and hdr(Diversion)[-1].

However, i have a client that sends me all the Diversions URIS in the same
header. Does kamailio has a similar tool for accessing the different URIS
in the header?

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


Re: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Sergey Safarov
Just pushed fix to rpm.kamailio.org

On Thu, Nov 21, 2019 at 6:44 PM Karsten Horsmann 
wrote:

> Thanks Sergey.
>
> Btw the same issue I reported at the end of October. Super that's fixed
> now.
>
> Cheers
> Karsten Horsmann
>
> Sergey Safarov  schrieb am Do., 21. Nov. 2019, 16:08:
>
>> fixed on OBS
>> today will fix on rpm.kamailio.org
>>
>> On Thu, Nov 21, 2019 at 5:32 PM Sergey Safarov 
>> wrote:
>>
>>> yes, I can confirm issue with master and 5.3 branch.
>>> During short time i will create fix on OBS to build RPM
>>>
>>> Issue already fixed for master and 5.3 branches.
>>>
>>> Sergey
>>>
>>>
>>> On Thu, Nov 21, 2019 at 3:53 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
 Hello,

 I think the same spec files are used, maybe Sergey can confirm that.

 On the other hand, the migration was not officially done. The v5.3.1
 rpms were built on opensuse service.

 To move forward with the migrarion: there has to be a request for
 testing of the new repo and if all ok, then we can announce it as an
 official repo. Moreover, Servey was still working on adding nightly builds,
 iirc, that's the reason I wasn't pushing the announcement of the new repo.

 Cheers,
 Daniel
 On 21.11.19 13:29, Henning Westerholt wrote:

 Hello Zach,



 the respositories were moved from openSUSE build service to
 rpm.kamailio.org – probably the wiki docs needs some updates.



 In the majority of cases I use the provided repositories, some people
 compile from source as well (both “pure” and with their own package
 building service).



 Cheers,



 Henning



 --

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

 Kamailio services – https://gilawa.com

 Kamailio Merchandising – https://skalatan.de/merchandising



 *From:* sr-users 
  *On Behalf Of *Zach Nielsen
 *Sent:* Thursday, November 21, 2019 2:45 AM
 *To:* sr-users@lists.kamailio.org
 *Subject:* [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23
 Dependency?



 Hi all,



 Working with some of our Centos-based Kamailio boxes lately has
 produced a strange result when using the provided yum repos (
 download.opensuse.org). When trying to yum update the system or
 install some additional modules, we're getting feedback from yum indicating
 that it's expecting /usr/bin/python23



 --> Finished Dependency Resolution
 Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
Requires: /usr/bin/python23
  You could try using --skip-broken to work around the problem
  You could try running: rpm -Va --nofiles --nodigest





 Tried my best to do my due diligence here to make sure there was
 nothing up with our local env that was causing this, but this issue
 persists across multiple systems, including a new (no frills) one that we
 just build out.



 Can I get some confirmation if this is a "me" issue, or if maybe
 there's an issue with what made it into the repo? Also, just a general
 question... what's the typical way of you folks deploying Kamailio from a
 sysadmin perspective? Do you generally compile from source, or do any of
 you use the provided repositories to manage it?



 Thanks!

 Zach

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

 --
 Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
 www.linkedin.com/in/miconda
 Kamailio World Conference - April 27-29, 2020, in Berlin -- 
 www.kamailioworld.com

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

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


Re: [SR-Users] Problem with max tcp connections

2019-11-21 Thread Daniel Tryba
On Thu, Nov 21, 2019 at 02:46:39PM +0100, Jose Fco. Irles Dur?? wrote:
> Hi
> 
> I have a kamailio 5.1.2 as load balancer and registration offloading,
> but I have a problem with the max tcp connections that it can handle.
> I suspect that is a linux limit, but I don't find the reason or config.
> When that limit arrives, I can't connect to kamailio and I receive
> "Connection reset by peer", but I can't view any error message in the
> logs.

I experienced the same with versions pre 5.1.9. It hasn't happened to me
with 5.1.9 yet, so I cannot say it was fixed. Additional changes I
applied where some sysctl tweaks:

net.core.somaxconn = 128
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_max_tw_buckets = 4096
net.ipv4.ip_local_port_range = 4096 65534
net.ipv4.tcp_syncookies = 0


Again, not really sure if these are related.


___
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 max tcp connections

2019-11-21 Thread Jose Fco . Irles Durá
I thought that the 5.1.2 is the latest release in this branch, sorry.

First I will upgrade to the latest version (5.1.9) and if the problem
persists, I'll resend the email.

Best regards

El jue., 21 nov. 2019 a las 14:46, Jose Fco. Irles Durá
() escribió:
>
> Hi
>
> I have a kamailio 5.1.2 as load balancer and registration offloading,
> but I have a problem with the max tcp connections that it can handle.
> I suspect that is a linux limit, but I don't find the reason or config.
> When that limit arrives, I can't connect to kamailio and I receive
> "Connection reset by peer", but I can't view any error message in the
> logs.
>
> If I check the connections in kamailio, I view that it have "free" 
> connections:
> # kamctl kamcmd core.tcp_info
> {
> readers: 8
> max_connections: 4096
> max_tls_connections: 2048
> opened_connections: 2655
> opened_tls_connections: 0
> write_queued_bytes: 0
> }
>
>
> I have this configs in kamailio.conf (related to tcp)
> disable_tcp=no
> tcp_connection_lifetime=3610
> tcp_connect_timeout=5
> tcp_crlf_ping=yes
> tcp_accept_aliases=no
> tcp_keepalive=yes
> tcp_keepidle=5
> tcp_rd_buf_size=65536
> tcp_conn_wq_max=131072
> mlock_pages=yes
> shm_force_alloc=yes
> tcp_max_connections=4096
>
> The shm memory to 256 and the pkg memory to 32.
>
> And, following this doc:
> https://github.com/kamailio/kamailio/blob/master/doc/tutorials/tcp_tunning.txt
> I have setted this values:
> net.ipv4.ip_local_port_range = 1024 65535
> net.core.somaxconn = 65535
> net.core.netdev_max_backlog = 182757
>
> Also, I had checked the limits for the main process pid:
> Limit Soft Limit   Hard Limit   Units
> Max cpu time  unlimitedunlimitedseconds
> Max file size unlimitedunlimitedbytes
> Max data size unlimitedunlimitedbytes
> Max stack size8388608  unlimitedbytes
> Max core file sizeunlimitedunlimitedbytes
> Max resident set  unlimitedunlimitedbytes
> Max processes unlimitedunlimitedprocesses
> Max open files1048576  1048576  files
> Max locked memory 16777216 16777216 bytes
> Max address space unlimitedunlimitedbytes
> Max file locksunlimitedunlimitedlocks
> Max pending signals   386297   386297   signals
> Max msgqueue size 819200   819200   bytes
> Max nice priority 00
> Max realtime priority 00
> Max realtime timeout  unlimitedunlimitedus
>
> The service is running inside a lxc container, without any resource
> limit, connected to the outside word throught macvlan interface.
>
> Where can I find problem source?
>
>
> Best regards



-- 
Jose Fco. Irles Durá

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


Re: [SR-Users] Re-use TCP connections on different transactions

2019-11-21 Thread Joel Serrano
I don’t, but I’ll repeat the test with tcpdump active! I’ll report back
shortly

On Thu, Nov 21, 2019 at 03:50 Daniel-Constantin Mierla 
wrote:

> Hello,
>
> do you have the pcap with the sip traffic for this case?
>
> Cheers,
> Daniel
> On 20.11.19 19:45, Joel Serrano wrote:
>
> Hello,
>
> I added to the config file:
>
> tcp_no_connect=yes
>
> And with that param, the same test results in a different behavior, but
> still not working:
>
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} 
> [core\/msg_translator.c:161]: check_via_address(): (198.1.54.228,
> 198.1.54.228, 0)"}
> "message":" ERROR: {1 12583750 BYE RVXZVMHKop} tm
> [..\/..\/core\/forward.h:292]: msg_send_buffer(): tcp_send failed"}
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_fwd.c:1537]:
> t_send_branch(): send to 35.191.9.20:56470 (3) failed"}
> "message":" WARNING: {1 12583750 BYE RVXZVMHKop} tm [t_fwd.c:1557]:
> t_send_branch(): sending request on branch 0 failed"}
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_funcs.c:336]:
> t_relay_to(): t_forward_nonack returned error -1 (-477)"}
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_funcs.c:354]:
> t_relay_to(): -477 error reply generation delayed "}
>
> Although, netstats says the connection is active:
>
> root@sbc-gslb-test-1:~# netstat -putan | grep 56470
> tcp0  0 10.116.15.237:443   35.191.9.20:56470
> ESTABLISHED 3920/kamailio
> root@sbc-gslb-test-1:~#
>
>
> Anyone?
>
> On Wed, Nov 20, 2019 at 9:26 AM Joel Serrano  wrote:
>
>> Bumping this thread up!
>>
>> I did some more tests trying to narrow down the problem and this is what
>> I found...:
>>
>> On the INVITE, I add the TCP connection information I want to save (for
>> later reuse). Snippets:
>>
>> ...(found this in the misc/examples/pkg/sip-router-oob.cfg, but I haven't
>> noticed any changes to the headers or anything)...
>>
>> # Force response to received connection
>> force_rport();
>> if (proto==TCP || proto == TLS) {
>> force_tcp_alias();
>> xlog("L_NOTICE", "force_tcp_alias() done");
>> }
>> ...
>>
>> ...(I also have this)...
>>
>> if (is_first_hop()) {
>> xlog("L_NOTICE", "Adding LB info to contact - M=$rm ID=$ci\n");
>> add_contact_alias("$tcp(c_si)", "$tcp(c_sp)", "tls");
>> }
>> ...
>>
>> Which effectively makes the contact look like:
>>
>>
>> 
>>
>> ..180..
>> ..200 OK..
>> ..ACK..
>>
>> Then, callee ends the call (so the BYE comes from callee to caller), when
>> I run handle_ruri_alias() I see in the logs that the everything is handled
>> correctly:
>>
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} nathelper
>> [nathelper.c:1144]: handle_ruri_alias(): setting dst_uri to
>> "}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} nathelper
>> [nathelper.c:1166]: handle_ruri_alias(): rewriting r-uri to
>> "}
>>
>> But then, Kamalio won't reuse the existing TCP connection and tries to
>> create a new one:
>>
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:1328]:
>> t_newtran(): msg (0x7f85883b14c8) id=27\/1974 global id=25\/1974 T
>> start=0x"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:497]:
>> t_lookup_request(): start searching: hash=63128, isACK=0"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:455]:
>> matching_3261(): RFC3261 transaction matching failed - via branch
>> [z9hG4bK896f.dc04734743b0f0997f39c4fff07c0fbb.0]"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_lookup.c:675]:
>> t_lookup_request(): no transaction found"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_hooks.c:336]:
>> run_reqin_callbacks_internal(): trans=0x7f8583b17208, callback type 1, id 0
>> entered"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
>> [core\/crypto\/md5utils.c:67]: MD5StringArray(): MD5 calculated:
>> 71c229aff3c0b4f6e9e77c4990b74e5e"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} siputils [checks.c:123]:
>> has_totag(): totag found"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} rr [loose.c:1095]:
>> check_route_param(): route params checking against
>> [;r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes] (orig:
>> [r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes])"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} rr [loose.c:1101]:
>> check_route_param(): params are
>> <;r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes>"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} siputils [checks.c:123]:
>> has_totag(): totag found"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
>> [core\/msg_translator.c:161]: check_via_address(): (198.1.54.228,
>> 198.1.54.228, 0)"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
>> [core\/tcp_main.c:2060]: tcp_send(): no open tcp connection found, opening
>> new one"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
>> [core\/ip_addr.c:229]: print_ip(): tcpconn_new: new tcp connection:
>> 35.191.9.21"}
>> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
>> [core\/tcp_main.c:1242]: 

Re: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Karsten Horsmann
Thanks Sergey.

Btw the same issue I reported at the end of October. Super that's fixed
now.

Cheers
Karsten Horsmann

Sergey Safarov  schrieb am Do., 21. Nov. 2019, 16:08:

> fixed on OBS
> today will fix on rpm.kamailio.org
>
> On Thu, Nov 21, 2019 at 5:32 PM Sergey Safarov 
> wrote:
>
>> yes, I can confirm issue with master and 5.3 branch.
>> During short time i will create fix on OBS to build RPM
>>
>> Issue already fixed for master and 5.3 branches.
>>
>> Sergey
>>
>>
>> On Thu, Nov 21, 2019 at 3:53 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I think the same spec files are used, maybe Sergey can confirm that.
>>>
>>> On the other hand, the migration was not officially done. The v5.3.1
>>> rpms were built on opensuse service.
>>>
>>> To move forward with the migrarion: there has to be a request for
>>> testing of the new repo and if all ok, then we can announce it as an
>>> official repo. Moreover, Servey was still working on adding nightly builds,
>>> iirc, that's the reason I wasn't pushing the announcement of the new repo.
>>>
>>> Cheers,
>>> Daniel
>>> On 21.11.19 13:29, Henning Westerholt wrote:
>>>
>>> Hello Zach,
>>>
>>>
>>>
>>> the respositories were moved from openSUSE build service to
>>> rpm.kamailio.org – probably the wiki docs needs some updates.
>>>
>>>
>>>
>>> In the majority of cases I use the provided repositories, some people
>>> compile from source as well (both “pure” and with their own package
>>> building service).
>>>
>>>
>>>
>>> Cheers,
>>>
>>>
>>>
>>> Henning
>>>
>>>
>>>
>>> --
>>>
>>> Henning Westerholt – https://skalatan.de/blog/
>>>
>>> Kamailio services – https://gilawa.com
>>>
>>> Kamailio Merchandising – https://skalatan.de/merchandising
>>>
>>>
>>>
>>> *From:* sr-users 
>>>  *On Behalf Of *Zach Nielsen
>>> *Sent:* Thursday, November 21, 2019 2:45 AM
>>> *To:* sr-users@lists.kamailio.org
>>> *Subject:* [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23
>>> Dependency?
>>>
>>>
>>>
>>> Hi all,
>>>
>>>
>>>
>>> Working with some of our Centos-based Kamailio boxes lately has produced
>>> a strange result when using the provided yum repos (
>>> download.opensuse.org). When trying to yum update the system or install
>>> some additional modules, we're getting feedback from yum indicating that
>>> it's expecting /usr/bin/python23
>>>
>>>
>>>
>>> --> Finished Dependency Resolution
>>> Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
>>>Requires: /usr/bin/python23
>>>  You could try using --skip-broken to work around the problem
>>>  You could try running: rpm -Va --nofiles --nodigest
>>>
>>>
>>>
>>>
>>>
>>> Tried my best to do my due diligence here to make sure there was nothing
>>> up with our local env that was causing this, but this issue persists across
>>> multiple systems, including a new (no frills) one that we just build out.
>>>
>>>
>>>
>>> Can I get some confirmation if this is a "me" issue, or if maybe there's
>>> an issue with what made it into the repo? Also, just a general question...
>>> what's the typical way of you folks deploying Kamailio from a sysadmin
>>> perspective? Do you generally compile from source, or do any of you use the
>>> provided repositories to manage it?
>>>
>>>
>>>
>>> Thanks!
>>>
>>> Zach
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing 
>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>>> www.linkedin.com/in/miconda
>>> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
>>> www.kamailioworld.com
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Sergey Safarov
fixed on OBS
today will fix on rpm.kamailio.org

On Thu, Nov 21, 2019 at 5:32 PM Sergey Safarov  wrote:

> yes, I can confirm issue with master and 5.3 branch.
> During short time i will create fix on OBS to build RPM
>
> Issue already fixed for master and 5.3 branches.
>
> Sergey
>
>
> On Thu, Nov 21, 2019 at 3:53 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> I think the same spec files are used, maybe Sergey can confirm that.
>>
>> On the other hand, the migration was not officially done. The v5.3.1 rpms
>> were built on opensuse service.
>>
>> To move forward with the migrarion: there has to be a request for testing
>> of the new repo and if all ok, then we can announce it as an official repo.
>> Moreover, Servey was still working on adding nightly builds, iirc, that's
>> the reason I wasn't pushing the announcement of the new repo.
>>
>> Cheers,
>> Daniel
>> On 21.11.19 13:29, Henning Westerholt wrote:
>>
>> Hello Zach,
>>
>>
>>
>> the respositories were moved from openSUSE build service to
>> rpm.kamailio.org – probably the wiki docs needs some updates.
>>
>>
>>
>> In the majority of cases I use the provided repositories, some people
>> compile from source as well (both “pure” and with their own package
>> building service).
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>> Kamailio Merchandising – https://skalatan.de/merchandising
>>
>>
>>
>> *From:* sr-users 
>>  *On Behalf Of *Zach Nielsen
>> *Sent:* Thursday, November 21, 2019 2:45 AM
>> *To:* sr-users@lists.kamailio.org
>> *Subject:* [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23
>> Dependency?
>>
>>
>>
>> Hi all,
>>
>>
>>
>> Working with some of our Centos-based Kamailio boxes lately has produced
>> a strange result when using the provided yum repos (download.opensuse.org).
>> When trying to yum update the system or install some additional modules,
>> we're getting feedback from yum indicating that it's expecting
>> /usr/bin/python23
>>
>>
>>
>> --> Finished Dependency Resolution
>> Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
>>Requires: /usr/bin/python23
>>  You could try using --skip-broken to work around the problem
>>  You could try running: rpm -Va --nofiles --nodigest
>>
>>
>>
>>
>>
>> Tried my best to do my due diligence here to make sure there was nothing
>> up with our local env that was causing this, but this issue persists across
>> multiple systems, including a new (no frills) one that we just build out.
>>
>>
>>
>> Can I get some confirmation if this is a "me" issue, or if maybe there's
>> an issue with what made it into the repo? Also, just a general question...
>> what's the typical way of you folks deploying Kamailio from a sysadmin
>> perspective? Do you generally compile from source, or do any of you use the
>> provided repositories to manage it?
>>
>>
>>
>> Thanks!
>>
>> Zach
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
>> www.kamailioworld.com
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Sergey Safarov
yes, I can confirm issue with master and 5.3 branch.
During short time i will create fix on OBS to build RPM

Issue already fixed for master and 5.3 branches.

Sergey


On Thu, Nov 21, 2019 at 3:53 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> I think the same spec files are used, maybe Sergey can confirm that.
>
> On the other hand, the migration was not officially done. The v5.3.1 rpms
> were built on opensuse service.
>
> To move forward with the migrarion: there has to be a request for testing
> of the new repo and if all ok, then we can announce it as an official repo.
> Moreover, Servey was still working on adding nightly builds, iirc, that's
> the reason I wasn't pushing the announcement of the new repo.
>
> Cheers,
> Daniel
> On 21.11.19 13:29, Henning Westerholt wrote:
>
> Hello Zach,
>
>
>
> the respositories were moved from openSUSE build service to
> rpm.kamailio.org – probably the wiki docs needs some updates.
>
>
>
> In the majority of cases I use the provided repositories, some people
> compile from source as well (both “pure” and with their own package
> building service).
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
> Kamailio Merchandising – https://skalatan.de/merchandising
>
>
>
> *From:* sr-users 
>  *On Behalf Of *Zach Nielsen
> *Sent:* Thursday, November 21, 2019 2:45 AM
> *To:* sr-users@lists.kamailio.org
> *Subject:* [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23
> Dependency?
>
>
>
> Hi all,
>
>
>
> Working with some of our Centos-based Kamailio boxes lately has produced a
> strange result when using the provided yum repos (download.opensuse.org).
> When trying to yum update the system or install some additional modules,
> we're getting feedback from yum indicating that it's expecting
> /usr/bin/python23
>
>
>
> --> Finished Dependency Resolution
> Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
>Requires: /usr/bin/python23
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest
>
>
>
>
>
> Tried my best to do my due diligence here to make sure there was nothing
> up with our local env that was causing this, but this issue persists across
> multiple systems, including a new (no frills) one that we just build out.
>
>
>
> Can I get some confirmation if this is a "me" issue, or if maybe there's
> an issue with what made it into the repo? Also, just a general question...
> what's the typical way of you folks deploying Kamailio from a sysadmin
> perspective? Do you generally compile from source, or do any of you use the
> provided repositories to manage it?
>
>
>
> Thanks!
>
> Zach
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
> www.kamailioworld.com
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Problem with max tcp connections

2019-11-21 Thread Jose Fco . Irles Durá
Hi

I have a kamailio 5.1.2 as load balancer and registration offloading,
but I have a problem with the max tcp connections that it can handle.
I suspect that is a linux limit, but I don't find the reason or config.
When that limit arrives, I can't connect to kamailio and I receive
"Connection reset by peer", but I can't view any error message in the
logs.

If I check the connections in kamailio, I view that it have "free" connections:
# kamctl kamcmd core.tcp_info
{
readers: 8
max_connections: 4096
max_tls_connections: 2048
opened_connections: 2655
opened_tls_connections: 0
write_queued_bytes: 0
}


I have this configs in kamailio.conf (related to tcp)
disable_tcp=no
tcp_connection_lifetime=3610
tcp_connect_timeout=5
tcp_crlf_ping=yes
tcp_accept_aliases=no
tcp_keepalive=yes
tcp_keepidle=5
tcp_rd_buf_size=65536
tcp_conn_wq_max=131072
mlock_pages=yes
shm_force_alloc=yes
tcp_max_connections=4096

The shm memory to 256 and the pkg memory to 32.

And, following this doc:
https://github.com/kamailio/kamailio/blob/master/doc/tutorials/tcp_tunning.txt
I have setted this values:
net.ipv4.ip_local_port_range = 1024 65535
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 182757

Also, I had checked the limits for the main process pid:
Limit Soft Limit   Hard Limit   Units
Max cpu time  unlimitedunlimitedseconds
Max file size unlimitedunlimitedbytes
Max data size unlimitedunlimitedbytes
Max stack size8388608  unlimitedbytes
Max core file sizeunlimitedunlimitedbytes
Max resident set  unlimitedunlimitedbytes
Max processes unlimitedunlimitedprocesses
Max open files1048576  1048576  files
Max locked memory 16777216 16777216 bytes
Max address space unlimitedunlimitedbytes
Max file locksunlimitedunlimitedlocks
Max pending signals   386297   386297   signals
Max msgqueue size 819200   819200   bytes
Max nice priority 00
Max realtime priority 00
Max realtime timeout  unlimitedunlimitedus

The service is running inside a lxc container, without any resource
limit, connected to the outside word throught macvlan interface.

Where can I find problem source?


Best regards

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


Re: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Daniel-Constantin Mierla
Hello,

I think the same spec files are used, maybe Sergey can confirm that.

On the other hand, the migration was not officially done. The v5.3.1
rpms were built on opensuse service.

To move forward with the migrarion: there has to be a request for
testing of the new repo and if all ok, then we can announce it as an
official repo. Moreover, Servey was still working on adding nightly
builds, iirc, that's the reason I wasn't pushing the announcement of the
new repo.

Cheers,
Daniel

On 21.11.19 13:29, Henning Westerholt wrote:
>
> Hello Zach,
>
>  
>
> the respositories were moved from openSUSE build service to
> rpm.kamailio.org – probably the wiki docs needs some updates.
>
>  
>
> In the majority of cases I use the provided repositories, some people
> compile from source as well (both “pure” and with their own package
> building service).
>
>  
>
> Cheers,
>
>  
>
> Henning
>
>  
>
> -- 
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com 
>
> Kamailio Merchandising – https://skalatan.de/merchandising
>
>  
>
> *From:* sr-users  *On Behalf Of
> *Zach Nielsen
> *Sent:* Thursday, November 21, 2019 2:45 AM
> *To:* sr-users@lists.kamailio.org
> *Subject:* [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23
> Dependency?
>
>  
>
> Hi all,
>
>  
>
> Working with some of our Centos-based Kamailio boxes lately has
> produced a strange result when using the provided yum repos
> (download.opensuse.org ). When trying to
> yum update the system or install some additional modules, we're
> getting feedback from yum indicating that it's expecting /usr/bin/python23
>
>  
>
> --> Finished Dependency Resolution
> Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
>            Requires: /usr/bin/python23
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest
>
>  
>
>  
>
> Tried my best to do my due diligence here to make sure there was
> nothing up with our local env that was causing this, but this issue
> persists across multiple systems, including a new (no frills) one that
> we just build out.
>
>  
>
> Can I get some confirmation if this is a "me" issue, or if maybe
> there's an issue with what made it into the repo? Also, just a general
> question... what's the typical way of you folks deploying Kamailio
> from a sysadmin perspective? Do you generally compile from source, or
> do any of you use the provided repositories to manage it?
>
>  
>
> Thanks!
>
> Zach
>
>
> ___
> 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 - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com

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


Re: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Henning Westerholt
Hello Zach,

the respositories were moved from openSUSE build service to rpm.kamailio.org – 
probably the wiki docs needs some updates.

In the majority of cases I use the provided repositories, some people compile 
from source as well (both “pure” and with their own package building service).

Cheers,

Henning

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

From: sr-users  On Behalf Of Zach Nielsen
Sent: Thursday, November 21, 2019 2:45 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

Hi all,

Working with some of our Centos-based Kamailio boxes lately has produced a 
strange result when using the provided yum repos 
(download.opensuse.org). When trying to yum 
update the system or install some additional modules, we're getting feedback 
from yum indicating that it's expecting /usr/bin/python23

--> Finished Dependency Resolution
Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
   Requires: /usr/bin/python23
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest


Tried my best to do my due diligence here to make sure there was nothing up 
with our local env that was causing this, but this issue persists across 
multiple systems, including a new (no frills) one that we just build out.

Can I get some confirmation if this is a "me" issue, or if maybe there's an 
issue with what made it into the repo? Also, just a general question... what's 
the typical way of you folks deploying Kamailio from a sysadmin perspective? Do 
you generally compile from source, or do any of you use the provided 
repositories to manage it?

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


Re: [SR-Users] Re-use TCP connections on different transactions

2019-11-21 Thread Daniel-Constantin Mierla
Hello,

do you have the pcap with the sip traffic for this case?

Cheers,
Daniel

On 20.11.19 19:45, Joel Serrano wrote:
> Hello,
>
> I added to the config file:
>
> tcp_no_connect=yes
>
> And with that param, the same test results in a different behavior,
> but still not working:
>
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} 
> [core\/msg_translator.c:161]: check_via_address(): (198.1.54.228,
> 198.1.54.228, 0)"}
> "message":" ERROR: {1 12583750 BYE RVXZVMHKop} tm
> [..\/..\/core\/forward.h:292]: msg_send_buffer(): tcp_send failed"}
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_fwd.c:1537]:
> t_send_branch(): send to 35.191.9.20:56470 
> (3) failed"}
> "message":" WARNING: {1 12583750 BYE RVXZVMHKop} tm [t_fwd.c:1557]:
> t_send_branch(): sending request on branch 0 failed"}
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_funcs.c:336]:
> t_relay_to(): t_forward_nonack returned error -1 (-477)"}
> "message":" DEBUG: {1 12583750 BYE RVXZVMHKop} tm [t_funcs.c:354]:
> t_relay_to(): -477 error reply generation delayed "}
>
> Although, netstats says the connection is active:
>
> root@sbc-gslb-test-1:~# netstat -putan | grep 56470
> tcp        0      0 10.116.15.237:443       
> 35.191.9.20:56470        ESTABLISHED
> 3920/kamailio
> root@sbc-gslb-test-1:~#
>
>
> Anyone?
>
> On Wed, Nov 20, 2019 at 9:26 AM Joel Serrano  > wrote:
>
> Bumping this thread up!
>
> I did some more tests trying to narrow down the problem and this
> is what I found...:
>
> On the INVITE, I add the TCP connection information I want to save
> (for later reuse). Snippets:
>
> ...(found this in the misc/examples/pkg/sip-router-oob.cfg, but I
> haven't noticed any changes to the headers or anything)...
>
>     # Force response to received connection
>     force_rport();
>     if (proto==TCP || proto == TLS) {
>         force_tcp_alias();
>         xlog("L_NOTICE", "force_tcp_alias() done");
>     }
> ...
>
> ...(I also have this)...
>
>     if (is_first_hop()) {
>         xlog("L_NOTICE", "Adding LB info to contact - M=$rm
> ID=$ci\n");
>         add_contact_alias("$tcp(c_si)", "$tcp(c_sp)", "tls");
>     }
> ...
>
> Which effectively makes the contact look like:
>
> 
> 
>
> ..180..
> ..200 OK..
> ..ACK..
>
> Then, callee ends the call (so the BYE comes from callee to
> caller), when I run handle_ruri_alias() I see in the logs that the
> everything is handled correctly:
>
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} nathelper
> [nathelper.c:1144]: handle_ruri_alias(): setting dst_uri to
> "}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} nathelper
> [nathelper.c:1166]: handle_ruri_alias(): rewriting r-uri to
> "}
>
> But then, Kamalio won't reuse the existing TCP connection and
> tries to create a new one:
>
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm
> [t_lookup.c:1328]: t_newtran(): msg (0x7f85883b14c8) id=27\/1974
> global id=25\/1974 T start=0x"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm
> [t_lookup.c:497]: t_lookup_request(): start searching: hash=63128,
> isACK=0"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm
> [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching
> failed - via branch [z9hG4bK896f.dc04734743b0f0997f39c4fff07c0fbb.0]"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm
> [t_lookup.c:675]: t_lookup_request(): no transaction found"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} tm [t_hooks.c:336]:
> run_reqin_callbacks_internal(): trans=0x7f8583b17208, callback
> type 1, id 0 entered"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
> [core\/crypto\/md5utils.c:67]: MD5StringArray(): MD5 calculated:
> 71c229aff3c0b4f6e9e77c4990b74e5e"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} siputils
> [checks.c:123]: has_totag(): totag found"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} rr [loose.c:1095]:
> check_route_param(): route params checking against
> [;r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes] (orig:
> [r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes])"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} rr [loose.c:1101]:
> check_route_param(): params are
> <;r2=on;lr=on;ftag=tAsjXhyIX;did=7d1.e6a2;nat=yes>"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} siputils
> [checks.c:123]: has_totag(): totag found"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
> [core\/msg_translator.c:161]: check_via_address(): (198.1.54.228,
> 198.1.54.228, 0)"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
> [core\/tcp_main.c:2060]: tcp_send(): no open tcp connection found,
> opening new one"}
> "message":" DEBUG: {1 12543376 BYE QQy-qagkcB} 
> 

[SR-Users] kamailio IMS supporting VOLTE

2019-11-21 Thread Shubhendu Das
Hi ,

 

I have a query regarding Kamailio open source SIP server.

Does it have any release, where its supports the feature of IMS supporting
VOLTE with real commercial mobile phones(IMSI based) ?

 

If so, what is the release number ? Please also let me know about the
supported mobile phones list.

 

BR,

Shubhendu

 


-- 
_Disclaimer: This email and any files transmitted along with it may contain 
Azcom confidential and proprietary information.  If you are not the 
intended recipient, you are notified that disclosing, copying, distributing 
or taking any action based on the contents of the information contained 
herein is strictly prohibited. If you are not an intended recipient of this 
transmission and you received it in error, please inform the sender by 
reply e-mail and destroy this and all other copies of this transmission to 
which you have access. The sender of this email or Azcom does not accept 
liability for any errors or omissions in the contents of this message that 
may occur as a result._
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] CentOS Repo for Kamailio 5.3 - Strange Python23 Dependency?

2019-11-21 Thread Zach Nielsen
Hi all,

Working with some of our Centos-based Kamailio boxes lately has produced a
strange result when using the provided yum repos (download.opensuse.org).
When trying to yum update the system or install some additional modules,
we're getting feedback from yum indicating that it's expecting
/usr/bin/python23

--> Finished Dependency Resolution
Error: Package: kamailio-5.3.1-3.1.x86_64 (home_kamailio_v5.3.x-rpms)
   Requires: /usr/bin/python23
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest


Tried my best to do my due diligence here to make sure there was nothing up
with our local env that was causing this, but this issue persists across
multiple systems, including a new (no frills) one that we just build out.

Can I get some confirmation if this is a "me" issue, or if maybe there's an
issue with what made it into the repo? Also, just a general question...
what's the typical way of you folks deploying Kamailio from a sysadmin
perspective? Do you generally compile from source, or do any of you use the
provided repositories to manage it?

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


[SR-Users] Query regarding Kamailio Sip Server for IMS supporting VOLTE

2019-11-21 Thread Shubhendu Das
Hi ,

 

I have a query regarding Kamailio open source SIP server.

Does it have any release, where its supports the feature of IMS supporting
VOLTE with real commercial mobile phones(IMSI based) ?

 

If so, what is the release number ? Please also let me know about the
supported mobile phones list.

 

BR,

Shubhendu

 

 


-- 
_Disclaimer: This email and any files transmitted along with it may contain 
Azcom confidential and proprietary information.  If you are not the 
intended recipient, you are notified that disclosing, copying, distributing 
or taking any action based on the contents of the information contained 
herein is strictly prohibited. If you are not an intended recipient of this 
transmission and you received it in error, please inform the sender by 
reply e-mail and destroy this and all other copies of this transmission to 
which you have access. The sender of this email or Azcom does not accept 
liability for any errors or omissions in the contents of this message that 
may occur as a result._
___
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 retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread Grant Bagdasarian
Hi,

You can also inspect the SDP and look for private or public IPs and perform 
some logic based on that.

sdp_get_line_startswith("$avp(sdp_media_ip)", "c=");
if (is_ip_rfc1918("$(avp(sdp_media_ip){s.select,2, })")) {}

The delimiter for the transformation is an empty space in this case.

Hope this helps.

Regards,

Grant

From: sr-users  On Behalf Of David 
Villasmil
Sent: donderdag 21 november 2019 09:38
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] How to retrieve local socket that will be used to send 
a message from the branch route


[EXTERNAL EMAIL]
Hello,

I'm not sure this is the best or even the right way, but i do that by figuring 
out where the call is coming from.
In my case, an INVITE from an RFC1918 IP address will always be internal to 
external and vice versa.
 i.e.:

# If the Source IP is an RFC1918 address, it's coming from an internal 
endpoint, so the call is going out
if (is_ip_rfc1918("$si")) {
$dlg_var(rtp_direction) = "direction=internal direction=external";
} else {
$dlg_var(rtp_direction) = "direction=external direction=internal";
}

You may even check both origin and destination domain ($du) and configure 
rtpengine accordingly.

onsend_route {
xlog("L_ERR", "[onsend_route] Packet going to $du\n" );
if (is_ip_rfc1918("$si") && is_ip_rfc1918("$du") ) {
# call is internal to internal

} else if (is_ip_rfc1918("$si") && !is_ip_rfc1918("$du")) {
# call is internal to external

} else if (!is_ip_rfc1918("$si") && !is_ip_rfc1918("$du")) {
# call is external to external

} else if (!is_ip_rfc1918("$si") && is_ip_rfc1918("$du")) {
# call is external to internal
}
}

Hope that makes sense and help you a little.
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Nov 21, 2019 at 6:11 AM Patrick Wakano 
mailto:pwak...@gmail.com>> wrote:
Hello list,
Hope you are all doing well!

I am trying to figure out a way to retrieve the local socket the t_relay() has 
decided to use in a mhomed=1 env. Is there a way to do that? I couldn't find 
any variable other than the $snd ones that maybe have this info, but I am not 
using onsend_route anyway.
I am after this value because this is what I can use to figure out if I need to 
engage RTPEngine with parameters "external, internal", "external, external", 
"internal, external" or "internal, internal". In my case, my server is in 
between two networks, and calls can traverse or can be routed back to the same 
interface depending on what was decide by the LCR module. Signalling is fine, 
but engaging the RTPEngine must be done with the correct parameters to get the 
correct IPs in the SDP, other else I get one way audio in the call.

Any help is much appreciated!
Thank you!
Kind regards,
Patrick Wakano


___
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] Adding SIP Gateway Endpoint in Kamailio

2019-11-21 Thread Sujit Roy
Hello David

I have successfully installed kamailio with rtp proxy.

I also have added incoming sip endpoint as below

kamctl address add 1 XX.YY.ZZ.177  0

but when i am doing reload i m getting below output.

[root@unassigned ~]# kamctl address reload
which: no gdb in
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin/rtpproxy:/root/bin:/)
{
  "jsonrpc":  "2.0",
  "error":  {
"code": 500,
"message":  "Method Not Found"
  },
  "id": 10086
}

Can u please let me know what should I do now ?

Thanks


On Fri, Nov 15, 2019 at 10:52 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello,
>
> I already shared a pretty well explained tutorial.
>
> It's pretty straightforward starting from the default kamailio
> configuration
> https://github.com/kamailio/kamailio/blob/5.2/etc/kamailio.cfg (that's
> for 5.2, use whichever version you have)
> You need to install rtpproxy locally:
> https://blog.voipxswitch.com/2015/06/18/rtpproxy-compiling-installing-on-debian-8/
>
> Then you enable:
>
> #!define WITH_MYSQL
> #!define WITH_AUTH
> #!define WITH_NAT
> #!define WITH_PSTN
>
> Then you need to set the B server IP and port
>
> pstn.gw_ip = "B-SERVER-IP" desc "PSTN GW Address"
> pstn.gw_port = "B-SERVER-PORT" desc "PSTN GW Port"
>
> and add your users to the db via kamctl utility (you need to configure
> /etc/kamailio/kamctlrc)
>
> Hope that helps.
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
>
> On Fri, Nov 15, 2019 at 2:31 PM Sujit Roy  wrote:
>
>> Thanks for the good suggestion.
>>
>> Can you kindly suggest the configuration in kamailio for both A & B SIP
>> Gateway endpoint ?
>>
>> Thanks
>>
>> On Fri, Nov 15, 2019 at 7:31 PM David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>> If you're only using Asterisk as a media server, why use it? Why not
>>> just use rtpproxy or mediaproxy? it'd be much simpler and you'd achieve the
>>> same thing.
>>> Unless you need to do something specific in Asterisk, there's really no
>>> need.
>>>
>>> https://dopensource.com/2017/05/31/installing-configuring-rtpproxy/
>>>
>>> Should help you getting started.
>>>
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.w...@gmail.com
>>> phone: +34669448337
>>>
>>>
>>> On Fri, Nov 15, 2019 at 1:21 PM Sujit Roy  wrote:
>>>
 Hello

 Here is my call flow scenario.

 SIP Gateway (A)
 Kamailio (K)
 Asterisk (AST)
 SIP Gateway (B)

 Now i want to send calls from A -> B by using Asterisk as media server.
 Kamailio shall be used to authenticate A and allow A to send calls to B.

 What are the configurations i need to make in Kamailio and Asterisk ?

 Thanks in advance.

 --
 Regards
 ===
 Sujit Roy

 ___
 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
>>>
>>
>>
>> --
>> Regards
>> ===
>> Sujit Roy
>>
>> ___
>> 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
>


-- 
Regards
===
Sujit Roy
___
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 retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread Karsten Horsmann
Hi Patrick,

If you don't use tls at this moment, the config from sbc OS is also an good
example of using dispatcher with the socket params to select the right
sendsock and using vars to give rtpengine the right internal / external
directions. They use numbers for internal and external. To figure out where
the direction is, this config use pseudo vars for receiving local socket

https://github.com/voiceboys/sbcOS/blob/master/SbcOS/configs/voice/kamailio/kamailio.cfg#L450

Cheers
Karsten Horsmann

Patrick Wakano  schrieb am Do., 21. Nov. 2019, 07:11:

> Hello list,
> Hope you are all doing well!
>
> I am trying to figure out a way to retrieve the local socket the t_relay()
> has decided to use in a mhomed=1 env. Is there a way to do that? I couldn't
> find any variable other than the $snd ones that maybe have this info, but I
> am not using onsend_route anyway.
> I am after this value because this is what I can use to figure out if I
> need to engage RTPEngine with parameters "external, internal", "external,
> external", "internal, external" or "internal, internal". In my case, my
> server is in between two networks, and calls can traverse or can be routed
> back to the same interface depending on what was decide by the LCR module.
> Signalling is fine, but engaging the RTPEngine must be done with the
> correct parameters to get the correct IPs in the SDP, other else I get one
> way audio in the call.
>
> Any help is much appreciated!
> Thank you!
> Kind regards,
> Patrick Wakano
>
>
> ___
> 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 retrieve local socket that will be used to send a message from the branch route

2019-11-21 Thread David Villasmil
Hello,

I'm not sure this is the best or even the right way, but i do that by
figuring out where the call is coming from.
In my case, an INVITE from an RFC1918 IP address will always be internal to
external and vice versa.
 i.e.:

# If the Source IP is an RFC1918 address, it's coming from an internal
endpoint, so the call is going out
if (is_ip_rfc1918("$si")) {
$dlg_var(rtp_direction) = "direction=internal direction=external";
} else {
$dlg_var(rtp_direction) = "direction=external direction=internal";
}

You may even check both origin and destination domain ($du) and configure
rtpengine accordingly.

onsend_route {
xlog("L_ERR", "[onsend_route] Packet going to $du\n" );
if (is_ip_rfc1918("$si") && is_ip_rfc1918("$du") ) {
# call is internal to internal

} else if (is_ip_rfc1918("$si") && !is_ip_rfc1918("$du")) {
# call is internal to external

} else if (!is_ip_rfc1918("$si") && !is_ip_rfc1918("$du")) {
# call is external to external

} else if (!is_ip_rfc1918("$si") && is_ip_rfc1918("$du")) {
# call is external to internal
}
}

Hope that makes sense and help you a little.
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Nov 21, 2019 at 6:11 AM Patrick Wakano  wrote:

> Hello list,
> Hope you are all doing well!
>
> I am trying to figure out a way to retrieve the local socket the t_relay()
> has decided to use in a mhomed=1 env. Is there a way to do that? I couldn't
> find any variable other than the $snd ones that maybe have this info, but I
> am not using onsend_route anyway.
> I am after this value because this is what I can use to figure out if I
> need to engage RTPEngine with parameters "external, internal", "external,
> external", "internal, external" or "internal, internal". In my case, my
> server is in between two networks, and calls can traverse or can be routed
> back to the same interface depending on what was decide by the LCR module.
> Signalling is fine, but engaging the RTPEngine must be done with the
> correct parameters to get the correct IPs in the SDP, other else I get one
> way audio in the call.
>
> Any help is much appreciated!
> Thank you!
> Kind regards,
> Patrick Wakano
>
>
> ___
> 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