Re: [SR-Users] set_advertised_address

2018-12-05 Thread Daniel-Constantin Mierla
When a phone registers, its traffic comes to one of the two sockets.
When that phone is called, after lookup location, the socket associated
to the registration of the target user is selected. So you do not need
to do anything special for calling between phones.

When calling to a PSTN/foreign provider via a trunk or so, you can set
the socket to be used for outgoing leg via
$fs/force_send_sock()/set_send_sock(). Some modules such as dispatcher
have also the option to set the outgoing socket...

Cheers,
Daniel

On 05.12.18 23:04, Kjeld Flarup wrote:
>
> So I could do something like this:
>
> listen=192.168.2.9:5070 advertise 20.30.40.50:5070
> listen=192.168.2.9:5050
>
> However when I do an invite to 192.168.2.32, would Kamailio choose
> 5050 or 5070?
> Same when inviting to 40.40.40.40
>
> If I were to listen to another local IP, then the routing table in
> Linux could perhaps dictate which connection to use.
>
>
>  Med Liberalistiske Hilsner --
>Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
>Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
>
> On 12/5/18 6:10 PM, Sergiu Pojoga wrote:
>> For whatever reason my initial impression was if it was possible for
>> external devices to connect without port forwarding...
>>
>> I stand corrected.
>>
>>
>> On Wed, Dec 5, 2018 at 11:30 AM Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> It is not about an external network interface, but external
>> traffic/devices. The NAT in this case is a port forwarding
>> firewall, like Amazon or Google cloud, where you have a local
>> address on server and the firewall is forwarding by port all
>> traffic from an assigned public address.
>>
>> Such scenario is quite common in enterprise environment, the
>> devices on local network connect by private IP, and the external
>> devices connect to the firewall ip and this one does port forwarding.
>>
>> Cheers,
>> Daniel
>>
>> On 05.12.18 16:56, Sergiu Pojoga wrote:
>>> Slightly confused here... didn't he say that Kamailio and PBX
>>> are behind NAT? If so, what external interface are we talking about?
>>>
>>> On Wed, Dec 5, 2018 at 9:18 AM Daniel-Constantin Mierla
>>> mailto:mico...@gmail.com>> wrote:
>>>
>>> Hello,
>>>
>>> you do not need a second kamailio, the same instance can
>>> listen on
>>> multiple sockets. You can also use a single ip, just listen
>>> on one port
>>> for traffic from local network and on another port for
>>> external traffic
>>> (this socket with advertise address).
>>>
>>> If the router cannot handle dns query based on local
>>> traffic, most
>>> devices support so called outbound proxy address, you can
>>> set that to
>>> the sip server address with ip.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 05.12.18 13:02, Kjeld Flarup wrote:
>>> > That might work, provided that the router can handle a
>>> local DNS.
>>> >
>>> > It would, however still require adding an extra Kamailio
>>> instance with
>>> > another IP. Plus a branch of the invite to both local and
>>> public
>>> > instance. Plus an extra location table.
>>> >
>>> >  Med Liberalistiske Hilsner
>>> --
>>> >    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent
>>> end min tegnebog
>>> >    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>>> >    Den ikke akademiske hjemmeside for liberalismen -
>>> www.liberalismen.dk 
>>> >
>>> > On 12/5/18 12:11 PM, Daniel Tryba wrote:
>>> >> On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
>>> >>> Yes, the Phones may be on either local LAN (Wifi) and
>>> Internet via
>>> >>> mobile
>>> >>> data.
>>> >> How about use different local address, 1 with an
>>> advertise for external
>>> >> clients, 1 without. Have local DNS resolv to the 1 ip
>>> without advertise.
>>> >>
>>> >> ___
>>> >> Kamailio (SER) - Users Mailing List
>>> >> sr-users@lists.kamailio.org
>>> 
>>> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>> >
>>> > ___
>>> > Kamailio (SER) - Users Mailing List
>>> > sr-users@lists.kamailio.org
>>> 
>>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> -- 
>>> Daniel-Constantin Mierla -- www.asipto.com
>>> 

Re: [SR-Users] is_e164 logic to detect valid number

2018-12-05 Thread Patrick Wakano
Thanks for the hint Joel! That's a really nice addition!
One more good reason to upgrade to version 5.2!!

Cheers,
Patrick Wakano

On Wed, 5 Dec 2018 at 14:30, Joel Serrano  wrote:

> You might also want to have a look at the “phonenum” module...
>
> https://www.kamailio.org/docs/modules/5.2.x/modules/phonenum.html
>
>
> On Tue, Dec 4, 2018 at 19:12 Patrick Wakano  wrote:
>
>> Thanks for the replies guys!
>> I will probably add a length test to invalidate too short numbers!
>> By the way, I had a quick look in the ITU recommendation (
>> https://www.itu.int/rec/T-REC-E.164/en) and looks like the short numbers
>> are for local purposes only being part of the "Non-ITU-T E.164 numbers"
>> section, so I guess the function should return false in this case. Also it
>> seems the + sign is recommended but not mandatory for a E.164 number, which
>> is quite confusing.
>>
>> Kind regards,
>> Patrick Wakano
>>
>>
>> On Tue, 4 Dec 2018 at 08:57, Henning Westerholt  wrote:
>>
>>> Am Montag, 3. Dezember 2018, 06:08:27 CET schrieb Patrick Wakano:
>>> > I am using the is_e164() function to validate the number we receive,
>>> and I
>>> > come to see that the number +555 was accepted
>>> > After some googling it looks like(it is not very clear though) that 7
>>> > digits are the minimum we could have for e164 numbers but after
>>> checking
>>> > the source code, I saw it accepts anything starting with + and having
>>> > between 2 and 16 numbers. So is it really valid to have a number with
>>> just
>>> > 2 digits? What is the case?
>>>
>>> Hello Patrick,
>>>
>>> I think the implementation was done with a pragmatic approach, to make
>>> sure
>>> that we don't reject numbers that are used in the field. The ITU
>>> standard
>>> Amendment A mentions the possibility to use national short numbers, for
>>> example. The standard mentions that the maximal length should be 15, but
>>> I
>>> think in this case this was also implemented a bit more relaxed.
>>>
>>> The original implementation from the enum module allows even longer
>>> numbers, I
>>> will check if this should be synchronized.
>>>
>>> Best regards,
>>>
>>> Henning
>>>
>>>
>>> --
>>> Henning Westerholt - https://skalatan.de/blog/
>>> Kamailio services - https://skalatan.de/services
>>> Kamailio security assessment - https://skalatan.de/de/assessment
>>>
>> ___
>> 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] set_advertised_address

2018-12-05 Thread Kjeld Flarup

So I could do something like this:

listen=192.168.2.9:5070 advertise 20.30.40.50:5070
listen=192.168.2.9:5050

However when I do an invite to 192.168.2.32, would Kamailio choose 5050 
or 5070?

Same when inviting to 40.40.40.40

If I were to listen to another local IP, then the routing table in Linux 
could perhaps dictate which connection to use.



 Med Liberalistiske Hilsner --
   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk

On 12/5/18 6:10 PM, Sergiu Pojoga wrote:
For whatever reason my initial impression was if it was possible for 
external devices to connect without port forwarding...


I stand corrected.


On Wed, Dec 5, 2018 at 11:30 AM Daniel-Constantin Mierla 
mailto:mico...@gmail.com>> wrote:


It is not about an external network interface, but external
traffic/devices. The NAT in this case is a port forwarding
firewall, like Amazon or Google cloud, where you have a local
address on server and the firewall is forwarding by port all
traffic from an assigned public address.

Such scenario is quite common in enterprise environment, the
devices on local network connect by private IP, and the external
devices connect to the firewall ip and this one does port forwarding.

Cheers,
Daniel

On 05.12.18 16:56, Sergiu Pojoga wrote:

Slightly confused here... didn't he say that Kamailio and PBX are
behind NAT? If so, what external interface are we talking about?

On Wed, Dec 5, 2018 at 9:18 AM Daniel-Constantin Mierla
mailto:mico...@gmail.com>> wrote:

Hello,

you do not need a second kamailio, the same instance can
listen on
multiple sockets. You can also use a single ip, just listen
on one port
for traffic from local network and on another port for
external traffic
(this socket with advertise address).

If the router cannot handle dns query based on local traffic,
most
devices support so called outbound proxy address, you can set
that to
the sip server address with ip.

Cheers,
Daniel

On 05.12.18 13:02, Kjeld Flarup wrote:
> That might work, provided that the router can handle a
local DNS.
>
> It would, however still require adding an extra Kamailio
instance with
> another IP. Plus a branch of the invite to both local and
public
> instance. Plus an extra location table.
>
>  Med Liberalistiske Hilsner
--
>    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end
min tegnebog
>    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>    Den ikke akademiske hjemmeside for liberalismen -
www.liberalismen.dk 
>
> On 12/5/18 12:11 PM, Daniel Tryba wrote:
>> On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
>>> Yes, the Phones may be on either local LAN (Wifi) and
Internet via
>>> mobile
>>> data.
>> How about use different local address, 1 with an advertise
for external
>> clients, 1 without. Have local DNS resolv to the 1 ip
without advertise.
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org

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

> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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


www.twitter.com/miconda  --
www.linkedin.com/in/miconda 
Kamailio World Conference -- www.kamailioworld.com

Kamailio Advanced Training, Nov 12-14, 2018, in Berlin --
www.asipto.com 


___
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 --www.kamailioworld.com  


Re: [SR-Users] set_advertised_address

2018-12-05 Thread Sergiu Pojoga
For whatever reason my initial impression was if it was possible for
external devices to connect without port forwarding...

I stand corrected.


On Wed, Dec 5, 2018 at 11:30 AM Daniel-Constantin Mierla 
wrote:

> It is not about an external network interface, but external
> traffic/devices. The NAT in this case is a port forwarding firewall, like
> Amazon or Google cloud, where you have a local address on server and the
> firewall is forwarding by port all traffic from an assigned public address.
>
> Such scenario is quite common in enterprise environment, the devices on
> local network connect by private IP, and the external devices connect to
> the firewall ip and this one does port forwarding.
>
> Cheers,
> Daniel
> On 05.12.18 16:56, Sergiu Pojoga wrote:
>
> Slightly confused here... didn't he say that Kamailio and PBX are behind
> NAT? If so, what external interface are we talking about?
>
> On Wed, Dec 5, 2018 at 9:18 AM Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> you do not need a second kamailio, the same instance can listen on
>> multiple sockets. You can also use a single ip, just listen on one port
>> for traffic from local network and on another port for external traffic
>> (this socket with advertise address).
>>
>> If the router cannot handle dns query based on local traffic, most
>> devices support so called outbound proxy address, you can set that to
>> the sip server address with ip.
>>
>> Cheers,
>> Daniel
>>
>> On 05.12.18 13:02, Kjeld Flarup wrote:
>> > That might work, provided that the router can handle a local DNS.
>> >
>> > It would, however still require adding an extra Kamailio instance with
>> > another IP. Plus a branch of the invite to both local and public
>> > instance. Plus an extra location table.
>> >
>> >  Med Liberalistiske Hilsner --
>> >Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
>> >Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>> >Den ikke akademiske hjemmeside for liberalismen -
>> www.liberalismen.dk
>> >
>> > On 12/5/18 12:11 PM, Daniel Tryba wrote:
>> >> On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
>> >>> Yes, the Phones may be on either local LAN (Wifi) and Internet via
>> >>> mobile
>> >>> data.
>> >> How about use different local address, 1 with an advertise for external
>> >> clients, 1 without. Have local DNS resolv to the 1 ip without
>> advertise.
>> >>
>> >> ___
>> >> Kamailio (SER) - Users Mailing List
>> >> sr-users@lists.kamailio.org
>> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> >
>> > ___
>> > Kamailio (SER) - Users Mailing List
>> > sr-users@lists.kamailio.org
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.com
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference -- www.kamailioworld.com
>> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
>>
>>
>> ___
>> 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.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] set_advertised_address

2018-12-05 Thread Daniel-Constantin Mierla
It is not about an external network interface, but external
traffic/devices. The NAT in this case is a port forwarding firewall,
like Amazon or Google cloud, where you have a local address on server
and the firewall is forwarding by port all traffic from an assigned
public address.

Such scenario is quite common in enterprise environment, the devices on
local network connect by private IP, and the external devices connect to
the firewall ip and this one does port forwarding.

Cheers,
Daniel

On 05.12.18 16:56, Sergiu Pojoga wrote:
> Slightly confused here... didn't he say that Kamailio and PBX are
> behind NAT? If so, what external interface are we talking about?
>
> On Wed, Dec 5, 2018 at 9:18 AM Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> you do not need a second kamailio, the same instance can listen on
> multiple sockets. You can also use a single ip, just listen on one
> port
> for traffic from local network and on another port for external
> traffic
> (this socket with advertise address).
>
> If the router cannot handle dns query based on local traffic, most
> devices support so called outbound proxy address, you can set that to
> the sip server address with ip.
>
> Cheers,
> Daniel
>
> On 05.12.18 13:02, Kjeld Flarup wrote:
> > That might work, provided that the router can handle a local DNS.
> >
> > It would, however still require adding an extra Kamailio
> instance with
> > another IP. Plus a branch of the invite to both local and public
> > instance. Plus an extra location table.
> >
> >  Med Liberalistiske Hilsner
> --
> >    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min
> tegnebog
> >    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
> >    Den ikke akademiske hjemmeside for liberalismen -
> www.liberalismen.dk 
> >
> > On 12/5/18 12:11 PM, Daniel Tryba wrote:
> >> On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
> >>> Yes, the Phones may be on either local LAN (Wifi) and Internet via
> >>> mobile
> >>> data.
> >> How about use different local address, 1 with an advertise for
> external
> >> clients, 1 without. Have local DNS resolv to the 1 ip without
> advertise.
> >>
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users@lists.kamailio.org 
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org 
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com 
> www.twitter.com/miconda  --
> www.linkedin.com/in/miconda 
> Kamailio World Conference -- www.kamailioworld.com
> 
> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin --
> www.asipto.com 
>
>
> ___
> 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 -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com

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


Re: [SR-Users] set_advertised_address

2018-12-05 Thread Sergiu Pojoga
Slightly confused here... didn't he say that Kamailio and PBX are behind
NAT? If so, what external interface are we talking about?

On Wed, Dec 5, 2018 at 9:18 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> you do not need a second kamailio, the same instance can listen on
> multiple sockets. You can also use a single ip, just listen on one port
> for traffic from local network and on another port for external traffic
> (this socket with advertise address).
>
> If the router cannot handle dns query based on local traffic, most
> devices support so called outbound proxy address, you can set that to
> the sip server address with ip.
>
> Cheers,
> Daniel
>
> On 05.12.18 13:02, Kjeld Flarup wrote:
> > That might work, provided that the router can handle a local DNS.
> >
> > It would, however still require adding an extra Kamailio instance with
> > another IP. Plus a branch of the invite to both local and public
> > instance. Plus an extra location table.
> >
> >  Med Liberalistiske Hilsner --
> >Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
> >Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
> >Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
> >
> > On 12/5/18 12:11 PM, Daniel Tryba wrote:
> >> On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
> >>> Yes, the Phones may be on either local LAN (Wifi) and Internet via
> >>> mobile
> >>> data.
> >> How about use different local address, 1 with an advertise for external
> >> clients, 1 without. Have local DNS resolv to the 1 ip without advertise.
> >>
> >> ___
> >> Kamailio (SER) - Users Mailing List
> >> sr-users@lists.kamailio.org
> >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.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] set_advertised_address

2018-12-05 Thread Daniel-Constantin Mierla
Hello,

you do not need a second kamailio, the same instance can listen on
multiple sockets. You can also use a single ip, just listen on one port
for traffic from local network and on another port for external traffic
(this socket with advertise address).

If the router cannot handle dns query based on local traffic, most
devices support so called outbound proxy address, you can set that to
the sip server address with ip.

Cheers,
Daniel

On 05.12.18 13:02, Kjeld Flarup wrote:
> That might work, provided that the router can handle a local DNS.
>
> It would, however still require adding an extra Kamailio instance with
> another IP. Plus a branch of the invite to both local and public
> instance. Plus an extra location table.
>
>  Med Liberalistiske Hilsner --
>    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
>    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>    Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
>
> On 12/5/18 12:11 PM, Daniel Tryba wrote:
>> On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
>>> Yes, the Phones may be on either local LAN (Wifi) and Internet via
>>> mobile
>>> data.
>> How about use different local address, 1 with an advertise for external
>> clients, 1 without. Have local DNS resolv to the 1 ip without advertise.
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com


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


Re: [SR-Users] set_advertised_address

2018-12-05 Thread Kjeld Flarup

That might work, provided that the router can handle a local DNS.

It would, however still require adding an extra Kamailio instance with 
another IP. Plus a branch of the invite to both local and public 
instance. Plus an extra location table.


 Med Liberalistiske Hilsner --
   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk

On 12/5/18 12:11 PM, Daniel Tryba wrote:

On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:

Yes, the Phones may be on either local LAN (Wifi) and Internet via mobile
data.

How about use different local address, 1 with an advertise for external
clients, 1 without. Have local DNS resolv to the 1 ip without advertise.

___
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] set_advertised_address

2018-12-05 Thread Daniel Tryba
On Wed, Dec 05, 2018 at 09:40:38AM +0100, Kjeld Flarup wrote:
> Yes, the Phones may be on either local LAN (Wifi) and Internet via mobile
> data.

How about use different local address, 1 with an advertise for external
clients, 1 without. Have local DNS resolv to the 1 ip without advertise.

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


Re: [SR-Users] set_advertised_address

2018-12-05 Thread Kjeld Flarup

Hi Daniel

Yes, the Phones may be on either local LAN (Wifi) and Internet via 
mobile data.


 Med Liberalistiske Hilsner --
   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk

On 12/5/18 8:40 AM, Daniel-Constantin Mierla wrote:

Hello,

it is not clear what exactly you want to achieve...

Is it that for connected phones from local network to use the local IP
and for sip messages with devices outside to use external ip?

Cheers,
Daniel

On 04.12.18 23:33, Kjeld Flarup wrote:

Hello

I have a PBX behind NAT.
Thus I advertise the public IP, and forwards the port to my PBX.

listen=LOCALIP:5070 advertise EXTERNALIP:5070

Now clients can connect to the PBX from the Internet. And also inside
the LAN, because I have enabled NAT loopback.

However some customers sysadmins complains that NAT loopback is a
security risk. I have not been able to find any exploits of this, but
the sales and support people asks if it is possible to remove this NAT
loopback requirement.

I could look at $rd and if it is local, then I could  advertise LOCALIP.
I found set_advertised_address("LOCALIP");

set_advertised_address however only seems to modify the latest Via
header, not the Record-route, and audio neither works.

Could I do something to make this work, or is it a dead end?




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