[Spce-user] Network Configuration

Deon Vermeulen vermeulen.deon at gmail.com
Fri Apr 19 11:34:27 EDT 2013


Hi Jon

NP. Here you go.

mysql -e "select * from kamailio.dialplan where dpid=9\G"
*************************** 1. row ***************************
        id: 1
      dpid: 9
        pr: 0
  match_op: 1
match_exp: ˆ(00|\+)([1-9][0-9]+)$
match_len: 0
subst_exp: ˆ(00|\+)([1-9][0-9]+)$
  repl_exp: \2
     attrs:
*************************** 2. row ***************************
        id: 2
      dpid: 9
        pr: 1
  match_op: 1
match_exp: ˆ0([1-9][0-9]+)$
match_len: 0
subst_exp: ˆ0([1-9][0-9]+)$
  repl_exp: $avp(s:caller_cc)\1
     attrs:
*************************** 3. row ***************************
        id: 3
      dpid: 9
        pr: 2
  match_op: 1
match_exp: ˆ([1-9][0-9]+)$
match_len: 0
subst_exp: ˆ([1-9][0-9]+)$
  repl_exp: $avp(s:caller_cc)$avp(s:caller_ac)\1
     attrs:


mysql -e "select * from kamailio.dialplan where dpid=10\G"
*************************** 1. row ***************************
        id: 4
      dpid: 10
        pr: 1
  match_op: 1
match_exp: ˆ(00|\+)([1-9][0-9]+)$
match_len: 0
subst_exp: ˆ(00|\+)([1-9][0-9]+)$
  repl_exp: \2
     attrs:
*************************** 2. row ***************************
        id: 5
      dpid: 10
        pr: 2
  match_op: 1
match_exp: ˆ0([1-9][0-9]+)$
match_len: 0
subst_exp: ˆ0([1-9][0-9]+)$
  repl_exp: $avp(s:caller_cc)\1
     attrs:
*************************** 3. row ***************************
        id: 6
      dpid: 10
        pr: 3
  match_op: 1
match_exp: ˆ([1-9][0-9]+)$
match_len: 0
subst_exp: ˆ([1-9][0-9]+)$
  repl_exp: $avp(s:caller_cc)$avp(s:caller_ac)\1
     attrs:



> Jon Bonilla (Manwe) <mailto:jbonilla at sipwise.com>
> April 19, 2013 4:24 PM
> El Fri, 19 Apr 2013 17:08:36 +0200
>
>
> Sorry Deon I see that you already did it:
>
>
> Fetched dialplan IDs caller_in='9', callee_in='10'
> Applying caller-in domain rewrite rules on user-provided CLI using 
> dpid '9'
> No matching rewrite rules for '0839999989' found
> Applying callee-in domain rewrite rules using dpid '10'
> No matching rewrite rules for '0044113001417' found
>
>
> could you please send the output of:
>
> mysql -e "select * from kamailio.dialplan where dpid=9\G"
> mysql -e "select * from kamailio.dialplan where dpid=10\G"
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> Jon Bonilla (Manwe) <mailto:jbonilla at sipwise.com>
> April 19, 2013 4:08 PM
> El Fri, 19 Apr 2013 15:38:28 +0100
>
> Hi Deon
>
> Please send the proxy-log of that call (grep by ID and attach it as 
> txt file)
> and then we'll check what your rewrite rules look like in the database.
>
> Let's see if the rewrite rules don't match or the rewrite_rule_set is not
> binded to the subscriber/peer
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130419/5a37db94/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1221 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130419/5a37db94/attachment-0003.jpg>
-------------- 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/5a37db94/attachment-0004.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/5a37db94/attachment-0005.jpg>


More information about the Spce-user mailing list