System information

You can verify that Asterisk has loaded your configuration by running the dahdi show
channels CLI command:
*CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 LocalSets default In Service
2 LocalSets default In Service
3 LocalSets default In Service
4 LocalSets default In Service
For detailed information on a specific channel, you can run dahdi show channel 1.
A Basic Dialplan to Test Your Devices
We’re not going to dive too deeply into the dialplan just yet, but an initial dialplan that
you can use to test your newly registered devices will be helpful. Place the following
contents in /etc/asterisk/extensions.conf:
[LocalSets]
exten => 100,1,Dial(SIP/0000FFFF0001) ; Replace 0000FFFF0001 with your device name
exten => 101,1,Dial(SIP/0000FFFF0002) ; Replace 0000FFFF0002 with your device name
;
; These will allow you to dial each of the 4 analog phones configured
; in the previous section.
;
exten => 102,1,Dial(DAHDI/1)
exten => 103,1,Dial(DAHDI/2)
exten => 104,1,Dial(DAHDI/3)
exten => 105,1,Dial(DAHDI/4)
exten => 200,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
This basic dialplan will allow you to dial your SIP devices using extensions 100 and
101. The four lines of the analog card can be dialed with extensions 102 through 105,
respectively. You can also listen to the hello-world prompt that was created for this
book by dialing extension 200. All of these extensions are arbitrary numbers, and could
be anything you want. Also, this is by no means a complete dialplan; we’ll develop it
further in later chapters.
You will need to reload your dialplan before changes will take effect in Asterisk. You
can reload it from the Linux shell:
$ sudo asterisk -rx "dialplan reload"
A Basic Dialplan to Test Your Devices | 103