Understanding the routing rules of the Teles gateway
The outgoing VOIP profile alone is not sufficient to send calls. You need routing entries, telling that all or some calls, must be routed via a given outgoing profile.
In order to understand the routing instructions of Teles, we must know that unique numbers are assigned to all ports of the gateway. Port numbers are considered as routing prefixes to be added in front of phone numbers. If we wish a call to be routed-out through a particular port, we must add that port number in front of the phone number. For example if we want the call 111 be routed-out via a telephony port 9, we must add 9 in front of the number. The number 9111 will be routed then to the port 9. Once the number reached port 9, the prefix 9 will be eaten up, and only the rest of the number will be sent out further into the network, i.e. 111, without the prefix 9. Shortly said, a port prefix is added for internal routing, and then is removed, as soon as the specified internal port is reached.
In pabx.cfg file we can see that all VOIP ports have by default a prefix 40.
For VOIP ports, the VOIP profile name is an additional port number extension. The VOIP profile name must be added after the port number 40 (without spaces) and must be followed by the : sign. So the full outgoing port number (port name) in our case is: 40Out1: and not simply 40.
We are now ready to add our routing instruction using the MapAll command. The command of the example below says that in all numbers which start with 9, the prefix 9 must be replaced by prefix 40Out1:. Such replacement will result in routing of all call starting with prefix 9, via our outgoing VOIP connection. Neither prefix 9 nor the new prefix 40Out1: will appear in the call, sent out to the outgoing VOIP connection.
With such routing instruction, if we wish to call 021-693-9261, we must dial 90216939261. If we wish to conserve the leading 9, then the routing command must look as follows MapAll9=40Out1:9, with a 9 also on the right side.
The following example routes to the VoIP connection Out1 all numbers starting with 0 (without removing the leading 0):
You must be able now to make outgoing calls, but you may experience one-way audio problem. The SIP phone may not receive the audio if the phone is behind the NAT. Add VoipAutoRtpAddr=Yes parameter in the SIP user profile to solve this problem:
You must now have the two way audio.
* * *
Copyright © 2008 Switzernet