[Spce-user] Network Configuration

Deon Vermeulen vermeulen.deon at gmail.com
Fri Apr 19 10:38:28 EDT 2013


Hi Daniel

Thank you for the detailed explanation.

The rewrite rules are currently set on both subscribers and on the domain.
I've tested on the domain only and both subscriber only, but all have 
the exact same results as the current set on Domain AND both subscribers.

If I understand this correctly then the Rewrites should be as follows:

###################
This is how the rewrite rules works:

1. Let's suppose you make a call between 2 internal subscribers

2. You have assigned the rewrite rules set 'DEFAULT' to both of these
subscribers

3. A call B

4. spce take the caller and apply the INBOUND REWRITE RULES SET
'DEFAULT' to caller number and callee number .

###
     -    In this case the Inbound Caller is 0839999999
          * The current rewrite should match accordingly:
                         ˆ0([1-9][0-9]+)$        ${caller_cc}\1

     -    Inbound Calle is 0044113001417
             * The current rewrite should match accordingly:
                         ˆ(00|\+)([1-9][0-9]+)$        \2
###

5. spce make some other test and lookup the callee from database (call
is local).

6. spce apply OUTBOUND REWRITE RULES SET 'DEFAULT' to caller number and
callee number .

###
     -    In this case the Inbound Caller is 44839999999 after the 
Initial Inbound "translated" it from 083 to 4483
          * The current rewrite should match accordingly:
                         ˆ([1-9][0-9]+)$            +\        (I have to 
append the "+" and assume this is the correct way to do so)

     -    Inbound Calle is 44113001417 after the initial Inbound 
"translated" it from 0044 to 44
             * The current rewrite should match accordingly:
                         ^([1-9][0-9]+)$            +\
###

7. scpe forward the call to the callee.


Now outbound calls:

2. You have assigned the rewrite rules set 'DEFAULT' to local caller and
rewrite rules set 'MY_PEER' to your sip peer

3. A call B

4. spce take the caller and apply the INBOUND REWRITE RULES SET
'DEFAULT' to caller number and callee number .

###
     -    In this case the Inbound Caller is 0839999999
          * The current rewrite should match accordingly:
                         ˆ0([1-9][0-9]+)$        ${caller_cc}\1

     -    Inbound Calle is 0044113001417
             * The current rewrite should match accordingly:
                         ˆ(00|\+)([1-9][0-9]+)$        \2
###

5. spce make some other test and lookup the callee from database (call
is NOT local -> outbound call).

6. spce apply OUTBOUND REWRITE RULES SET 'MY_PEER' to caller number and
callee number .

###
     -    In this case the Inbound Caller is 44839999999 after the 
Initial Inbound "translated" it from 083 to 4483
          * The current rewrite should match accordingly:
                         ˆ([1-9][0-9]+)$            +\        (I have to 
append the "+" and assume this is the correct way to do so)

     -    Inbound Callee is 44113001417 after the initial Inbound 
"translated" it from 0044 to 44
             * The current rewrite should match accordingly:
                         ^([1-9][0-9]+)$            +\
###

7. scpe forward the call to the callee.


If the above rewrites are correct, then I don't understand why I keep 
getting " No matching rewrite rules ".


In my specific scenario my Carrier is set as a fake local subscriber on 
another local domain with a couple of Aliases as I have to Bill the 
Carrier for calls to our network. I don't have any SIP Peerings configured.
I'm not sure how the outbound will work in this specific scenario if the 
fake subscriber to the Carrier is within another domain on the SPCE.

What I have is as follows:

08399999989 at 192.168.0.250 as my local Subscriber I'm currently calling from.
08399999999 at 10.222.0.250 as the fake Subscriber for calls to our 
International Carrier. This is where I've setup the Alias 44113001417.

I'm dialing from 08399999989 at 192.168.0.250 to 44113001417 which is not 
part of the 192.168.0.250 domain, but part of the 10.222.0.250 domain.

Does this play any role in how the SPCE selects if the call from one 
local domain to another local domain is seen as local or foreign?


Thanks again for your assistance.
I really appreciate it.

Kind Regards
Deon

> Daniel Grotti <mailto:dgrotti at sipwise.com>
> April 19, 2013 3:00 PM
> Hi Deon,
> sorry for the stupid question, have you assigned the rewrite rules set
> to your subscribers or to your domain ?
>
> This is how the rewrite rules works:
>
> 1. Let's suppose you make a call between 2 internal subscribers
>
> 2. You have assigned the rewrite rules set 'DEFAULT' to both of these
> subscribers
>
> 3. A call B
>
> 4. spce take the caller and apply the INBOUND REWRITE RULES SET
> 'DEFAULT' to caller number and callee number .
>
> 5. spce make some other test and lookup the callee from database (call
> is local).
>
> 6. spce apply OUTBOUND REWRITE RULES SET 'DEFAULT' to caller number and
> callee number .
>
> 7. scpe forward the call to the callee.
>
>
> Now outbound calls:
>
> 2. You have assigned the rewrite rules set 'DEFAULT' to local caller and
> rewrite rules set 'MY_PEER' to your sip peer
>
> 3. A call B
>
> 4. spce take the caller and apply the INBOUND REWRITE RULES SET
> 'DEFAULT' to caller number and callee number .
>
> 5. spce make some other test and lookup the callee from database (call
> is NOT local -> outbound call).
>
> 6. spce apply OUTBOUND REWRITE RULES SET 'MY_PEER' to caller number and
> callee number .
>
> 7. scpe forward the call to the callee.
>
>
>
> br,
> Daniel
>
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> Deon Vermeulen <mailto:vermeulen.deon at gmail.com>
> April 19, 2013 2:48 PM
> Hi Daniel
>
> I was confused with the previous mail and did not give you the 
> complete rule set.
>
> Here with my complete Rewrite Rules for completeness.
>
> Inbound Rewrite for Caller:
> ˆ(00|\+)([1-9][0-9]+)$        \2
> ˆ0([1-9][0-9]+)$                   ${caller_cc}\1
> ˆ([1-9][0-9]+)$                     ${caller_cc}${caller_ac}\1
>
> Inbound Rewrite for Callee:
> ˆ(00|\+)([1-9][0-9]+)$        \2
> ˆ0([1-9][0-9]+)$                   ${caller_cc}\1
> ˆ([1-9][0-9]+)$                     ${caller_cc}${caller_ac}\1
>
> Outbound Rewrite for Caller:
> ˆ0([1-9][0-9]+)$                 +44\1        (I see I made a typo 
> here as I have to strip "0" from CLI and append +44 for International CLI)
>
> Outbound for Callee:
> ˆ(00|\+)([1-9][0-9]+)$             \2
>
>
> Looking at the above I guessing I don't properly understand the 
> Rewrites working order?
>
>
> Thanks again for the assistance.
>
>
> Kind Regards
> Deon
>
>
> Daniel Grotti <mailto:dgrotti at sipwise.com>
> April 19, 2013 2:38 PM
> Hi Deon,
>
> Your call come from user F=sip:0839999989 at 192.168.0.250, so his Inbound
> rewrite rules will be applied
>
> INBOUND REWRITE RULES CALLER
> INBOUND REWRITE RULES CALLEE
>
>
> after that the system will apply the OUTBOUND REWRITE RULES set of the
> callee (or the peer if the call is an outbound call).
>
> In your case the problem is with inbound rewrite rules for callee for
> the user 0839999989, because his rewrite rules doesn't rewrite the
> callee 0044113001417 into 44113001417.
>
> So you should have a rewrite rules like:
>
> ^(00|\+)([1-9][0-9]+)$ \2
>
> to strip 00 from callee, and you don't have a rules like this afaics.
>
>
> br,
> Daniel
>
>
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> Deon Vermeulen <mailto:vermeulen.deon at gmail.com>
> April 19, 2013 2:30 PM
> What I don't understand is that I have the Outbound Rewrite Rules set 
> for Callee as well as Caller on the fake subscriber as well as on the 
> registered subscriber I'm calling from:
>
> Default Rewrite Rule (This is set on the Subscriber for Local/National 
> Calls)
> Outbound Rewrite for Caller:
> ˆ0([1-9][0-9]+)$         |        44\1         |        CLI to E.164
>
> Outbound Rewrite for Callee:
> ˆ0([1-9][0-9]+)$        |       ${caller_cc}\1        |        
> National to E.164
>
>
> International Rewrite Rule (This is set on the fake Subscriber for 
> International Calls to and from this Carrier)
> Outbound Rewrite for Caller:
> ^([1-9][0-9]+)$           |        +\                |        E.164 to 
> International
>
> Outbound Rewrite for Callee:
> ˆ(00|\+)([1-9][0-9]+)$        |        \2        |        
> International to E.164
>
>
> I just did a random test to call 44113001417 on a fake subscriber on 
> the same domain, but I still get the exact same errors:
>
> - No matching rewrite rules for '0839999989' found
> - No matching rewrite rules for '44113001417' found
> - No PSTN gateways available
>
> Please correct me if I'm wrong but it's not supposed to look for a 
> gateway if the destination is local? In this case an Alias.
> I also don't understand why any of the Rewrite Rules are not hit at 
> any stage of the call setup?
>
>
> Kind Regards
> Deon
>
> Daniel Grotti <mailto:dgrotti at sipwise.com>
> April 19, 2013 2:03 PM
> So, in this case you need to check you Inbound Rewrite Rules for Calee
> as the callee is 0044113001417 instead of 44113001417, as your alias:
>
> No matching rewrite rules for '0044113001417' found
>
>
> br,
> Daniel
>
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130419/1a5f7944/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1201 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130419/1a5f7944/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1143 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130419/1a5f7944/attachment-0003.jpg>


More information about the Spce-user mailing list