<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Jon,<br>
I'm making different test while checking proxy logs and I'm not able
to fill 100% my scenario. Looking at Spce List archives, I don't
find any solution.<br>
<br>
This is my scenario:<br>
<br>
Endpoint A - E.164: 34911920846 <br>
Endpoint B - E.164: 34911920847<br>
Endpoint A and B's domain: dominio<br>
Peer-PSTN gateway: CHANNEL<br>
Spanish Mobile Phone Number: 691 xxx xxx<br>
<br>
Requeriments:<br>
<br>
1) Call from 691 xxx xxx to Endpoint A<br>
<br>
A number: 691 xxx xxx<br>
B number (dialed): 911920846 <br>
Using CHANNEL<br>
<br>
2) Call from Endpoint A to 691 xxx xxx<br>
<br>
A number (presented): 911920846<br>
B number: 691 xxx xxx<br>
Using CHANNEL<br>
<br>
3) Call from Endpoint A to Endpoint B:<br>
<br>
A number (presented): 911920846 <br>
B number (dialed): 911920847<br>
Local call - not using CHANNEL<br>
<br>
---<br>
<br>
In case 1), I use this <b>call-in peer rule for callee</b>,
assigned to CHANNEL:<br>
<br>
Match Pattern: ^([1-9][0-9]+)$<br>
Replacement Pattern: 34\1<br>
<br>
It works well --> call is delivered on Endpoint A: 34911920846<br>
<br>
In case 2), I use this <b>call-out peer rule </b><b>for caller</b>,
assigned to CHANNEL:<br>
<br>
Match Pattern: ^34([1-9][0-9]+)$<br>
Replacement Pattern: \1<br>
<br>
It works well --> call is delivered on 691 xxx xxx with A number:
911920846<br>
<br>
In case 3), I have the problem:<br>
<br>
If dialed number is 34911920847, Endpoint B is taken as local -->
OK<br>
However, if dialed number is 911920847, Endpoint B is taken as
no-local, an call is sent to CHANNEL --> KO<br>
<br>
Solution:<br>
If I configure this rule:<br>
<br>
Match Pattern: ^([1-9][0-9]+)$<br>
Replacement Pattern: 34\1<br>
<br>
on "dominio" or subscriber level, 3) works but 2) not, because a 34
country code is added to 691 xxx xxx<br>
<br>
To sum up,<br>
<br>
I need that if a Endpoint calls to another local subscriber, 34 cc
would add, but if it calls to a PSTN number, it is not added.<br>
<br>
I have no idea about how to do that, because I guess that if
subscriber or domain rule is applied, peer's one is not taken in
account.<br>
<br>
Any ideas?<br>
Thanks<br>
Best regards<br>
Imanol<br>
<br>
<div class="moz-cite-prefix">El 20/11/2012 20:27, Jon Bonilla
(Manwe) escribió:<br>
</div>
<blockquote cite="mid:20121120202742.40cdc9b0@quenya" type="cite">
<pre wrap="">El Tue, 20 Nov 2012 16:32:01 +0100
Imanol Pardavila <a class="moz-txt-link-rfc2396E" href="mailto:imanol.pardavila@ibercom.com"><imanol.pardavila@ibercom.com></a> escribió:
</pre>
<blockquote type="cite">
<pre wrap="">Hi everybody,
I have the following subscriber:
root@server:~# ngcp-get_subscriber -i 27
Subscriber information:
{
...,
'cc' => '34',
'sn' => '911920847',
'subscriber_id' => '27',
...
'uuid' => 'f2883e7b-5642-4bb6-9684-c9525323d3d7',
...
}
My problem is that if I call him from another subscriber using "full"
number (34911920847), the callee is considered local and the call is
sent to him (not to outbound peer):
INFO: <script>: Searching for callee
INFO: <script>: Callee was aliased with base '34911920847'
INFO: <script>: Clear callee preferences
INFO: <script>: Callee is local, uuid='f2883e7b-5642-4bb6-9684-c9525323d3d7'
However, If I use only SN (911920847), the callee is considered not
local and it's sent to defined peer:
INFO: <script>: Searching for callee
INFO: <script>: Clear callee preferences
INFO: <script>: Callee is not local
In Spain, SN is more used than CC+SN, so it's important for me that
calls between local calls using SN would be routed directly.
I tried using this Rewrite Rule Set to reach a CC+SN number when a SN
one arrived to the server:
Inbound Rewrite Rules for Callee
Macth Pattern: ^([1-9][0-9]+)$
Replacement Pattern: 34/1
It works for delivering the call when callee is called from PSTN, but
not for considering it local when called from another subscriber.
What can I do to consider SN number as a local number?
Thanks
Best regards
Imanol
</pre>
</blockquote>
<pre wrap="">
Well, you should set the rule in the peering rule set asigned not only to the
pstn gws but also to the subscribers or the domain.
btw, replacement pattern 34/1 is wrong. It should be 34\1
You can check the dialplan (rewrite rules) in the proxy logs. Just check.
You problem is 100% in the rewrite rule configuration.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">-----
No se encontraron virus en este mensaje.
Comprobado por AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 2012.0.2221 / Base de datos de virus: 2629/5407 - Fecha de publicacion: 11/20/12
</pre>
</blockquote>
<br>
</body>
</html>