Free Essay

Netw320 Lab 5-6

In:

Submitted By bigjohnlapp457
Words 1252
Pages 6
NETW320
Week 5 and week 6 – Asterisk* Lab

Here You can see that the address is set and that the Ports are now active.

And I can get a line for 3 seconds Using my windows phone but it doesn’t stay connected. I have now been working on getting tested with Chas from class

This is the coding that I used to set up my Config line. I am still working on the configuration setup.This was taken out of the Red Hat Book.
John's extensions.conf

[general] static=no writeprotect=no autofallthrough=yes clearglobalvars=yes priorityjumping=no

[globals] ; Incoming calls to these numbers will be routed to the specified peer. peer-5555551234 = SIP/mango peer-5555554321 = SIP/mangosteen ; Incoming calls to these numbers will be routed to the specified context. context-8775551234 = DISA-in,s,1 ; These names will override whatever is sent as the Caller ID Name for incoming calls. callerid-5555556789 = Joe Blow ; These are the peers outgoing calls may be routed through, in order. If one is unreachable, Asterisk will attempt to use the next one. outgoing-1 = VoIPmsUS3 outgoing-2 = Callcentric ; This is the password for use with DISA. disa-pass = 1234567

[devices] ; When a device wishes to place a call, Asterisk will attempt to match the dialed number in the following contexts, in this order: include => special include => outgoing

; We use this context for anything that should not simply dial out via a VoIP provider. [special] ; This is the call recorder. To use, conference extension 200 into your call. exten => 200,1,Answer() ; Note that it may or may not be legal to record a telephone call in your area. Check with your local authorities if you are unsure. exten => 200,n,Playback(beep) ; Record any calls to this extension in u-law format. You may record in wav as well but it requires more system resources. exten => 200,n,MixMonitor(/opt/recordings/${UNIQUEID}.ulaw) ; Record for a maximum of 15 minutes. exten => 200,n,Wait(900) exten => 200,n,Playback(beep) exten => 200,n,Hangup() ; Music-on-Hold test. exten => 202,1,Answer() exten => 202,n,MusicOnHold() exten => 202,n,Hangup() ; For Canadians: if 1-800 (1-866, 1-877, 1-888) is dialed, route through a Canadian carrier. This plan does not match 800 (without the ; leading 1) so they will be routed through the default (in our case American) carrier. exten => _18[0678][0678]NXXXXXX,1,Dial(SIP/${EXTEN}@VoIPmsCA2) ; This will also match other non-TF area codes such as 867 but that's fine. exten => _18[0678][0678]NXXXXXX,n,Hangup

; This is the context which allows devices to place outgoing calls. [outgoing] exten => _[*#0-9].,1,NoOp ; Try to route the call internally first. Does context-${EXTEN} exist? exten => _[*#0-9].,n,GotoIf($[${LEN(${context-${EXTEN}})}!=0]?${context-${EXTEN}}); ; Does ${peer-[${EXTEN}} exist? exten => _[*#0-9].,n,GotoIf($[${LEN(${peer-${EXTEN}})}==0]?external) exten => _[*#0-9].,n,Dial(${peer-${EXTEN}}) ; We were not able to route the call internally. So, route the call with a VoIP provider. Start with the first peer in the list. exten => _[*#0-9].,n(external),Set(peer=1) ; trypeer: If the status is UNREACHABLE or UNAVAILABLE, go to failover. (You must set qualify=yes in the peer's context in sip.conf for ; this to work.) exten => _[*#0-9].,n(trypeer),GotoIf($["${SIPPEER(${outgoing-${peer}},status)}"="UNREACHABLE"|"${SIPPEER(${outgoing-${peer}},status)}"="UNAVAILABLE"]?failover) ; Attempt to send the call out through ${outgoing-${peer}}. exten => _[*#0-9].,n,Dial(SIP/${EXTEN}@${outgoing-${peer}}) ; If it didn't work, go to failover. exten => _[*#0-9].,n,NoOp(${DIALSTATUS}) exten => _[*#0-9].,n,GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"|"${DIALSTATUS}"="CONGESTION"]?failover) exten => _[*#0-9].,n,Hangup ; failover: Increment peer by one. If outgoing-${peer} exists, go to trypeer. exten => _[*#0-9].,n(failover),Set(peer=$[${peer}+1]) exten => _[*#0-9].,n,GotoIf($[${LEN(${outgoing-${peer}})}!=0]?trypeer) ; If we're here, then we were not able to place the call through any peer. Play a message to the caller saying that outgoing lines ; are unavailable. exten => _[*#0-9].,n,Playback(all-outgoing-lines-unavailable) exten => _[*#0-9].,n,Hangup ; Some possible ${DIALSTATUS} values: ; Improperly formatted number -> CHANUNAVAIL ; Unable to reach server -> CHANUNAVAIL ; bad password in sip.conf -> CONGESTION ; Some possible ${SIPPEER(${outgoing-${peer}},status)} values: ; Improperly formatted number -> OK (36ms) ; Bad password in sip.conf -> OK (36ms) ; Unable to reach server -> UNREACHABLE ; qualify=no -> Unmonitored

; This is the context where we route incoming calls from VoIP providers. [incoming] exten => _NXXNXXXXXX,1,Ringing ; Override the Caller ID, if necessary. exten => _NXXNXXXXXX,n,Set(CALLERID(name)=${IF($[${LEN(${callerid-${CALLERID(number)}})}!=0]?${callerid-${CALLERID(number)}}:${CALLERID(name)})}) ; Capitalize the first letter of each word in the Caller ID. This is purely for cosmetic purposes. Requires gnu-sed; use ipkg install sed ; if you're running Asterisk on Tomato. exten => _NXXNXXXXXX,n,Set(CALLERID(name)=${SHELL(echo -n ${CALLERID(name)} | gnu-sed 's/\(\w\)\([^ ]*\)/\U\1\L\2/g')}) ; Go to another context, if necessary. This is used for DISA. You could also use it for an IVR. exten => _NXXNXXXXXX,n,GotoIf($[${LEN(${context-${EXTEN}})}!=0]?${context-${EXTEN}}); ; The only thing left to try is a peer. exten => _NXXNXXXXXX,n,GotoIf($[${LEN(${peer-${EXTEN}})}=0]?notfound) exten => _NXXNXXXXXX,n,Dial(${peer-${EXTEN}}) ; Neither a peer nor a context is configured for ${EXTEN}. Claim congestion. exten => _NXXNXXXXXX,n(notfound),Congestion

; Incoming calls may be routed to this context. If they are, Asterisk will ask them to enter their password. [DISA-in] exten => s,1,Set(TIMEOUT(response)=20) exten => s,n,Set(TIMEOUT(digit)=20) ; For some reason, after you enter the password, Asterisk waits for the digit timeout, not the response timeout, for you to begin entering the number you wish to dial. If the number you have dialed cannot be matched by any other extension in the DISA-out context, Asterisk will dial immediately without waiting the 20 seconds. exten => s,n,Wait(.5) exten => s,n,Playback(after-the-tone) exten => s,n,Playback(enter-password) ; Give the user a dial tone and let them dial a number as defined by DISA-out. exten => s,n,DISA(${disa-password},DISA-out) ; This is the context that DISA users are allowed to access. [DISA-out] ; Go to the context-${EXTEN} context, if it exists. exten => _NXXNXXXXXX,1,GotoIf($[${LEN(${context-${EXTEN}})}!=0]?${context-${EXTEN}}); ; If there is no variable named peer-${EXTEN}, then go to the disa-external context. exten => _NXXNXXXXXX,n,GotoIf($["${LEN(${peer-${EXTEN}})}"="0"]?disa-external) ; I couldn't get internal calls to ring, so I play this message: exten => _NXXNXXXXXX,n,Playback(pls-wait-connect-call) exten => _NXXNXXXXXX,n,Dial(${peer-${EXTEN}}, 18) ; If the call wasn't answered, go to the disa-external context so we'll be routed to the externally-hosted voicemail. exten => _NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}"!="ANSWER"]?disa-external) exten => _NXXNXXXXXX,n,Hangup ; Use Transfer() instead of Dial() so that we do not proxy the audio. ${CHANNEL(peerip)} is the IP of the VoIP server. exten => _NXXNXXXXXX,n(disa-external),Transfer(SIP/${EXTEN}@${CHANNEL(peerip)}) exten => _1NXXNXXXXXX,1,Transfer(SIP/${EXTEN}@${CHANNEL(peerip)})

Similar Documents

Premium Essay

Computer

...NETW320 -- Converged Networks with Lab Lab #4 Title: IPv4 TOS and Router Queuing – Cont. Procedure Start OPNET IT Guru Open the scenario 1. Select File/Open. 2. Select Computer or My Computer (depending on your O/S). You may also need to allow Citrix access to your computer. 3. On your F: drive, open the op_models and then open the NETW320 folder. 4. Open the Lab2_RouterTOS.project 5. Click on Lab2_RouterTOS.prj 6. Click Open. The project should open. 7. Choose Scenarios > Switch To Scenario > FIFO Configure the Simulation Run 1. We are now ready to configure the Simulation Run. Select the Configuration/Run Discrete Event Simulation tab (the running man) from the tool bar. The following screen will open. 2. Set the Duration to 4 (if it is not set) and change hour(s) to minute(s). 3. Click Apply and Cancel. 4. Go to File > Save, to save your configuration. 5. Before we duplicate the scenarios, now would be a good time to run the first simulation to ensure we have all the configurations made correctly. Once we copy them over to the PQ and WFQ scenarios, if something is configured incorrectly, that mistake will be transferred over. 6. Select the running man icon again to bring up the Configuration/Run Discrete Event Simulation panel again and click Run. The Simulation Execution window will open and the sim will start. 7. When the Sim completes and the Close window lights, click it to end. 8. We are now ready to look at the results. From the tool...

Words: 2594 - Pages: 11

Free Essay

Netw320 W2

...NETW320 -- Converged Networks with Lab Lab # 2 Title: Silent Suppression – Cont. Procedure Start OPNET Modeler Open the scenario 1. Select File/Open. 2. Select Project. 3. Open your f: drive. (Note: If you don’t see drive F: listed, you click on “My Computer or “Computer” first.) 4. Open your op_models directory. 5. Open your NETW 320 directory. 6. Open the Lab1_Silent.project folder. 7. Click on Lab1_Silent.prj. 8. Click OK. The project should open. 9. Choose Scenarios > Switch to Scenario > Silent_Suppression. Results analysis 1. We are now ready to look at the results. From the tool bar, select DES > Results > View Results. 2. The Results Browser will appear. You may have to expand the items in the top left panel and click on them to get Global Statistics to appear in the bottom left panel. 3. Expand Global Statistics and select the following (4) statistics: Expand Select DB Query Response Time (sec) HTTP Page Response Time (sec) E-mail Download Response Time (sec) Voice Packet End-to-End Delay (sec) 4. You can adjust the size of the panels as you wish by hovering the cursor over the panel border until it changes to the adjust line cursor, and then hold the left mouse button to set the panel size. 5. Change the view from As Is to Time Average using the dropdown menu on the lower right-hand side. Remember, your results may not be exactly the same but they should be very similar. 6. Click Show. A graph similar...

Words: 1759 - Pages: 8

Premium Essay

Net320

...NETW320, Patrick Price 5/18/2014 Lab #2, Silent Suppression Lab Report 1. On the Results Browser, make sure you are on Current Project so you have both sets of results. Expand DB Query and Select DB Query Response Time (sec). Hit the Show button. Zoom into the last half portion of the graph for better granularity and to avoid start up oscillation time to stabilize. Copy and label this graph to your lab report and answer the following: 1. Which run has a better (lower) DB Query Response time? This shows the silent suppression has a lower db time. 2. In regard to your answer to part a, approximate how much faster (in seconds or milliseconds) of a response time the better scenario has. Its .22 seconds faster. 2. Expand E-mail and select Download Response Time (sec). Select Show and zoom into the last half portion of the graph for better granularity and to avoid start up oscillation time to stabilize. Copy and label this graph to your lab report and answer the following: 3. Which run has a better (lower) e-mail Download Response time? Again it’s the silent suppression that had a email response. 4. In regard to your answer to part a, approximate how much faster (in seconds or milliseconds) of a response time the better scenario has. It was .4 seconds faster. 3. Expand HTTP and s elect Page Response Time (sec). Select Show and zoom into the last half portion of the graph for better granularity and to avoid start up oscillation time to stabilize...

Words: 726 - Pages: 3

Free Essay

Netw320 W3 Lab

...NETW320 -- Converged Networks with Lab Lab #3 Title: IPv4 TOS and Router Queuing Objectives In this lab, you will work with an intranet for an organization that will encompass four different site locations in different cities. The subnets of these locations will be connected by a backbone IP network. The organization will be using a converged network that allows data and real-time voice traffic to traverse the same packet-switched network. The data traffic will consist of FTP (file transfer protocol) and email traffic and the voice traffic will be a VoIP (Voice over Internet Protocol) implementation. You will experiment with various router queuing policies to see how routers within a TCP/IP network can be utilized to support QoS (Quality of Service) within a converged network that is based on TCP/IP. Explanation and Background Traditional voice and data applications have been kept on separate networks. The voice traffic is confined to a circuit-switched network while data traffic is on a packet-switched network. Often, businesses keep these networks in separate rooms, or on different floors, within buildings that they own or lease (and many still do). This requires a lot of additional space and technical manpower to maintain these two distinct infrastructures. Today’s networks call for the convergence of these circuit-switching and packet-switching networks, such that voice and data traffic will traverse a common network based on packet switching. A common WAN technology...

Words: 2956 - Pages: 12

Premium Essay

Netw320

...Cedric Clinton NETW320 Professor: Steve Gonzales Lab Report week2 1. On the Results Browser, make sure you are on Current Project so you have both sets of results. Expand DB Query and Select DB Query Response Time (sec). Hit the Show button. Zoom into the last half portion of the graph for better granularity and to avoid start up oscillation time to stabilize. Copy and label this graph to your lab report and answer the following: 1.) Which run has a better (lower) DB Query Response time? The scenario that runs the silence suppression (red line on my lab) has the best DB query response time. 2.) In regard to your answer to part a, approximate how much faster (in seconds or milliseconds) of a response time the better scenario has. The faster scenario that runs silence suppression is approximately 0.2 seconds faster. 2. Expand E-mail and select Download Response Time (sec). Select Show and zoom into the last half portion of the graph for better granularity and to avoid start up oscillation time to stabilize. Copy and label this graph to your lab report and answer the following: 3.) Which run has a better (lower) e-mail Download Response time? The scenario that runs the silence suppression (red line on my lab) has the lower email download response time. 4.) In regard to your answer to part a, approximate how much faster (in seconds or milliseconds) of a response time the better scenario has. The scenario that runs silence suppression is approximately...

Words: 1098 - Pages: 5