[Spce-user] Rewrite rules for PSTN destinations

Jon Bonilla jbonilla at sipwise.com
Tue Aug 2 04:15:26 EDT 2011

El Mon, 1 Aug 2011 12:02:08 +0200
Carsten Bock <carsten at ng-voice.com> escribió:

> Hi,
> i just noticed, that the rewrite rules for a peer doesn't work.
> I have in my setup now the following setup:
> - 1st choice either BT or Telefonica
> - 2nd choice sipgate (as fallback)
> In order to make my call through Sipgate, i need to rewrite the RURI
> in order to make the calls work (dial 0049179 instead of 49179...).
> I've set up the according rules for that peer. I don't need any rules
> for BT or Telefonica.
> I've noticed, that the rules were not applied, when Sipgate is used as
> second choice.
> I could fix this by adding the following two lines to the
> "failure_route[FAILURE_ROUTE_PSTN]":
> (in file: /etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.tt2)
> [...]
>         # Apply rewrite rules for this destination (destination needs
> to be marked ed as PSTN)
>         $var(to_pstn) = 1;
>         route(ROUTE_SET_CLI_CALLEE);
> [...]
>         #t_on_branch("BRANCH_ROUTE_CLI_RTP");
>         route(ROUTE_OUTBOUND);
> Afteer changing Sipgate to Prio 1 (for testing), i've noticed that in
> this case the rules were not applied as well. I had to add those two
> lines for the "ROUTE_PSTN" as well, in order to make it work
> (terminating to Sipgate used to work previously??).
> I am not sure, what or where this went wrong during the last updates?
> Is anyone else experiencing those issues? Or might it have to do with
> my local, minor changes to proxy.cfg.tt2?
> Carsten

Hi Carsten. I'll try to reproduce the scenario with the latest packages from
the CE 2.2. 

Anyways, could you paste the kamailio log for such a call?

More information about the Spce-user mailing list