More questions from the O'Reilly book


#1

I have some questions that the O’Reilly book didn’t quite explain:

The book says (pg 72) that IAX is better suited for NAT because it only uses 1 port for communication. My guess is that SIP on a NAT’ed network works just fine for a internal phone system that uses PSTN as its outside communication method, correct?

When setting up the client confguration in the sip.conf file, the choices for for the HOST option are STATIC, DYNAMIC, or a specific IP ADDRESS. Is explicitly specifing an IP address more secure? Will it prevent malicious activity, like spoofing? Or should I just use DYNAMIC?

When setting up channels in zapata.conf, consider the following configuration:

opt 1
opt 2
channel => 1
opt 3
channel => 2

Will channel 1 have options 1 and 2, and channel 2 will have options 1, 2, and 3?

Is there any compatibily between ground start, loop start, and kewl start? The book seems to suggest loop start and kewl start are compatible but it doesn’t outright say it. Will I need to determine signal start type if implementing asterisk on an existing phone system?

Asterisk seems to have a lot of options utilizing MMX technology. Should I buy my motherboad/processor with MMX in mind?


#2

[quote]The book says (pg 72) that IAX is better suited for NAT because it only uses 1 port for communication. My guess is that SIP on a NAT’ed network works just fine for a internal phone system that uses PSTN as its outside communication method, correct?
[/quote]
Assuming you mean both asterisk and the SIP clients are on the same private subnet, yes, this configuration works fine. You’ll probably have a lot more options (for phones) using SIP than IAX for these channels.

My experience with SIP through a NAT router has been varied. With some providers, it has worked transparently. With one (callpacket) I had to jump through some hoops to make it work (mainly limiting the RTP port range and forwarding those ports to my asterisk box).


#3

Thanks for the reply.


#4

Every Intel CPU made since the Pentium II series includes the MMX instruction set. It’s not something you need to ask for when shopping for a modern CPU.


#5

[quote=“MattP”]I have some questions that the O’Reilly book didn’t quite explain:

When setting up channels in zapata.conf, consider the following configuration:

opt 1
opt 2
channel => 1
opt 3
channel => 2

Will channel 1 have options 1 and 2, and channel 2 will have options 1, 2, and 3?

[/quote]

I read that chapter today and for a second had the same doubt.
I think that the logical answer to your question is NO.

In the above example Channel 1 will have option 1 and 2, while Channel 2 will have option 3. Otherwise the semantics would be too weird, and you would need some sort of “options stop here” statement to prevent downward propagation. The only logical way (ask the opinion of any programmer) is having the “channel” statement as an “option stopper”.

Channel == The buck stops here

-RFH


#6

[quote=“MattP”]I have some questions that the O’Reilly book didn’t quite explain:

Is there any compatibily between ground start, loop start, and kewl start? The book seems to suggest loop start and kewl start are compatible but it doesn’t outright say it. Will I need to determine signal start type if implementing asterisk on an existing phone system?

[/quote]

Okay, this is the skinny: In ancient times the telco used to install TWO kinds of signaling, it was either groundstart or loopstart. Today, there is not groundstart anymore. So, when your order a regular analog POTS line, it will have the loopstart signaling on the telco side. On your side you may use plain loopstart (i.e., exactly matching the phone company) or if your want your side to be more clever, you use Kewlstart which is a new, improved type of loopstart.

-RFH


#7

There is an important issue in which people oftentimes get confused.

The “NAT Barrier” is NOT related to the ISP that you choose. The type of NAT that you have is a feature of the router that you purchase. So, you don’t shop around for differente ISPs, if you want a more open NAT barrier, just get yourself a better router.

The above statements apply to most ISPs which are “network neutral” (i.e., 100% pure Internet) and thus will leave your traffic untouched. If you happen to have a ISP which messes around with things such as trying to block your IP traffic, just tell them to go straight to hell.

-RFH


#8

In my previous post I meant to write:

“trying to block your VoIP traffic” instead of “trying to block your IP traffic”.

-RFH


#9

[quote=“Telephony”][quote=“MattP”]I have some questions that the O’Reilly book didn’t quite explain:

When setting up channels in zapata.conf, consider the following configuration:

opt 1
opt 2
channel => 1
opt 3
channel => 2

Will channel 1 have options 1 and 2, and channel 2 will have options 1, 2, and 3?

[/quote]

I read that chapter today and for a second had the same doubt.
I think that the logical answer to your question is NO.

In the above example Channel 1 will have option 1 and 2, while Channel 2 will have option 3. Otherwise the semantics would be too weird, and you would need some sort of “options stop here” statement to prevent downward propagation. The only logical way (ask the opinion of any programmer) is having the “channel” statement as an “option stopper”.

Channel == The buck stops here

-RFH[/quote]

I’ ve found this in “Getting Started With Asterisk” by Andy Powell:

It’s important to note that the configuration in zapata.conf is what I would call ‘backwards’ – i.e. you set the features for a channel, then
you assign the channel to them. There is actually a very good reason for this. We are only dealing with a couple of channels so it’s not a big deal, but imagine if you were dealing with 128, 256 or more… Doing it ‘backwards’ allows you to set the configuration for all the channels and assign them all at once (making slight modifications if required)

It’s worth noting that all the values (above the channel=1) now become the default values for all other channels, this means you only need to change those you want and all others will be taken from above.

I’m using a TDM400p with 4 fxo modules, and so with 4 channels and I’ve configured them in a way like this:

opt1
opt2
opt3
context=>home
channel=>1

context=>office
channel=>2

context=>lab1
channel=>3

context=>lab2
channel=>4

C.


#10

Thanks guys!!

More questions!:

If I make changes in any given config file, what needs to be restarted (if anything) to apply the changes? Zapata? Asterisk? Both? The server itself?

If I use a Nortel phone for example, which has buttons and such that allow it to perform functions with a traditional PBX, can I plug that phone into a FXS port and make those buttons work with Asterisk?

Can you please explain in more detail the CALLERIDNO variable? If the call is internal, will it hold the extension of the person calling you? If a call comes in from the outside to the operator and is then transfered to you, which number do you see? The operators extension? or the outside number?

Does pattern matching exist when using Alpha nUmberic extensions? All the pattern matching thus far in the book match certain or all numbers.

Thanks!


#11

[quote=“MattP”]
If I make changes in any given config file, what needs to be restarted (if anything) to apply the changes? Zapata? Asterisk? Both? The server itself?[/quote]

From the Asterisk CLI, just type reload to reload the config. From the shell prompt, you can also just use asterisk -rx “reload”. You don’t have to restart the server.