Luca Bertoncello
2015-Jun-11 07:56 UTC
[asterisk-users] Allowing calls - maybe I'm just stupid...
Zitat von A J Stiles <asterisk_list at earthshod.co.uk>:> On Thursday 11 Jun 2015, Luca Bertoncello wrote: >> Now my problem is to check in my dialplan if the peer, that originate >> the call, is reachable, and if not, to give an error... >> >> Is there any function to know if the peer is reachable? > > The peer that *originated* the call *must* be reachable, by definition .....I can originate a call even if my peer is "UNREACHABLE" (sip show peers say UNREACHABLE)... But I solved using the function EXTENDED_STATE... Regards Luca Bertoncello (lucabert at lucabert.de)
Guido Falsi
2015-Jun-11 08:15 UTC
[asterisk-users] Allowing calls - maybe I'm just stupid...
On 06/11/15 09:56, Luca Bertoncello wrote:> Zitat von A J Stiles <asterisk_list at earthshod.co.uk>: > >> On Thursday 11 Jun 2015, Luca Bertoncello wrote: >>> Now my problem is to check in my dialplan if the peer, that originate >>> the call, is reachable, and if not, to give an error... >>> >>> Is there any function to know if the peer is reachable? >> >> The peer that *originated* the call *must* be reachable, by definition >> ..... > > I can originate a call even if my peer is "UNREACHABLE" (sip show peers > say UNREACHABLE)... > > But I solved using the function EXTENDED_STATE...I think the confusion here stands in the fact that registrations are for receiving calls, a peer registers to tell asterisk "Hey, here is where to find me in case you need to ring me". When the same peer wants to make a call it will send an invite to asterisk with the details for that call AND the authentication, it's completely decoupled from registration, it just uses the same credential but authenticates each time. Registration then isn't like logging in to a service, or at least, it's like that but just for getting calls, to make a call your phone has to authenticate each time he sends an invite. That's why it works without being registered. So, trying to bind authentication to originate calls to registrations is conceptually wrong in the SIP world. Maybe you can do that but that's not the way the protocols have been engineered to work. -- Guido Falsi <mad at madpilot.net>
Luca Bertoncello
2015-Jun-11 08:43 UTC
[asterisk-users] Allowing calls - maybe I'm just stupid...
Zitat von Guido Falsi <mad at madpilot.net>:> So, trying to bind authentication to originate calls to registrations is > conceptually wrong in the SIP world. Maybe you can do that but that's > not the way the protocols have been engineered to work.Hi Guido, thanks for your answer. Well, I decided to do that, since I have my Asterisk reachable from Internet just for my cellphone and I want to avoid that someone guess my password (random and long, but it's of course possible to guess with a brute force attack) and call using my Asterisk... Since I'll use rarely my Asterisk from Internet (maybe just if I'm in holiday), I find this limitation meaningful. Thanks Luca Bertoncello (lucabert at lucabert.de)