Академический Документы
Профессиональный Документы
Культура Документы
Table of Contents
Introduction ........................................................................................................................................................................... 3 Network Topology ................................................................................................................................................................. 3 Equipment Detail................................................................................................................................................................... 3 Configuration of the Fax Extension ....................................................................................................................................... 4 Configuration of the PBX Trunk ............................................................................................................................................ 7 Configuration of the PSTN Lines......................................................................................................................................... 11 General Configuration of the Mediatrix 3732 with Asterisk ................................................................................................. 16
Page 2 of 16
Introduction
This document outlines the configuration steps required to connect a Mediatrix 3000 series gateway with a 6FXO/2FXS card to an Asterisk open-source telephone system. It assumes that you have an Asterisk server properly installed. If you need technical assistance to configure your Asterisk server, the Media5 technical team can provide appropriate support to help you realizing your VoIP projects.
Network Topology
In the scenario used throughout this document, the Mediatrix 3732 (1 PRI, 6 FXO/2FXS) is used to: interface a PBX with an IP-PBX; provide PSTN access via analog lines; provide IP connectivity to analog phones and fax machines.
IP
Ext. 1+3
The Asterisk IP-PBX provides: Call routing, Dial Plan o Including routes to local PSTN gateways Telephony services (voicemail, call forwarding, etc,) to IP users SIP Endpoints management Auto-Attendant
Equipment Detail
The configuration presented in this document applies to all FXO and/or PRI products running the DGW v2.0 firmware. Since we will concentrate on the configuration of the Mediatrix 3732, it is assumed that the Mediatrix 4102S and the IP phone are correctly configured with the IP-PBX and are able to make calls. Different Mediatrix products can be used depending on the needs. This configuration note was written and validated using the following platform and versions: Mediatrix 3732 DGW v2.0.8.118 Asterisk version 1.4.29.1
Page 3 of 16
In the extensions.conf make sure the context exists: [InternalExtensions] exten => _1XX,1,Dial(SIP/${EXTEN},40,) ; This context currently allows the extensions to call each other.
3.
Reload the Asterisk settings by connecting to the Asterisk CLI (asterisk r) and typing the reload command.
If you want to use the T.38 protocol to transfer faxes, you can follow the procedure of the Configuration Notes 0259 Mediatrix 41xx With Asterisk web. If you use clear channel, skip this configuration.
Page 4 of 16
Configuration Notes 296 3. In the SIP -> Servers section, set the IP address of your registrar and proxy. They are often the same as in our example scenario:
If your setup requires an outbound proxy or uses different port, you will also need to configure these in this web page. If your SIP server uses the default port (5060), we recommend putting :0 after the IP address to indicate to use the default port. 4. After clicking Submit, you will be presented with a message requesting to restart a service. We can go ahead and restart it now.
We can go ahead and restart it now. Follow the link, or go to the System -> Services section and click the Restart Required Services button.
Page 5 of 16
Configuration Notes 296 5. In the SIP -> Registrations section, configure the User Name, Friendly Name and Gateway for the FXS port used by the fax and click the Submit & Refresh Registration button. Here is what the configuration would look like in our scenario :
6.
In the SIP -> Authentication section, configure the authentication for the User Name configured for the FXS port by clicking on the Edit button on an empty authentication line. In our example, we will configure an authentication for the endpoint (FXS/1) to make sure this user name and password combination does not conflict with other user names we will configure. We will also disable the realm validation. We could also enter the realm asterisk, but since we will only use one realm in our scenario, it is simpler to disable the validation.
When the configuration is done, click the Submit & Refresh Registration button. 7. In the SIP -> Registrations section, the registration status should now be Registered.
8.
After the registration is successful, the IP phone and Mediatrix 4102 should be able to call the fax extension.
Page 6 of 16
In the extensions.conf, add a context for calls coming from the PBX: [FromPBX] exten => _1XX,1,Dial(SIP/${EXTEN},40,) ; This allows the PBX users to reach extensions 100 to 199. The ; Asterisk server will make the extension ring for 40 seconds.
3.
Still in extensions.conf, modify the context of the extensions to allow them to send calls to the PBX: [InternalExtensions] exten => _1XX,1,Dial(SIP/${EXTEN},40,) exten => _2XX,1,Dial(SIP/${EXTEN}@PBXTrunk,40,)
; This allows the IP phone and Mediatrix 4102S to ; reach the PBX extensions 200 to 299
4.
Reload the Asterisk settings by connecting to the Asterisk CLI (asterisk r) and typing the reload command.
If you want to use the T.38 protocol to transfer faxes, you can follow the procedure of the Configuration Notes 0259 Mediatrix 41xx With Asterisk web. If you use clear channel, simply skip this configuration.
Page 7 of 16
2.
Create a new SIP gateway in the Mediatrix 3732. This gateway will be used to differentiate the calls coming from the PBX and the calls from the PSTN (analog lines). The tactic is to use different SIP ports so that Asterisk sees the PBX calls and the PSTN calls coming from two separate users (sip.conf) and can separate those users into different contexts (extensions.conf). This way, we can control the dial plan (context) of each type of calls. In the SIP -> Gateways section, type a new gateway name and click on the + sign to add a new gateway.
Page 8 of 16
Configuration Notes 296 3. Enter the port number configured in the Asterisk user for the new gateway and click Submit.
4. 5.
Restart the required services In the SIP -> Authentication section, configure the Authentication for the User Name of the user created in the Asterisk configuration file by clicking on the Edit button on an empty authentication line. In our example, we will configure an authentication for the Gateway to make sure this user name and password combination is only used for calls coming and going to the new Gateway we have configured.
6. 7.
When the configuration is done, click the Submit button. Go to the Call Router -> Status section. You will see that the Mediatrix unit has already created some routes for the FXS port we configured earlier.
8. 9.
We will now create routing rules for the E1T1 port connected to the PBX. Go to the Call Router -> Route Config section. Add a new Route by clicking the + sign in the Route section.
Page 9 of 16
Configuration Notes 296 10. In the new window, open the suggestion box next to the Sources and select the E1T1 port. Here is what it should look like :
11. Open the suggestion box next to the Destination and select the gateway we have created earlier :
12. Click the Submit button to add the route. This route will send calls that come from the PBX to the Asterisk server. We now need a route to send the calls from the Asterisk to the PBX. 13. Add a new Route by clicking on the + sign in the Route section. 14. In the new window, open the suggestion box next to the Sources and select the PBX gateway.
Page 10 of 16
Configuration Notes 296 15. Open the suggestion box next to the Destination and select the E1T1 port.
16. Click the Apply button at the bottom of the page to activate the new routes. The yellow Config modified indicator should return to normal. After the routes are applied, the IP phone, Mediatrix 4102 and fax extension should be able to dial the 2xx extensions available on the PBX and vice-versa.
In the extensions.conf, add a context for calls coming from the PSTN: [FromPSTN] exten => 900,1,Answer() exten => 900,2,Background(Company-Prompt) exten => 900,3,Hangup() exten => _1XX,1,Dial(SIP/${EXTEN},40,) exten => _2XX,1,Dial(SIP/${EXTEN}@PBXTrunk,40,)
;This plays a prompt (IVR) to the calling party and ; allows it to dial extensions
; This allows the IP phone and Mediatrix 4102S to ; reach the PBX extensions 200 to 299
3.
In the extensions.conf, modify the context of the PBX to allow the PBX users to send calls to the PSTN: [FromPBX] exten => _1XX,1,Dial(SIP/${EXTEN},40,) exten => _9X.,1,Dial(SIP/${EXTEN:1}@PSTNTrunk,40,)
Page 11 of 16
Configuration Notes 296 ; and removes the 9 before dialling the number. 4. In the extensions.conf, modify the context of the extensions to allow them to send calls to the PBX: [InternalExtensions] exten => _1XX,1,Dial(SIP/${EXTEN},40,) exten => _2XX,1,Dial(SIP/${EXTEN}@PBXTrunk,40,) exten => _9X.,1,Dial(SIP/${EXTEN:1}@PSTNTrunk,40,) 5.
; This allows the IP phone and Mediatrix 4102S to ; dial on the PSTN.
You can reload the Asterisk settings by connecting to the Asterisk CLI (asterisk r) and typing the reload command.
3. 4.
Restart the required services. In the SIP -> Authentication section, configure the Authentication for the User Name of the user we created in the Asterisk configuration file by clicking on the Edit button on an empty authentication line. In our example, we will configure an authentication for the Gateway to make sure this user name and password combination is only used for calls coming from and going to the new Gateway we have configured.
5. 6. 7.
When the configuration is done, click the Submit button. Go to the Call Router -> Config section. We will now create routing rules for the FXO ports. Add a new Route by clicking the + sign in the Route section.
Page 12 of 16
Configuration Notes 296 8. In the new window, open the suggestion box next to the Sources and select the FXO ports one after the other until all the ports appear in the Value field. If only some ports are used, add only the ports that have a line connected to them. Here is what it should look like:
9.
Open the suggestion box next to the Destination and select the gateway we have created earlier:
10. Click the Submit button to add the route. This route will send calls that come from the PSTN to the Asterisk PBX. 11. To add a new route that will send calls from Asterisk to the PSTN, you must begin by adding a new Hunt. Click the + sign in the Hunt section. 12. Give a Name to the Hunt group. We will use PSTN in our example.
Page 13 of 16
Configuration Notes 296 13. Open the suggestion box next to the Destinations and select the FXO ports one after the other until all the ports appear in the Value field. Here is what it should look like :
14. Click the Submit button when done. This hunt allows us to take the first free line plugged in the Mediatrix unit when a call comes from the Asterisk server to the PSTN. 15. Add a new Route by clicking the + sign in the Route section. 16. In the new window, open the suggestion box next to the Sources and select the PSTN gateway. 17. Open the suggestion box next to the Destination and select the new hunt we created.
18. Click the Submit button. 19. Click the Apply button at the bottom of the page to activate the new routes. The yellow Config modified indicator should return to normal.
Page 14 of 16
Configuration Notes 296 20. If you have followed all the steps, the Call Router configuration should look as follows:
21. After the routes are applied, the PBX users and the IP users should now be able to send calls to the PSTN. 22. By default, the Mediatrix FXO ports answer any incoming call and play a dial tone enabling the remote calling party to dial an extension. To have the Mediatrix automatically call an IVR on the Asterisk server instead, we must configure the Automatic Call feature on the FXO ports. 23. In the Telephony -> Services section, select the first FXO endpoint (Slot3/FXO1). 24. In the Automatic Call section, set the Endpoint Specific to Yes. 25. Enable the Automatic Call Activation.
Page 15 of 16
Configuration Notes 296 26. Set the Automatic Call Target to the number of the IVR configured in the Asterisk Server (900).
27. Repeat the three last steps for each endpoint you need configured.
Page 16 of 16