[Spce-user] Local and not local callee

Imanol Pardavila imanol.pardavila at ibercom.com
Thu Nov 22 10:53:43 EST 2012


Hi Jon,
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.

This is my scenario:

Endpoint A - E.164: 34911920846
Endpoint B - E.164: 34911920847
Endpoint A and B's domain: dominio
Peer-PSTN gateway: CHANNEL
Spanish Mobile Phone Number: 691 xxx xxx

Requeriments:

1) Call from 691 xxx xxx to Endpoint A

A number: 691 xxx xxx
B number (dialed): 911920846
Using CHANNEL

2) Call from Endpoint A to 691 xxx xxx

A number (presented): 911920846
B number: 691 xxx xxx
Using CHANNEL

3) Call from Endpoint A to Endpoint B:

A number (presented): 911920846
B number (dialed): 911920847
Local call - not using CHANNEL

---

In case 1), I use this *call-in peer rule for callee*, assigned to CHANNEL:

Match Pattern: ^([1-9][0-9]+)$
Replacement Pattern: 34\1

It works well --> call is delivered on Endpoint A: 34911920846

In case 2), I use this *call-out peer rule **for caller*, assigned to 
CHANNEL:

Match Pattern: ^34([1-9][0-9]+)$
Replacement Pattern: \1

It works well --> call is delivered on 691 xxx xxx with A number: 911920846

In case 3), I have the problem:

If dialed number is 34911920847, Endpoint B is taken as local --> OK
However, if dialed number is 911920847, Endpoint B is taken as no-local, 
an call is sent to CHANNEL --> KO

Solution:
If I configure this rule:

Match Pattern: ^([1-9][0-9]+)$
Replacement Pattern: 34\1

on "dominio" or subscriber level, 3) works but 2) not, because a 34 
country code is added to 691 xxx xxx

To sum up,

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.

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.

Any ideas?
Thanks
Best regards
Imanol

El 20/11/2012 20:27, Jon Bonilla (Manwe) escribió:
> El Tue, 20 Nov 2012 16:32:01 +0100
> Imanol Pardavila <imanol.pardavila at ibercom.com> escribió:
>
>> Hi everybody,
>>
>> I have the following subscriber:
>>
>> root at 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
>
> 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.
>
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
>
>
> -----
> No se encontraron virus en este mensaje.
> Comprobado por AVG - www.avg.com
> Version: 2012.0.2221 / Base de datos de virus: 2629/5407 - Fecha de publicacion: 11/20/12

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20121122/1d5cee77/attachment-0001.html>


More information about the Spce-user mailing list