Type=peer and still able to place calls


#1

Hello everyone,

I am new to Asterisk and I am stuck with an assignement for school. Our teacher told us to set up an extension from which you can only receive calls.

here is the relevant part of the sip.conf file :

[1001]
username=Rodolphe Prevost
callerid = “Rodolphe Prevost” <1001>
type=peer
secret=54321
host=dynamic
context=tp1
language=fr

My other extensions are defined using the same parameters except for type=friend

When testing 1001 was able to place and receive call just like the other extensions.

Somebody can tell me what I may be missing ?

Thank you


#2

That is a device, not an extension. You need to ask the teacher to clarify what they mean by an extension. Extensions, in Asterisk terminology are not the entities that can place calls.

In normal configurations,where you are using real phones, with their own IP addresses type=peer is the only setting of type you should be using. The distinction is as to whether only the IP address is used tot associate calls with the device or whether the user part of the from address is used, and preferred.

The ability to place calls is determined much more by the dialplan, e.g. think about how external callers are normally allowed to place calls to locally terminated extensions, but not to other external parties.


#3

Hello,

Thanks for your guidance. I’ve changed the context for “tp1-excluded”. That way calls cannot be placed from the device.