A few things to remember before we start...
Capitalization is important!
Terminal commands are shown in orange, and preceded by a # prompt character (don't type that!).
Comments are shown below commands, and /* surrounded by comment markers */. Don't type the comments.
Text you should be pasting is in orange italics.
And now, the step-by-step...
Start a root Terminal session
Open a Terminal session and launch a root shell by typing sudo bash. The rest of the instructions assume every step is done in this root shell!
Set up your machine to run the BIND server.
# rndc-confgen > /etc/rndc.conf
/* creates rndc.conf and generates key */
# head -n 6 /etc/rndc.conf > /etc/rndc.key
/* parses the key into the proper file */
# pico -w /etc/named.conf
/* opens the BIND configuration file for editing in the text editor */
Add the following into the options section, where x.x.x.x represents the IP addresses of either your ISP, or other DNS servers, known to you (Google for DNS servers if you don't know of any):
forwarders {
x.x.x.x;
x.x.x.x;
};
Save the file and quit the editor. Hit Control-O, Enter, then Control-X.
Create StartupItem for DNS [10.4 only; otherwise jump to next step]
It seems as if Tiger has removed the (already disabled in Panther) DNS Server completely from StartupItems. We have to add it if running Tiger.
# cd /System/Library/StartupItems
# mkdir BIND
# cd BIND
# touch BIND; pico -w BIND
/* Create first of two files, then open it in text editor */
Copy the following into the file, save it, and exit:
#!/bin/sh
. /etc/rc.common
if [ "${DNSSERVER}" = "-YES-" ]; then
ConsoleMessage "Starting BIND DNS Server"
/usr/sbin/named
fi
$ touch StartupParameters.plist; pico -w StartupParameters.plist
/* Create and open second of two files needed */
Copy the following into the file,save it, and exit:
{
Description = "Local Caching DNS Server";
Provides = ("DNS Server");
OrderPreference = "None";
Messages =
{
start = "Starting BIND DNS Server";
stop = "Stopping BIND DNS Server";
};
}
$ chmod +x BIND
/* Make the script executable so it can actually be run */
Enable DNS on boot
# pico -w /etc/hostconfig
/* Open the file OS X reads to start services */
Change it to make DNSSERVER=-YES-. Here Tiger users will have to add this value; Panther users will simply change it to -YES-. Save the file and exit.
Finish up with root
# exit
/* End root shell */
Tell OS X to use your local DNS
Open System Preferences, then the Network preferences panel. Change your 'DNS Server' setting to 127.0.0.1 for all the connections you use. This step is crucial, as failing to do so will make all your hard work completely useless.
Finally, either reboot, or issue the following command in the terminal:
$ sudo /System/Library/StartupItems/BIND/BIND
Sunday, July 26, 2009
Tuesday, March 31, 2009
libss7 and asterisk
(1)svn co http://svn.digium.com/svn/libss7/tags/1.0.2 libss7-1.0.2
(2)svn co http://svn.digium.com/svn/dahdi/linux/tags/2.1.0.4 dahdi-2.1.0.4
(3)svn co http://svn.digium.com/svn/asterisk/branches/1.6.0.6 asterisk-1.6.0.6
(4)svn co http://svn.digium.com/svn/dahdi/tools/tags/2.1.0.2 dahdi-tools-2.1.0.2
(2)svn co http://svn.digium.com/svn/dahdi/linux/tags/2.1.0.4 dahdi-2.1.0.4
(3)svn co http://svn.digium.com/svn/asterisk/branches/1.6.0.6 asterisk-1.6.0.6
(4)svn co http://svn.digium.com/svn/dahdi/tools/tags/2.1.0.2 dahdi-tools-2.1.0.2
Thursday, March 26, 2009
Asterisk LibSS7 Howto
Asterisk LibSS7 Howto
This Howto has been contributed by Matthew Fredrickson - Author of LibSS7 at Digium
I have received many requests lately for a more current document
describing how to setup Asterisk with SS7 support. The following email
will hopefully suffice. The contents of this are also contained in the
README file in libss7 as well as inside Asterisk-trunk in the
doc/ss7.txt file.
To Use:
=======
In order to use libss7, you must get at least the following versions of
Zaptel, libss7, and Asterisk (you might also want to get libpri):
Zaptel: 1.4.x
Asterisk: trunk
libss7: trunk (currently, there *only* is a trunk release).
You must then do a `make; make install` in each of the directories that
you installed in the given order (Zaptel first, libss7 second, and
Asterisk last).
NOTE: In order to check out the code, you must have the subversion
client installed. This is how to check them out from the public
subversion server.
These are the commands you would type to install them:
`svn co http://svn.digium.com/svn/zaptel/branches/1.4 zaptel-1.4`
`cd zaptel-1.4`
`make; make install`
`svn co http://svn.digium.com/svn/libss7/trunk libss7-trunk`
`cd libss7-trunk`
`make; make install`
`svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk`
`cd asterisk-trunk`
`./configure; make; make install;`
This should build Zaptel, libss7, and Asterisk with SS7 support.
In the past, there was a special asterisk-ss7 branch to use which
contained the SS7 code. That code has been merged back into the trunk
version of Asterisk, and the old asterisk-ss7 branch has been deprecated
and removed. If you are still using the asterisk-ss7 branch, it will
not work against the current version of libss7, and you should switch to
asterisk-trunk instead.
CONFIGURATION:
In zaptel.conf, your signalling channel(s) should be a "dchan" and your
bearers should be set as "bchan".
In the asterisk-ss7 branch, there is a sample zapata.conf that is
installed which contains sample configuration for setting up an E1 link.
In brief, here is a simple ss7 linkset setup:
signalling = ss7
ss7type = itu ; or ansi if you are using an ANSI link
linkset = 1 ; Pick a number for your linkset identifier in
; zapata.conf
pointcode = 28 ; The decimal form of your point code. If you
; are using an
; ANSI linkset, you can use the xxx-xxx-xxx
notation for
; specifying your linkset pointcode.
adjpointcode = 2 ; The point code of the switch adjacent to your
; linkset
defaultdpc = 3 ; The point code of the switch you want to send
; your ISUP
; traffic to. A lot of the time, this is the
; same as your
; adjpointcode.
; Now we configure our Bearer channels (CICs)
cicbeginswith = 1 ; Number to start counting the CICs from. So if
; Zap/1 to Zap/15 are CICs 1-15, you would set
; this to 1 before you
; declare channel=1-15
channel=1-15 ; Use Zap/1-15 and assign them to CICs 1-15
cicbeginswith = 17 ; Now for Zap/17 to Zap/31, they are CICs 17-31
; so we initialize
; cicbeginswith to 17 before we declare those
; channels
channel = 17-31 ; This assigns CICs 17-31 to channels 17-31
signchan = 16 ; This is where you declare which Zap channel is
; your signalling
; channel. In our case it is Zap/16. You can
; add redundant
; signalling channels by adding additional
; sigchan= lines.
; If we want an alternate redundant signalling channel add this
sigchan = 48 ; This would put two signalling channels
in our ; linkset, one at Zap/16 and one at Zap/48 which
; both would be used to send/receive
; ISUP traffic.
; End of zapata.conf
This is how a basic linkset is setup. For more detailed zapata.conf SS7
config information as well as other options available for that file, see
the default zapata.conf that comes with the samples in asterisk. If you
would like, you can do a `make samples` in your asterisk-trunk directory
and it will install a sample zapata.conf for you that contains more
information about SS7 setup.
This Howto has been contributed by Matthew Fredrickson - Author of LibSS7 at Digium
I have received many requests lately for a more current document
describing how to setup Asterisk with SS7 support. The following email
will hopefully suffice. The contents of this are also contained in the
README file in libss7 as well as inside Asterisk-trunk in the
doc/ss7.txt file.
To Use:
=======
In order to use libss7, you must get at least the following versions of
Zaptel, libss7, and Asterisk (you might also want to get libpri):
Zaptel: 1.4.x
Asterisk: trunk
libss7: trunk (currently, there *only* is a trunk release).
You must then do a `make; make install` in each of the directories that
you installed in the given order (Zaptel first, libss7 second, and
Asterisk last).
NOTE: In order to check out the code, you must have the subversion
client installed. This is how to check them out from the public
subversion server.
These are the commands you would type to install them:
`svn co http://svn.digium.com/svn/zaptel/branches/1.4 zaptel-1.4`
`cd zaptel-1.4`
`make; make install`
`svn co http://svn.digium.com/svn/libss7/trunk libss7-trunk`
`cd libss7-trunk`
`make; make install`
`svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk`
`cd asterisk-trunk`
`./configure; make; make install;`
This should build Zaptel, libss7, and Asterisk with SS7 support.
In the past, there was a special asterisk-ss7 branch to use which
contained the SS7 code. That code has been merged back into the trunk
version of Asterisk, and the old asterisk-ss7 branch has been deprecated
and removed. If you are still using the asterisk-ss7 branch, it will
not work against the current version of libss7, and you should switch to
asterisk-trunk instead.
CONFIGURATION:
In zaptel.conf, your signalling channel(s) should be a "dchan" and your
bearers should be set as "bchan".
In the asterisk-ss7 branch, there is a sample zapata.conf that is
installed which contains sample configuration for setting up an E1 link.
In brief, here is a simple ss7 linkset setup:
signalling = ss7
ss7type = itu ; or ansi if you are using an ANSI link
linkset = 1 ; Pick a number for your linkset identifier in
; zapata.conf
pointcode = 28 ; The decimal form of your point code. If you
; are using an
; ANSI linkset, you can use the xxx-xxx-xxx
notation for
; specifying your linkset pointcode.
adjpointcode = 2 ; The point code of the switch adjacent to your
; linkset
defaultdpc = 3 ; The point code of the switch you want to send
; your ISUP
; traffic to. A lot of the time, this is the
; same as your
; adjpointcode.
; Now we configure our Bearer channels (CICs)
cicbeginswith = 1 ; Number to start counting the CICs from. So if
; Zap/1 to Zap/15 are CICs 1-15, you would set
; this to 1 before you
; declare channel=1-15
channel=1-15 ; Use Zap/1-15 and assign them to CICs 1-15
cicbeginswith = 17 ; Now for Zap/17 to Zap/31, they are CICs 17-31
; so we initialize
; cicbeginswith to 17 before we declare those
; channels
channel = 17-31 ; This assigns CICs 17-31 to channels 17-31
signchan = 16 ; This is where you declare which Zap channel is
; your signalling
; channel. In our case it is Zap/16. You can
; add redundant
; signalling channels by adding additional
; sigchan= lines.
; If we want an alternate redundant signalling channel add this
sigchan = 48 ; This would put two signalling channels
in our ; linkset, one at Zap/16 and one at Zap/48 which
; both would be used to send/receive
; ISUP traffic.
; End of zapata.conf
This is how a basic linkset is setup. For more detailed zapata.conf SS7
config information as well as other options available for that file, see
the default zapata.conf that comes with the samples in asterisk. If you
would like, you can do a `make samples` in your asterisk-trunk directory
and it will install a sample zapata.conf for you that contains more
information about SS7 setup.
Sunday, October 26, 2008
Sunday, October 12, 2008
SIP Strict versus Loose Routing
The way how record routing works has evolved. Record routing according to RFC2543 rewrote the Request-URIii. That means the Request-URI always
contained URI of the next hop (which can be either next proxy server which inserted Record-Route header field or destination user agent). Because of that it was necessary to save the original Request-URI as the last Route header field. This approach is called strict routing.
Loose routing, as specified in RFC3261, works in a little bit different way. The Request-URI is no more overwritten, it always contains URI of the destination user agent. If there are any Route header field in a message, than the message is sent to the URI from the topmost Route header field. This is significant change--Request-URI doesn't necessarily contain URI to which the request will be sent. In fact, loose routing is very similar to IP source routing.
Because transit from strict routing to loose routing would break backwards compatibility and older user agents wouldn't work, it is necessary to make loose routing backwards compatible. The backwards compatibility unfortunately adds a lot of overhead and is often source of major problems.
contained URI of the next hop (which can be either next proxy server which inserted Record-Route header field or destination user agent). Because of that it was necessary to save the original Request-URI as the last Route header field. This approach is called strict routing.
Loose routing, as specified in RFC3261, works in a little bit different way. The Request-URI is no more overwritten, it always contains URI of the destination user agent. If there are any Route header field in a message, than the message is sent to the URI from the topmost Route header field. This is significant change--Request-URI doesn't necessarily contain URI to which the request will be sent. In fact, loose routing is very similar to IP source routing.
Because transit from strict routing to loose routing would break backwards compatibility and older user agents wouldn't work, it is necessary to make loose routing backwards compatible. The backwards compatibility unfortunately adds a lot of overhead and is often source of major problems.
Saturday, October 11, 2008
SIP layered protocol
(1)The lowest layer of SIP is its syntax and encoding. Its encoding is specified using an augmented Backus-Naur Form grammar (BNF).
(2)The second layer is the transport layer.
(3)The third layer is the transaction layer.
(4)The layer above the transaction layer is called the transaction user(TU). Each of the SIP entities, except the stateless proxy, is a transaction user.
(2)The second layer is the transport layer.
(3)The third layer is the transaction layer.
(4)The layer above the transaction layer is called the transaction user(TU). Each of the SIP entities, except the stateless proxy, is a transaction user.
Friday, October 10, 2008
SIP Record-Route
In some cases, it may be useful for proxies in the SIP signaling path to see all the messaging between the endpoints for the duration of the session.
For example, if the biloxi.com proxy server wished to remain in the SIP messaging path beyond the initial INVITE, it would add to the INVITE a required routing header field known as Record-Route that contained a URI resolving to the hostname or IP address of the proxy.
This capability is frequently used for proxies that are providing mid-call features.
A route set is a collection of ordered SIP or SIPS URI which represent a list of proxies that must be traversed when sending a particular request. A route set can be learned, through headers like Record-Route, or it can be configured.
For example, if the biloxi.com proxy server wished to remain in the SIP messaging path beyond the initial INVITE, it would add to the INVITE a required routing header field known as Record-Route that contained a URI resolving to the hostname or IP address of the proxy.
This capability is frequently used for proxies that are providing mid-call features.
A route set is a collection of ordered SIP or SIPS URI which represent a list of proxies that must be traversed when sending a particular request. A route set can be learned, through headers like Record-Route, or it can be configured.
Subscribe to:
Posts (Atom)