This is my sip.conf file


#1
[general]
port        = 5060
bindaddr    = 0.0.0.0
context     = from-sip

[as5300]
type        = peer
context     = quickie
host        = 11.22.33.44     <-- not the real IP address
dtmfmode    = RFC2833
disallow    = all
allow       = ulaw

[6270]
type        = friend
username    = laurel
password    = secret
callerid    = "El Phon de Ramon" <6270>
;host        = 24.128.127.93
host        = dynamic
nat         = no
canreinvite = yes

[6271]
type        = friend
username    = hardy
password    = anothersecret
callerid    = "El Fon de Ramon" <6271>
host        = dynamic
nat         = no
canreinvite = yes

#2

[general]

static=yes
writeprotect=no

[bogon-calls]
;exten => _.,1,Congestion
exten => 7224,1,Wait
exten => 7224,2,Answer
exten => 7224,3,SetMusicOnHold(default)
exten => 7224,4,DigitTimeOut,5
exten => 7224,5,ResponseTimeOut,10
exten => 7224,6,Background(Welcome)
exten => 7224,7,Background(EnterSSN)
exten => 7224,8,Read(ssn||9)
exten => 7224,9,Background(Press1or2)

exten => 1,1,Playback(FullTime)
exten => 1,2,Playback(Farewell)
exten => 1,3,Hangup

exten => 2,1,Playback(PartTime)
exten => 2,2,Playback(Farewell)
exten => 2,3,Hangup


[quickie]
exten => s,1,Answer
exten => s,2,Playback(vm-youhave)
exten => s,3,Wait(1)
exten => s,4,Playback(vm-reenterpassword)
exten => s,5,DateTime

[from-sip]
exten => 6270,1,Dial(SIP/6270,20)
exten => 6271,1,Dial(SIP/6271,20)

#3

As I said before, I am having 3 problems with my Asterisk 1.0.7 installation and a Sipura SPA-2100.

The passwords are ignored. The SIP phones are registered even when passwords don’t match.

I cannot use a static IP address for the phones. But I have no problem using it in the Cisco AS-5300. The Cisco and Asterisk are on the same LAN/subnet. Perhaps Asterisk requires dynamic IP when the server and the peers are in different subnets?

When I dial an extension number from that same extension, I expect to hear a busy tone. I get dead air. Maybe the system is trying to go to an inexistent VM?

-Ramon


#4

Please go to my other posting: “Three things that are not working for me” for more information about hits case.

-RFH


#5

In the SIP.conf file, you have to remember that any attributes that you set (like context=whatever) are inherited by the lower portions of your sip.conf file.

In your case, you set the [generals] at context=from-sip, but then in the [as5300] section you change the context= statement to context=quickie.

This means that all your sip.conf listings made below the [as5300] are now in the quickie context.

Because your extensions.conf file is expecting them to be in the from-sip context, there’s a problem. Your sip calls can’t start because the instructions they have access to (the DIAL commands) are not correct context for them in the extensions.conf file.

To fix this, add a context=from-sip to each of your sip definitions (actually you only need to put it in the definition of 6270, and it will be inherited by the 6271 definition below it), or just move the as5300 to the bottom of the file.


#6

That’s a very bare sip.conf file!

It’s possible that putting a localnet= statement or two in there might solve the dynamic/static IP address thing.

And why would you expect to hear a busy tone when you dial an extension from itself? You haven’t got anything in the configs in extensions.conf to make it do that. In fact you’ve got nothing there at all to tell it what to do if the Dial() statement doesn’t succeed. I’m not surprised you’re getting dead air! Try the following:

[from-sip]
exten => 6270,1,Dial(SIP/6270,20)
exten => 6270,2,Congestion

exten => 6271,1,Dial(SIP/6271,20)
exten => 6271,2,Congestion

and see if that does what you think it should. I don’t know if it will or not.


#7

[quote=“WillKemp”]That’s a very bare sip.conf file!
[/quote]

Well, it will grow for sure. I ordered 8 Sipura SPA-2100s (the SPA-2002s are too wimpy). Those will be installed at the homes of some buddies of mine in Boston, Texas, Venezuela and Argentina. In the next few months I will travel to those places to install them personally. I guess I could send them preconfigured and with instructions, but it’s a good excuse to visit.

I have been pondering the whole issue and now I understand it. SIP devices with static IP addresses, like this:

host = 11.22.33.44

should NOT register and Asterisk will not accept REGISTER requests from them. That’s precisely the idea! If they have a long-lived IP address (such as my Cisco voice gateway) why do they need to register?

In a typical office environment, for instance, the SIP phones don’t have to register. Ever. Just like desktop PCs don’t register with a mail server every hour. Same thing.

The problem is that some SIP phones will not give you a dial tone if the registration fails.

So, for phones with public and relatively long lived IP addresses you have 2 options: (a) just say “host=dynamic”, or (b) some SIP phones have an option to tell them to go ahead and have a tone even if they are not registered.

-RFH


#8

[quote=“Telephony”]I have been pondering the whole issue and now I understand it. SIP devices with static IP addresses, like this:

host = 11.22.33.44

should NOT register and Asterisk will not accept REGISTER requests from them. That’s precisely the idea! If they have a long-lived IP address (such as my Cisco voice gateway) why do they need to register?[/quote]
Ah! Yes, that makes sense.

I think i already knew that - sort of. When i was using a softphone on my laptop (before i got a hardphone) i had that set up that way - not registering, on static address - and it worked ok. My hardphone’s set up as “dynamic” in sip.conf and it registers.


#9

You can put

type=friend
username=user
secret=secret
host=dynamic
defaultip=10.20.30.40

That way you can use password and have dynamic IP with default address.

Tomislav


#10

[quote=“Telephony”]As I said before, I am having 3 problems with my Asterisk 1.0.7 installation and a Sipura SPA-2100.

The passwords are ignored. The SIP phones are registered even when passwords don’t match.

I cannot use a static IP address for the phones. But I have no problem using it in the Cisco AS-5300. The Cisco and Asterisk are on the same LAN/subnet. Perhaps Asterisk requires dynamic IP when the server and the peers are in different subnets?

When I dial an extension number from that same extension, I expect to hear a busy tone. I get dead air. Maybe the system is trying to go to an inexistent VM?

-Ramon[/quote]

I would suggest to choose the user/pass with less than 10 character length. It helps :wink: .