Rating Calls in Real Time on a Sansay VSXi

Let me start by saying that we are very big fans of Sansay. Good people, good products. While they have a foothold in several markets, they really seem to be the platform of choice among service providers that service high (and ridiculously high) Calls per Second (CPS) clients.

We work with many customers that use the Sansay VSXi so we wanted to come up with a way that we can send call rating information, which is available in real time from the RouteNGN™, directly to the VSXi CDR.

With the help of one of our customers and Sansay themselves, we came up with the method described below.

First, it is important to note that contained within the Sansay CDR Format v1.17 there are four fields which are reserved for an External Routing Server (ERS). They are as follows:

  • Matched Digits in ERS
  • Route table in ERS
  • Route Sequence Number in ERS
  • Jurisdiction Type used in ERS

We can have the RouteNGN™ populate and or all of these save for the Route Sequence Number which is determined by the INX as it routes through the outbound trunk IDs. The Matched Digits field has a maximum length of 41 characters, so it will work best for providing both the inbound and the outbound rates. The rest of the fields have max lengths of 5, 2, and 3 respectively.

In order to get the RouteNGN™ to pass information to the Sansay, users need to create a redirect message that has parameter ‘md=’ in the Contact header of the URI on the redirect message.


SIP/2.0 300 Redirect
Via: SIP/2.0/UDP;branch=z9hG4bK1sansay3335535825rdb33037
To: <sip:7193801500;rn=7199639469;npdi=yes@>
From: <sip:6177522000@;otg=000182>;tag=sansay3335535825rdb33037
Call-ID: ers-1966814679-0-2669270794@
Content-Length: 0

In order to create that message, modify the Contact Template on the inbound Endpoint Group in the RouteNGN™ to the following:

<sip:${ruri.dialcode}${ruri.user_params}${oepg.uri_user_params}@ ${oep.host}${oep.port}${ruri.params}${oepg.uriparams};md=buy${or.price}|sell${ir.price}>

Assuming the call completed to the first route choice, the VSXi will write a CDR where the Matched Digits ERS field will look like this:


You need not follow the format we used exactly. The only important items are the ‘md=’ as well as the ${or.price} and ${ir.price} parameters. Use whatever other items that will allow you to most easily parse the information out of the CDR.