[Spce-user] new and confused

Andrew Pogrebennyk apogrebennyk at sipwise.com
Thu Aug 9 11:02:40 EDT 2012


On 08/09/2012 04:19 PM, Kevin Bushong wrote:
> Everything was going along fine until I got to Rewrite rules.  Maybe I'm
> a little slow (I hope I'm kidding) but I'm just not getting the hang of
> the rules.  First, am I correct in understanding that the rewrite rules
> are essentially the rules that allow calls in and out of the box?  Also,
> am I correct that inbound and outbound are from the CE box perspective? 

Regarding domain vs. peer rewrite rule sets, the order is as follows:

* PSTN to subscriber – inbound rewrite rules from the set assigned to
peer and outbound from the set assigned to callee/domain;
* Subscriber to PSTN – inbound rewrite rules from the set assigned to
caller/domain and outbound from the set assigned to the peer.
* Subscriber to subscriber – inbound rewrite rules from the set assigned
to caller/domain and outbound from the set assigned to callee/domain.
Rules are evaluated top to bottom, evaluation stops after 1st match.

As Jon said we usually normalize the inbound call from national to E.164
format, so subscriber or peering rule in E.164 format is matched and
then normalize it back to national using outbound rules.

You can use the variables ${caller_cc} and ${caller_ac} in the
replacement part to dynamically fill in the country-code and area-code
of subscribers (for local area calls) – but avoid using it when call
comes from peers, they are null. There is an example is handbook.




More information about the Spce-user mailing list