An embodiment of the invention will now be described by way of example only with reference to the accompanying drawings wherein:
Referring to
Each application server 17, 18, 19 has a unique routing key associated with it. The routing keys maybe configured statically at the application server 17, 18, 19 and at the signalling gateway 10, or maybe configured statically at the application server 17, 18, 19 which then dynamically registers itself at the signalling gateway by means of routing key management messages. To match a routing key to an incoming message, the routing key interpreter 11 is operable to read a message as generally illustrated at 30 and identifying the values of certain parameters within the message generally illustrated at 31, 32 and 33. The routing key interpreter 11 then identifies the routing key that matches the values of parameters 31, 32, 33 as shown in
To perform the step of identifying the correct routing key, the routing key interpreter 11 comprises a lexical analyser 40. A lexical analyser is a piece of code that takes a text file as an input, searches for regular expressions within the input file and generates an appropriate output in accordance with the identified regular expressions. In the present example, the lexical analyser 40 searches for regular expressions within a received message which correspond to the values of the relevant parameters 31, 32, 33. To generate a lexical analyser, a method is performed as shown in
As illustrated in
One method of generating a regular expression is set out the pseudo-code listed below.
Essentially, this method receives the minimum and maximum values for the numerical range, the minimum and maximum values being left padded with zeroes so that the minimum and maximum values are each N digits long. The function RangeToRegex2 begins by comparing the digits of the maximum and minimum values (m and M respectively), beginning with the left-most digit. If the digits match, then the nth digit is simply added to the logical expression.
Where the digits do not match, the RangeToRegex2 function compares the value of the digits. Where the values differ by one, the function then adds the expression (m.rMin|M.rMax.). If the values of the digits M, m differ by two, the function adds to the expression (m.rMin|m+1.rep.{N−n−1}|M.rMax) to the logical expression, where the rep is the expression [0-9] meaning any digit in the range 0-9 followed by {N-n-1}, a regular expression syntax which instructs the lexical analyser to look for that number of repetitions of the preceding character. If M and m differ by more than two, then the function adds the expression (m.rMin|[m+1−M−1] rep.{N−n−1}|M.rMax).
To provide the rMin and rMax value, the appropriate function is called. A string min comprising the nth digit of the minimum value onwards is sent to function RegexMin. If the string is a single character, the function returns a value of rMin which is either the digit 9 or [min-9]. If the string min is two or more digits long, the RegexMin function generates a new minimum value, comprising the n+1th digits onwards of min and a maximum value comprising a string of the digit 9 repeated the same number of times, and sends this value to the RangeToRegex2 function which proceeds as discussed above.
Similarly, the RegexMax function receives a string max comprising the nth digits onwards of the maximum value and checks if this is a single digit. If the single digit is zero then the RegexMax function returns the value to zero otherwise it returns the value [0-max]. If the value of max has more than two digits, then the function RegexMax calls the function RangeToRegex2 with a maximum comprising the n+1 to Nth characters of the maximum value as received, and the minimum value comprising a string of the digits 0 of the same length.
It will be apparent therefore that the functions RangeToRegex 2, RegexMin and RegexMax call each other recursively until RegexMin and RegexMax both receive a single digit string. The values for the regular expression are returned at each recursion of the RangeToRegex2 function are successively inserted in the logical expression until the recursion is complete and the logical expression is complete.
Two example ranges and their corresponding regular expressions are shown below.
It will of course be apparent that any other alternative method for generating a regular expression corresponding to a numerical range [min, max] may be provided as desired.
At step 46 the input file is passed to a lexical analyser generator such as LEX or FLEX or any other lexical analyser generator as required. In general, lexical analyser generators generate a source code file as their output, so at step 47 the source code file is compiled to provide an executable file, and at step 48 the lexical analyser is passed to the signalling gateway 10. The lexical analyser may be passed to the signalling gateway 10 by, for example, providing the lexical analyser as a sharable library which is dynamically loaded by the signalling gateway 10. If desired, the routing key interpreter 11 may be provided with an appropriate parser, such as YACC or BISON, to call the lexical interpreter and handle the returned routing key or otherwise as appropriate.
As shown in
This method is thus particularly advantageous in that the lexical analyser 40 is always optimised for the particular set of routing keys and the associated input expressions which can be handled by the signalling gateway 10 and can accommodate parameter values which must be within a defined range. For example, it might be desirable to route all messages to a specific application server 17, 18, 19 if the CIC (circuit identification code) parameter value in a received SS7 message is within a specific range. By generating a logical expression corresponding to that numerical range and including that in the input file associated with the corresponding routing key, the routing key interpreter 11 will obtain a match for a CIC value having any value within that range and thus returning the correct routing key. It will be apparent that any other parameter having a numerical range of values, for example DPC (designation point code) or OPC (originating point code) or indeed any other parameter. Where desirable, it may even be appropriate to provide regular expressions in a similar manner for parameters where there may be a range of characters not limited to numerical digits. The input file can comprise a simple text file listing the relevant input expressions corresponding to values of the parameters 31, 32, 33 and the corresponding routing key, for example in the simple format (field=value; field=value; . . . ; result) where value can be a simple value or a logical expression corresponding to a numerical range. It thus follows that if the routing key provisioning needs to be updated, the pre-existing input file can be simply modified by adding or deleting appropriate lines of text, and a new lexical analyser generated by passing the input file to the lexical analyser generator, and then passing the lexical analyser to the signalling gateway 10.
The present invention may be used to provide a signalling gateway between any appropriate pair of networks using different protocols as desired.
In the present specification “comprises” means “includes or consists of” and “comprising” means “including or consisting of”.
The features disclosed in the foregoing description, or the following claims, or the accompanying drawings, expressed in their specific forms or in terms of a means for performing the disclosed function, or a method or process for attaining the disclosed result, as appropriate, may, separately, or in any combination of such features, be utilised for realising the invention in diverse forms thereof.