Dexgate

Configuration

Modification of the jswitch.properties configuration file

After stopping the service (Dexgate), use any text editor to open the file jswitch.properties in the folder:

<Path d'installazione del DexgateMicro>\prop

and search inside it to find the block regarding Messagenet provider.

Remove comments from lines inside this block (by removing # character at the beginning of the line) as shown below:

## Trunk Provider Messagenet #channels.phone.jswitch.trunks.trunk-MESSAGENET.classname=it.tradesoft.tegate.channels.CorbaChannel.jswitch.trunks.sip.SipTrunk #channels.phone.jswitch.trunks.trunk-MESSAGENET.port=4002 #channels.phone.jswitch.trunks.trunk-MESSAGENET.public.address=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.enable=yes #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.ttl=20 #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address=stun.fwdnet.net #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.port=3478 #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup.address=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup.port=3478 #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup2.address=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup2.port=3478 #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address.detector.enable=yes #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address.detector.port=4101 #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address.detector.ttl=20 #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.enable=yes #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.domain=sip.messagenet.it #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.name=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.password=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.address=sip.messagenet.it #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.port=5061 #channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.refresh=170 #channels.phone.jswitch.trunks.trunk-MESSAGENET.checkbusytable=no #channels.phone.jswitch.trunks.trunk-MESSAGENET.limbo.enable=no #channels.phone.jswitch.trunks.trunk-MESSAGENET.video.enable=no #channels.phone.jswitch.trunks.trunk-MESSAGENET.codecs.0.classname=it.tradesoft.tegate.rtp.codecs.gsm #channels.phone.jswitch.trunks.trunk-MESSAGENET.codecs.1.classname=it.tradesoft.tegate.rtp.codecs.alaw #channels.phone.jswitch.trunks.trunk-MESSAGENET.callernumber.default=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.sessionprogress.ignoring=yes #channels.phone.jswitch.trunks.trunk-MESSAGENET.sessionprogress.connect=yes #channels.phone.jswitch.trunks.trunk-MESSAGENET.response4xx.action=REMOTE_BUSY #channels.phone.jswitch.trunks.trunk-MESSAGENET.max.resources.enable=no #channels.phone.jswitch.trunks.trunk-MESSAGENET.max.resources.number=***** #channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.enable=yes #channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.min=***** #channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.max=*****

Now, let's suppose that Messagenet has assigned us the following account:

  • Landline telephone number: 02999888777
  • URI (SIP client identification): 5353535
  • Messagenet server IP address: sip.messagenet.it
  • Password: 123pass456

We will have to modify the following lines inside the block:

  • The registrar.name parameter, that will be set up with the SIP client identification that Messagenet has assigned us (in this case 5353535)
  • The registrar.password parameter, that will be set up with the password of the account that Messagenet has assigned us (in this case 123pass456)
  • The callernumber.default parameter, that must be set up the same way as the client identification (in this case 5353535)
  • Optionally, the stun.backup.address and stun.backup2.address parameters, that will be set up with email addresses of possible backup stun servers. If you don't want to assign values to these fields, leave comments for the corresponding line and also for the line of the respective port parameter: stun.backup.port and stun.backup2.port

Leave comments for the following properties because their use is optional and they sometimes enter in conflict with others properties:

  • Public address: used when there is a static ip and the router is not port forwarding; if the ip is set to static, there is no need to ask the stun server, properties of the stun server must be commented

#channels.phone.jswitch.trunks.trunk-MESSAGENET.public.address=***

  • Maximum numbers of resources on the trunk: if the provider allows receiving more than one call at the same time per account, max.resouces can be enabled, in order to limit the number of simultaneous calls per trunk for the specified value.
    To enable it, remove comments of the two lines pertaining to max.resources, enable and enter the maximum number of resources as in example 2. The configuration file will appear as follows:

channels.phone.jswitch.trunks.trunk-MESSAGENET.max.resources.enable=yes
channels.phone.jswitch.trunks.trunk-MESSAGENET.max.resources.number=2

  • Range of ports used by the trunk: you must know them if you want to open ports on the corporate firewall. If there is no problem with the firewall, leave comments for properties

channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.enable=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.min=***** channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.max=*****

Otherwise, just remove comments from these lines and set the proper port range indicating the minimum and the maximum value. The corresponding ports, in addition to the one which the trunk has been set to listen for (in the example, port 4002) must be opened on the firewall and internally routed to Dexgate.

In the example, we will use:

  • the stun server and not the public address
  • a maximum number of calls equal to 2
  • a port range between 10010 and 10019 (NOTE: for every simultaneous call, 3 rtp ports are used, so the port range must be at least three times wider than the number of simultaneous calls you want to make on the trunk)

The block must be then set up as follows:

## Trunk Provider Messagenet channels.phone.jswitch.trunks.trunk-MESSAGENET.classname=it.tradesoft.tegate.channels.CorbaChannel.jswitch.trunks.sip.SipTrunk channels.phone.jswitch.trunks.trunk-MESSAGENET.port=4002 #channels.phone.jswitch.trunks.trunk-MESSAGENET.public.address=**** channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.enable=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.ttl=20 channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address=stun.fwdnet.net channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.port=3478 channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup.address=stun.voxgratia.org channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup.port=3478 #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup2.address=**** #channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.backup2.port=3478 channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address.detector.enable=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address.detector.port=4101 channels.phone.jswitch.trunks.trunk-MESSAGENET.stun.address.detector.ttl=20 channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.enable=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.domain=sip.messagenet.it channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.name=5353535 channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.password=123pass456 channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.address=sip.messagenet.it channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.port=5061 channels.phone.jswitch.trunks.trunk-MESSAGENET.registrar.refresh=170 channels.phone.jswitch.trunks.trunk-MESSAGENET.checkbusytable=no channels.phone.jswitch.trunks.trunk-MESSAGENET.limbo.enable=no channels.phone.jswitch.trunks.trunk-MESSAGENET.video.enable=no channels.phone.jswitch.trunks.trunk-MESSAGENET.codecs.0.classname=it.tradesoft.tegate.rtp.codecs.gsm channels.phone.jswitch.trunks.trunk-MESSAGENET.codecs.1.classname=it.tradesoft.tegate.rtp.codecs.alaw channels.phone.jswitch.trunks.trunk-MESSAGENET.callernumber.default=5353535 channels.phone.jswitch.trunks.trunk-MESSAGENET.sessionprogress.ignoring=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.sessionprogress.connect=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.response4xx.action=REMOTE_BUSY channels.phone.jswitch.trunks.trunk-MESSAGENET.max.resources.enable=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.max.resources.number=2 channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.enable=yes channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.min=10010 channels.phone.jswitch.trunks.trunk-MESSAGENET.rtp.port.max=10019


Also, make sure that the file jswitch.properties contains no other trunks listening on the same port (indicated by port parameter) of the MESSAGENET trunk you have just set, and that the port range reserved to a trunk does not overlap other trunk ranges. Change the port number if it already being used by any other trunk. Now, save the changes and restart the service.

Messagenet trunk status test

After restarting the service, log on to DexGateMicro as administrator and click on the link Trunk Status in Numbers Management. Please note that the Messagenet trunk line indicates that you are registered.

Setting up outgoing call rules

Now, we're going to see how to create a rule to make calls with the trunk we've just created.
From Numbers Management let's click on Outgoing calls rules, then on the link Add outgoing line: a table with the area code used to call on different trunks will appear. Click on Add outgoing calls rule to add a new area code for the Messagenet trunk. Click on Run. Once you are in the following page, you can associate the previously indicated area code with an outgoing trunk.

Creating a rule for external number diversion

Now let's suppose we want to divert every incoming call on Messagenet trunk (and thus directed to our landline number 02999888777) to a specified internal number, or IVR or group number, and let's say that that number is 100.

In Number management click on link List of external diverted numbers, then on Divert external number and create a new diversion. Click on Run to save settings.

Now you are ready to use your Messagenet Account with DexGateMicro.

You can use your Messagenet account from any SIP terminal registered in the internal tegate trunk of DexGateMicro, using prefix 0 before the number you want to call (or prefix 9 if you have followed the advanced configuration). At the same time, you can divert every call to our landline number 02999888777 to a terminal, group number or IVR of your choice.