Penguin
Diff: AsteriskSampleSetup
EditPageHistoryDiffInfoLikePages

Differences between version 16 and predecessor to the previous major change of AsteriskSampleSetup.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 16 Last edited on Sunday, February 1, 2004 11:24:18 pm by MattBrown Revert
Older page: version 1 Last edited on Saturday, January 24, 2004 2:22:18 am by KyleCarter Revert
@@ -1,10 +1,12 @@
-I will be adding a walkthrough to setting up a simple asterisk setup with SIP devices as i work out how to do it myself. so this will not make a working system till i have had a few days to complete the documentation  
-  
- note - most, if not all asterisk config files you need to change should be in /etc/asterisk for  
-  
-I recommend installing the asterisk sample configuration files, and renaming the ones we are modifying to .conf.old, so rename extensions.conf.old then create a new one as below. this means the asterisk samples are still there to refer to if you want to see more options, and the modules etc should all be setup correctly (we dont change these yet).  
+note - most, if not all asterisk config files you need to change should be in /etc/asterisk 
  
+I recommend installing the asterisk sample configuration files, to achieve this in the asterisk source directory type  
+ make samples  
+You probably want to renaming the ones we are modifying to .conf.old, so rename extensions.conf.old  
+ cd /etc/asterisk  
+ for i in *; do cp $i $i.old; done  
+Then create a new one as below. This means the asterisk samples are still there to refer to if you want to see more options, and the modules etc should all be setup correctly (we dont change these yet).  
  
 The first step is to configure each phone device in the extensions.conf. 
 Each phone device should be assigned to an extension as below 
  [[globals] 
@@ -84,9 +86,10 @@
  [[general] 
  ; Choose a format to save voicemails as, I use gsm format, it ends up with small files 
  format=gsm 
 
- ; if you set this to yes, the voicemail is attached as a file (so you can play it from your email directly, you may want to turn this off if your email is on another server or limited for space or for various other reasons. 
+ ; if you set this to yes, the voicemail is attached as a file (so you can play it from your email directly,  
+ ; you may want to turn this off if your email is on another server or limited for space or for various other reasons. 
 
  attach=yes 
 
  ; Each mailbox is listed in the form <mailbox>=<password>,<name>,<email>,<pager_email> 
@@ -127,4 +130,81 @@
  
 If your dialplan looks something like this now feel free to take whichever sip client you would like, point it to the sip server and see if you can register the client, using 2201 (or whichever extensions you have used), and the secrets you set in sip.conf as your password. 
 If you can register 2 machines, or 2 clients, or if your client lets you setup lets you register different profiles you should be able to register them both, and even ring from one extension to the other. 
 you should also be able to leave voicemail and check the voicemail by dialling the voicemail system on extension 8. 
+  
+----  
+  
+!STAGE ONE COMPLETE  
+ensure that you have an internally working system before going onto the next steps.  
+  
+----  
+  
+!Adding FWD to the callplan and reveiving incoming FWD calls.  
+  
+To add dialling from and to FreeWorldDialup we need to make asterisk register to teh FWD servers with the correct password and username, we also need to make FWD ring the correct phones when asterisk receives a call from FWD. To so this we need to add the following lines to extensions.conf. This configuration assumes that you also have an extension with the same number as your FWD user ID if you do not already have this extension you should add it using the templates in the previous section.  
+  
+ <in globals section>  
+ FWDUSERID=<FWDUSERNUMBER>  
+ MYNAME=<NAME>  
+ MYPHONE=<MYPHONENUMBER>  
+  
+ <in dialout context>  
+ ; If someone dials a "7" in front of their number, send to Free World Dialup  
+ include => fwd-forced  
+ include =>from-sip  
+  
+ <in context definition part of config file>  
+ [[fwd-forced]  
+ ; Check to see if the called number starts with a "7" and  
+ ; if so, set the call parameters and bounce the call to the  
+ ; Free World Dialup SIP server.  
+ ;  
+ ; NOTE: Calls to unknown users will result in "invalid extension"  
+ ; message being played.  
+ ;  
+ exten => _7.,1,SetCallerID(${FWDUSERID})  
+ exten => _7.,2,SetCIDName(${MYNAME})  
+ exten => _7.,3,Dial(SIP/${EXTEN:1}@fwd)  
+ exten => _7.,4,Playback(invalid)  
+ exten => _7.,5,Hangup  
+  
+ [[from-sip]  
+ ; To receive calls inbound from FWD, we set the extension  
+ ; to our FWD user ID, in this case 94896  
+ ; Changing the "Dial"  
+ ; directive to something like this:  
+ ; Dial(${PHONES1}&${PHONES2},15,Ttm)  
+ ; would cause both lines to ring  
+ ;exten => 94896,1,Dial(${PHONES2}&${PHONES1},15,Ttm)  
+ ;exten => 94896,2,Voicemail2(u${PHONES1VM})  
+ ;exten => 94896,3,Hangup  
+ ;  
+ exten => ${FWDUSERID},1,Dial(${PHONES1}&${PHONES2},30,Ttm)  
+ exten => ${FWDUSERID},2,Voicemail2(u${PHONES1VM})  
+ exten => ${FWDUSERID},3,Hangup  
+  
+ <in home context of extensions.conf>  
+ include => dialout  
+  
+in sip.conf we have to setup the passwords etc for the FWD account this is done as below  
+  
+ ; Here we register our FWD phone number so that when someone calls it,  
+ ; we'll be able to receive that incoming call over SIP.  
+ ;  
+ register=<FWDUSERID>:<FWDPASSWORD>@fwd.pulver.com/<FWDUSERID>  
+ ;  
+ ; Next we set up some more info for FWD . this part is what will  
+ ; allow us to make outgoing calls over SIP using FWD.  
+ ;  
+ [[fwd]  
+ type=friend  
+ secret=<FWDPASSWORD>  
+ username=<FWDUSERID>  
+ host=fwd.pulver.com  
+ dtmfmode=inband  
+ context=home  
+ nat=yes  
+ reinvite=no  
+ canreinvite=no  
+ disallow=all  
+ allow=all