[Spce-user] rewrite rules

Jon Bonilla (Manwe) jbonilla at sipwise.com
Wed Apr 24 11:33:25 EDT 2013


El Wed, 24 Apr 2013 16:20:04 +0100
Barry Flanagan <barry at flanagan.ie> escribió:

> >
> I need to route different subscribers within the same domain to different
> peers in this case.
> 
> My steering digits are 3872
> 
> If I set an inbound caller rewrite to prepend these steering digits, they
> change the user-provided CLI. This user-provided CLI is then checked
> against the allowed CLI and it is rejected, and replaced with the
> network-provided  CLI. This removes the steering digits. See the logs below.
> 
> The only way I can see of getting around that is to set the
> network-provided CLI to include my steering digits and then discard them
> before the call is terminated.

I see when we call to function to load the pstn gws:

$var(lcr_match_content) = "sip:" + $avp(s:first_caller_cli_userprov) + "@" +
$avp(s:caller_domain_netprov);

if(!load_gws("1", $rU, $var(lcr_match_content)))


Maybe you would prefer to match the subscriber against the NPN (network
provided number) instead of the UPN.

you could create a custom template for /etc/kamailio/proxy/proxy.cfg and in
ROUTE_PSTN change

$var(lcr_match_content) = "sip:" + $avp(s:first_caller_cli_userprov) + "@" +
$avp(s:caller_domain_netprov);

for

$var(lcr_match_content) = "sip:" + $avp(s:first_caller_cli_netprov) + "@" +
$avp(s:caller_domain_netprov);


That way you can always match against the cli of the subscriber no matter the
cli they use from the allowed_clis array. Would that work for you?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130424/a09d1a25/attachment-0001.asc>


More information about the Spce-user mailing list