Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to create a voip service.I have installed asterisk-1.4 on a dedicated remotely hosted debian lenny distro. I made a sip.conf and extensions.conf so as to place a call between two sip phones(i am using xlite 3.0) installed in some other windows Pc. whenever i switch this phones the asterisk console shows that " Registration from '"1000"' failed for '122.168.10.254' - Peer is not supposed to register " Where xx.xx.xx.xx is the servers ip " i.e my sip phones are unable to register with the asterisk server. Please help me to place call between two sip phones

 #sip show peers
Name/username              Host            Dyn Nat ACL Port     Status          
2000                       (Unspecified)    D          0        Unmonitored    
1000                       (Unspecified)    D          0        Unmonitored    
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline]

# sip show registry
Host                            Username       Refresh State                Reg.Time

# sip show channels
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Format           Hold     Last Message
0 active SIP channels

Sip.conf

 
[general]
context=default
bindport=5060
bindaddr=0.0.0.0

[1000]
secret=1000
type=friend
context=phones
host=dynamic

[2000]
secret=2000
type=friend
context=phones
host=dynamic

extensions.conf

[general]
autofallthrough = yes
static = yes
writeprotect = no
clearglobalvars = yes

[default]
exten => s,1,Varbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[incoming_calls]

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()

exten => 1000,1,Verbose(1|Extension 1000)
exten => 1000,n,Dial(SIP/1000,30)
exten => 1000,n,Hangup()

exten => 2000,1,Verbose(1|Extension 2000)
exten => 2000,n,Dial(SIP/2000,30)
exten => 2000,n,Hangup()

[phones]
include => internal
share|improve this question
    
You should include a sanitised copy of your sip.conf file. –  Dan Carley Sep 7 '09 at 13:04
add comment

5 Answers 5

I think you would do better by using something like FreePBX or TrixboxCE, these take all of the pains out of managing Asterisk. From there, you can inspect the Asterisk configurations which allows you to learn how to configure it yourself by looking at more complex, known working examples.

Additionally, installing from a bootable ISO eliminates issues arising from questionable installations of Asterisk.

share|improve this answer
add comment

As You mentioned in your post public IP address (which is not good practice). Are those client inside LAN or outside WAN side. Is your machine behind NAT or this public IP is set on your debian. If so check are you have forwarded 5060 and 5061 ports throughout router to asterisk

share|improve this answer
add comment

Your problem lies with sip.conf. Make sure you're defining the username for your end device:

[2000]
username=2000
secret=2000
type=friend
context=phones
host=dynamic
share|improve this answer
add comment

Check your sip.conf - the peer type is likely wrong - If you post your sip.conf it would be easier to answer.

Most likely you need type=friend but read about the various settings..

share|improve this answer
add comment

The registration error may be if you have specified the host address for the sip peer in sip.conf

From http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+type :
"If a peer is defined with host=dynamic it is allowed to register with Asterisk to tell Asterisk where it can be found (IP address/host name) and that it is reachable from now on."

So if you have yours defined as host=xx.xx.xx.xx registration is unnecessary as it will only accept that peer at that address.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.