Dialogic® PowerMedia™ Extended Media Server (PowerMedia XMS) - more articles
How to configure restricted access to specified hosts in PowerMedia XMS
Dialogic® PowerMedia™ XMS has a "Restrict Access to Specified Host" option on the SIP tab of the Protocol page. If this option is turned on, calls will only be accepted from hosts in the list following this option. This article describes the syntax used for this list.
The list of addresses specified under "Restrict Access to Specified Host" is compared against the SIP From: address of the incoming call. If none of the addresses in the list match the SIP From address, then the call will be rejected.
The matching is done against the From: address with the protocol part and user part (e.g., "sip:user@") removed. In many cases that will be a string in the format "ip_address:port_number".
The match is done as a "match entire string" regular expression match, which means that the regular expression has to match the beginning and end of the target string, not just match any substring. Another way of looking at this is to imagine the regular expression supplied has a "^" added to the beginning and a "$" added to the end, forcing the regular expression to match the beginning and end of the string.
Here are some examples to clarify. For all examples, assume the relevant part of the From address is "220.127.116.11:5060"
Regular Expression "18.104.22.168:5060" - matches - note that "." is a wildcard, not a literal "."
Regular Expression "1\.2\.3\.4:5060" - matches - This pattern matches ONLY this address/port number
Regular Expression "2\.3\.4:5060" - does NOT match (pattern must match the entire string)
Regular Expression "22.214.171.124" - does NOT match (pattern must match the entire string)
Regular Expression ".*1\.2\.3\.4.*" - matches - any string with "126.96.36.199" in it will match
Regular Expression "1\.2\.3\.4:\d+" - matches - any port number from this IP address will match
Regular Expression "1\.2\..*:5060" - matches - Port number 5060 from any 1.2.x.x address will match
Note that in PowerMedia XMS 2.1 and earlier, it was not possible to enter strings of this format into the web console, although the strings could be entered manually in the [trusts] section of "/etc/xms/xmserver.conf".
PowerMedia XMS 2.2 and later
Dialogic® PowerMedia™ XMS Installation and Configuration Guide
First published: 01-May-2015
Open access: Product rule: open; Page rule: Auto