Section 1 Flashcards
(31 cards)
How do you setup asterisk?

What are the standard asterisk ports?
Standard SIP Port: UDP 5060
Standard Media Port Range: UDP 10000-20000
IAX2 Standard Port: UDP 4569
What the typical layout of a asterisk based infrastructure?

Where do you create phone extensions?
sip.conf
How can you create a phone extension?
[extension]
type=friend
secret=[password]
disallow=all
allow=alaw
host=dynamic
context=[extension-context]
qualify=yes

Where do you create extension contexts?
extensions.conf
What does sip reload do?
reloads the sip.conf file
How do you reload all configuration files?
reload
Where do you create voicemails?
voicemail.conf
How do you create a simple voicemail?
[exten] => [password],[name],[email]
e.g.
[internal-vm]
101 => 123456,John Doe,john-email@gmail.com
Then add in sip.conf:
mailbox=101@internal-vm

How do you set a dialplan to go to a voicemail?
exten => 1,1,Answer
exten => 1,n,NoOp(This-is-a-sample-context)
exten => 1,n,Voicemail(101@internal-vm)
exten => 1,n,Hangup()
How do you set a dialplan to dial a number?
exten => 101,1,Answer
exten => 101,n,NoOp(internal-phone-call)
exten => 101,n,Dial([protocol]/[trunk]/[number], [call-time], [options]);
exten => 101,n,Hangup()
Note: You can exclude a trunk if it is an internal call
Why after the following dial plan does the call not go to voicemail after answer?
exten => 101,1,Answer
exten => 101,n,NoOp(internal-phone-call)
exten => 101,n,Dial(SIP/101,12,r);
exten => 101,n,Hangup()
Because the ‘g’ option was not specified, without the ‘g’ option, when an answered call is hungup the dial plan execution wont continue
What are the default standard extensions?
- s: Start. Used primarily for dialplans that enter a context with no other extension information. Think of a non DID phone line, call comes in, and we may only know that the line is ringing and nothing else. Even if you knew callerid, you have to still have a place to start. You can also think about s as a place to place part of the dialplan that you don’t want callers to get back to unless they have passed through other functions.
- t: Timeout. Used for when calls have been inactive after a prompt was played. Also used to hang up a line that has been idle.
- T: AbsoluteTimeout. Used for calls that have been hung up due to an AbsoluteTimeout() being reached. For example useful to play a notification with Playback().
- h: Hangup. Used to clean up a call. Could be used to play a goodbye message before hanging up. Also seemingly used by the calling card people to record end of call for billing purposes. h won’t run if the call is parked. More…
- i: Used when dialling an unknown extension in a context or unknown input in an IVR menu
Why do you need to register with a SIP trunk?
You need to register so that the trunk provider knows where to route calls to when an inbound call comes in
Where do you place register strings?
In the general context within sip.conf
What does the underscore mean in an asterisk dialplan?
It tell asterisk that the extension contains pattern matching characters
e.g.
_1XX will match 101, 102, 103, 115 etc…
Note: Extension dial plan with literal values will be given priority over pattern matching ones
What is the ${EXTEN} variable?
It is the value of the extension that was dialed
What is the difference between the type user, friend and peer?
- peer: A SIP entity to which Asterisk sends calls (a SIP provider for example). If you want a user (extension) to have multiple phones, define an extension that calls two SIP peers. The peer authenticates at registration.
- user: A SIP entity which places calls through Asterisk (A phone which can place calls only). Users authenticate to reach services with their context.
- friend: An entity which is both a user and a peer. This make sense for most desk handsets and other devices. Asterisk will create two objects, one peer and one user, with the same name.
What are the asterisk pattern matching characters?
- X matches any digit from 0-9
- Z matches any digit from 1-9
- N matches any digit from 2-9
- [1237-9] matches any digit or letter in the brackets
- [a-z] matches any lower case letter
- [A-Z] matches any UPPER case letter
- . wildcard, matches one or more characters
- ! wildcard, matches zero or more characters immediately
What are the different config files?

What is FastAGI?
Technically speaking, FastAGI is different in the following context: when Asterisk executes an AGI script via FastAGI, the resources required for the AGI script to run are consumed by a completely different process, and not Asterisk. In addition, the communications that were previously based on internal STDIN/STDOUT communications are now based on a TCP socket. This means that your AGI script, now actually an AGI server, can be operated and maintained on a completely different server, enabling you to separate the application logic from the Asterisk dialplan logic.
How do you see all AGI commands?
‘agi show’
What are blocking applications?
Blocking applications include the following: Dial, MeetMe, MusicOnHold, Playback (when dealing with long playbacks), Monitor, ChanSpy, and other applications that have an unknown execution duration.
