Setting a Dialplan for guests?

Hi asteriskers,

I am trying to configure my asterisk to regsiter every user who tries to connect to it, and allow it to establish calls. I have read that I should set “allowguest = yes” in sip.conf.
What about the dialplan in extensions.conf ? What should I add so that all my users could make and recieve calls ? (this is my first questions).

I would go even more precise about the users : is it possible to allow only guests from one precise domain ? If yes please help find how to do it, I will be very thankful.
:smile:

There are several issues with Your requirement:

When allowguest=yes is set into the general-Section of sip.conf anybody may connect to Your asterisk. Everybody connected as a guest will be able to use all dialplan-Logic which is included (or reachable from) the context, which is defined in the general-Section of sip.conf (usually “default”).

The other direction is not as easy: While You’ll vbasically will be able to address a SIP-Client once it ist connected to Your server by it’s IP-address You won’t be able to uniquely address any connected guest by a kind of extensionnumber or something this way as You have no defined knowledge about this. Therefor: Calling guests (non-registered users) in a predictable way would IMHO be a nightmare …

The real question is: Why would You work with guests instead of registering users (where all problems are away as You have predictable rules for both call directions) ?

BTW: Guests could not be restricted to a specific domain that easily. You could try to restrict access to the server by using contactdeny and contactpetrmit as well as permit and deny, but it’s generally IP-(Range)-based, not domain-based.

Incoming INVITE and REFER messages can be matched against a list of 'allowed’
domains, each of which can direct the call to a specific context if desired.
By default, all domains are accepted and sent to the default context or the
context associated with the user/peer placing the call.
REGISTER to non-local domains will be automatically denied if a domain
list is configured.

You can find the full information and the options to setup in the sip.conf example file, under the section called
;----------------------------------------- SIP DOMAIN SUPPORT ------------------------

@ambiorixg12:

Nice hint, I missed this. But indeed, by using the domainlist it’s possible to restrict access to a list of given domains.

And: This could even be combined with allow/deny and contactallow/contactdeny to check, wheter a client belongs to a domain and to a specific IP-Range.