Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

List of Blogs
Search Blogs

Blog Archive

Most recent blog entries

 

Most recent blog entries

 

Mai24

Written by:Martin
24.05.2008 15:35 

As stated in the first part of this two part "series" one of the drawbacks of the approach to run an ECR script for every outgoing calls is the special dialing prefix to use. This part describes how to circumvent this restriction. Note: If you haven't read part 1 I suggest that you read it before continuing with this one.

As stated in the first part of this two part "series" one of the drawbacks of the approach to run an ECR script for every outgoing calls is the special dialing prefix to use. This part describes how to circumvent this restriction. Note: If you haven't read part 1 I suggest that you read it before continuing with this one.

Starting with v6.0 SwyxWare has a very flexible number conversion mechanism. Each number you dial, receive from your peer or which you signal as own number is fed to a conversion algorithm. The way how numbers are converted is defined by profiles to configuration much easier. If you ever have configured a trunk or trunk group in SwyxWare you know these profiles:

image

There a number conversion profile called "Dial as a PBX user". On a trunk you can use that to connect a sub-PBX. But this profile is also used when you use a client like SwyxIt! or SwyxPhone. We now use that to tweak our own prefix in front of every dialed external number. All default profiles are defined in a file called numberformatprofiles.config located in the SwyxWare program folder. Each profile consists of two rule set, one for calls "into" SwyxServer and one for calls "out of" SwyxServer. Each rule set has one or more rules. Here's an example:

      <sp:ReplacementItem Prefix="[type=unknown][plap][icp]*   "ReplacementString="+*"/>

It defines that if there's a number of unknown type which starts with a public line access prefix and an international call prefix, both prefixes will be removed and a "+" sign will be added. Example. Your SwyxWare is in Germany and your user account is in a location configured with typical German dialing parameters (public access prefix 0, international call prefix 00 and long distance call prefix 0). You dial 0004923147770. If the above rule is used, it converts that to +4923147770. There are a lot more rules in the rule set. The rule with the longest match wins.

To enforce that all dialed external calls are routed to the same special SwyxWare user account, we have to edit the rule set. The above rule would be

      <sp:ReplacementItem Prefix="[type=unknown][plap][icp]*   "ReplacementString="999+*"/>

That rule now makes a 999+4923147770 from a 0004923147770. The ECR script of user 999 can retrieve the additional digits behind the 999 and do anything you want.

You have to change all rules of the rule set which apply to outgoing calls for this to work. Don't change numberformatprofiles.config directly. Use an additional file called customnumberformatprofiles.config to define a new profile, e.g. with name PBXUser2. To let SwyxServer use that profile set the following registry value:

Location: HKLM:\Software\Swyx\IpPbxSrv\CurrentVersion\Options
Type: REG_SZ
Name: PBXUserNumberFormatProfile
Value: (The name of your new profile)

SwyxIt! Mobile calls which are made by Mobile Extension Manager use a different profile called MEMUser. To instruct SwyxServer to use a different profile for these types of calls set registry value MEMUserNumberFormatProfile.

I've attached a sample customnumberformatprofiles.config to this blog post.

Now you have it. Every outgoing calls runs the ECR script of user 999. But there's a problem. When your script tries to deliver the call by calling the ConnectTo function with the additionally dialed digits, "+4923147770" in our example, the same number conversion is applied again and "999+49123147770" is called again. The script calls itself. That's not what we want. But the solution is easy. Just add one rule to the already changed ruleset:

      <sp:ReplacementItem Prefix="998*   "ReplacementString="*"/>

That rule removes 998 from the beginning of a number. The ECR script of user 999 now has to make sure to always use prefix "998" when calling the ConnectTo function. In our example the script uses 998+4923147770, the new rule removes the 998 and the correct number is fed into SwyxServers address resolution. The call is delivered.

What can you do with that? Here are some ideas:

  • Enforce your own dialing permissions
  • Do your own least cost routing by adding an appropriate call-by-call prefix
  • Play an announcement to the caller before establishing the call.

You probably have other ideas. It would be great if you could leave a comment and telling me.

Last, but not least a warning: This is no official SwyxWare feature. It's not part of the product and therefore has not been tested by Swyx Quality assurance department. Nevertheless: Have fun and let me know if you're using it somewhere.

Attachment: CustomNumberformatProfiles.zip

[Edit 26.5.08: Use customnumberformatprofiles.config instead of changing numberformatprofiles.config]

 

 

Tags:

 

4 comment(s) so far...

Re: ECR for outgoing calls Part 2

Nice tricky solution... I have considered this too but thought that a call that runs through the number conversion of a trunk will never be delivered to a swyx user and trigger the call routing... I thought in this case swyxserver will dial 999 on the external trunk. Why is the call delivered to the ecr user instead?If this really works... let us think a little bit further... Is this maybe the solution to dial numbers without the leading "0"? Just let all calls run into the call routing and add a leading 0 in front of every number?!As you know, many customers are asking for that and if you tell them that this is not possible with swyx they sometimes look very strange :-|

By 3imedia-schmidt on  25.05.2008 00:52

Re: ECR for outgoing calls Part 2

I've never thought about using the number conversion to do that. But it might be possible. I'm not sure however, how you will dial internal numbers in that case. If everything dialed is prefixed with a 0 to dial it as external number you cannot reach other users. You could use an "internal access prefix", of course. But that's probably not what the customers wants.

By Martin on  25.05.2008 06:49

Re: ECR for outgoing calls Part 2

On systems like siemens customers have an internal key on their phones. So an internal access prefix could be the internal key on a swyxphone maybe...

By 3imedia-schmidt on  26.05.2008 08:32

Re: ECR for outgoing calls Part 2

In that case it should be possible. BTW, I've edited the article, because customnumberformatprofiles.config can be used which is much better than changing numberformatprofiles.config

By Martin on  26.05.2008 08:42

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment  Cancel 
Blog Help
Sponsors