How can i be a IP authentification provider

Hi dears ,

I always used to be a sip client , and connect to a sip provider to root my calls abroad , now i wanna do the contrary , i wanna be a sip provider and give my clients an IP authentification .

Whould you please helpe me ?? what should i do in my sip.conf ans extensions.conf ti have to enable IP authentification to my clients ?

Thanks a looot :smile:

The same as you do to your local SIP phones.

Thanks a lot for ur replay ,

But my local sip phone have a login and a password ,
Now i want that the registring will be done only by IP Address , My addresse ans the sip client ip address .
The SIP phones should know only my IP Address :frowning:

Thatā€™s easier, but most customers of such services donā€™t have the static IP addresses you need for this.

You need to understand asteriskdocs.org and the sample configuration files much better before you even think of running a service like that.

Specifically, if you want authentication to work inbound, donā€™t disable it with insecure, and do provide a password.

Thanks for replaying ,
I still canā€™t make my service ok :frowning:
this is what i did
Server 1 : ip address : 10.1.1.3
[10.1.1.3]
host=192.168.1.3
context=from-to-provider
disallow=all
allow=alaw&ulaw
type=friend
insecure=port,invite

exten :
[from-to-provider]
exten => s , 1 , Answer()
exten => s , 2 , Dialā€¦

Server2 : Ip Adresse 10.1.1.3
[10.1.1.2]
Same sip config
[111]
friend connected to the server

exten :
exten => 111,1,Dial( SIP/111)
exten => 113,1,Dial( SIP/10.1.1.2)

when i want to call 113 logs in server 2give me inable to connect to the 10.1.1.2 , congestion
in sever 1 i donā€™t hace nothing :frowning:

Whould you please give me a sample configuration ?

insecure is wrong (insecure=invite disables incoming authentication, and makes no sense without a secret).
secret is missing
Not just in this case, peer is better than friend.

I donā€™t understand what you mean by server IP address? (This may or may not explain why you might need friend.)

You appear to have two entries with the same host IP address. Asterisk cannot distinguish between incoming calls if they have the same address if it has to match on address.

Why are you calling Answer?

I donā€™t give sample configurations for relatively normal cases.

I guess 2give means ā€œto giveā€ (text speak) and ā€œi donā€™t hace nothingā€ means ā€œI get nothingā€ (double negative, capitalisation and typo).

You will need to turn up debugging to find out why 192.168.1.3 is rejecting INVITEs to sip:192.168.1.3. Note you are connecting to 192.168.1.3, not to 10.1.1.2.

Thanks for replaying
Just befor i wanted to explain my network architectur :
To make my tests , i v built a virtual environement where i have two asterisk servers . The first have the address 10.1.1.2 and the second 10.1.1.3 .

i v modified my configuration . but still canā€™t have my servers communicate :frowning:
would u please verify if iā€™ did the correct config in my sip :

type=friend
host=10.1.1.2
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=g729
port=5060
insecure =port
canreinvite=no
context=from_to_voip

thaaanks a lot for ur colaboration

canreinvite= was renamed to directmedia= in Asterisk 1.6.2 to more accurately describe what this setting does. See also the closely related setting directrtpsetup.

If what you are trying to do, is to connect 2 Asterisk boxes. This book have an example called Connecting Two Asterisk Boxes Together via SIP

asteriskdocs.org/en/2nd_Edition/ ā€¦ -book.html