# How can i be a IP authentification provider

**URL:** <https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085>\
**Category:** Asterisk Support\
**Created:** [January 25, 2014, 12:02pm UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085 "2014-01-25T12:02:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aminagu](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aminagu](https://community.asterisk.org/u/aminagu)\
**Post date:** [January 25, 2014, 12:02pm UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/1 "2014-01-25T12:02:15Z")

</div>

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 😄

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [January 25, 2014, 12:51pm UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/2 "2014-01-25T12:51:10Z")

</div>

The same as you do to your local SIP phones.

---

<div class="post-metadata">

**Author:** ![aminagu](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aminagu](https://community.asterisk.org/u/aminagu)\
**Post date:** [January 25, 2014, 1:06pm UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/3 "2014-01-25T13:06:57Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [January 25, 2014, 3:55pm UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/4 "2014-01-25T15:55:21Z")

</div>

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](http://www.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.

---

<div class="post-metadata">

**Author:** ![aminagu](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aminagu](https://community.asterisk.org/u/aminagu)\
**Post date:** [January 26, 2014, 11:56am UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/5 "2014-01-26T11:56:23Z")

</div>

Thanks for replaying ,  
I still can’t make my service ok ☹  
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 ☹

Whould you please give me a sample configuration ?

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [January 26, 2014, 12:21pm UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/6 "2014-01-26T12:21:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aminagu](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aminagu](https://community.asterisk.org/u/aminagu)\
**Post date:** [January 27, 2014, 9:19am UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/7 "2014-01-27T09:19:22Z")

</div>

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 ☹  
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

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [January 28, 2014, 5:49am UTC](https://community.asterisk.org/t/how-can-i-be-a-ip-authentification-provider/45085/8 "2014-01-28T05:49:56Z")

</div>

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](http://asteriskdocs.org/en/2nd_Edition/asterisk-book-html/asterisk-book.html)
