<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body style="font-family: Calibri; font-size: 11pt;"
text="#000000" bgcolor="#FFFFFF"><div style="font-size:
11pt;font-family: Calibri;"><span style="font-family: Calibri;">Hi Jon<br><br>NP.
Here you go.<br><br>mysql -e "select * from kamailio.dialplan where
dpid=9\G"<br>*************************** 1. row
***************************<br> id: 1<br> dpid: 9<br>
pr: 0<br> match_op: 1<br>match_exp: ˆ(00|\+)([1-9][0-9]+)$<br>match_len:
0<br>subst_exp: ˆ(00|\+)([1-9][0-9]+)$<br> repl_exp: \2<br> attrs:<br>***************************
2. row ***************************<br> id: 2<br> dpid: 9<br>
pr: 1<br> match_op: 1<br>match_exp: ˆ0([1-9][0-9]+)$<br>match_len: 0<br>subst_exp:
ˆ0([1-9][0-9]+)$<br> repl_exp: $avp(s:caller_cc)\1<br> attrs:<br>***************************
3. row ***************************<br> id: 3<br> dpid: 9<br>
pr: 2<br> match_op: 1<br>match_exp: ˆ([1-9][0-9]+)$<br>match_len: 0<br>subst_exp:
ˆ([1-9][0-9]+)$<br> repl_exp: $avp(s:caller_cc)$avp(s:caller_ac)\1<br>
attrs:<br><br><br>mysql -e "select * from kamailio.dialplan where
dpid=10\G"<br>*************************** 1. row
***************************<br> id: 4<br> dpid: 10<br>
pr: 1<br> match_op: 1<br>match_exp: ˆ(00|\+)([1-9][0-9]+)$<br>match_len:
0<br>subst_exp: ˆ(00|\+)([1-9][0-9]+)$<br> repl_exp: \2<br> attrs:<br>***************************
2. row ***************************<br> id: 5<br> dpid: 10<br>
pr: 2<br> match_op: 1<br>match_exp: ˆ0([1-9][0-9]+)$<br>match_len: 0<br>subst_exp:
ˆ0([1-9][0-9]+)$<br> repl_exp: $avp(s:caller_cc)\1<br> attrs:<br>***************************
3. row ***************************<br> id: 6<br> dpid: 10<br>
pr: 3<br> match_op: 1<br>match_exp: ˆ([1-9][0-9]+)$<br>match_len: 0<br>subst_exp:
ˆ([1-9][0-9]+)$<br> repl_exp: $avp(s:caller_cc)$avp(s:caller_ac)\1<br>
attrs:<br><br><br></span><br><blockquote style="border: 0px none;"
cite="mid:20130419172422.1df85ce1@quenya" type="cite"><div
style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="jbonilla@sipwise.com" photoname="Jon Bonilla (Manwe)"
src="cid:part1.07060806.09080903@gmail.com" name="postbox-contact.jpg"
width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:jbonilla@sipwise.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Jon Bonilla (Manwe)</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 19, 2013
4:24 PM</span></font></div></div></div><div
style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>El Fri, 19 Apr 2013
17:08:36 +0200<br></div><div><!----><br><br>Sorry Deon I see that you
already did it:<br><br><br>Fetched dialplan IDs caller_in='9',
callee_in='10'<br>Applying caller-in domain rewrite rules on
user-provided CLI using dpid '9'<br>No matching rewrite rules for
'0839999989' found<br>Applying callee-in domain rewrite rules using dpid
'10'<br>No matching rewrite rules for '0044113001417' found<br><br><br>could
you please send the output of:<br><br>mysql -e "select * from
kamailio.dialplan where dpid=9\G"<br>mysql -e "select * from
kamailio.dialplan where dpid=10\G"<br><br></div><div>_______________________________________________<br>Spce-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br><a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a><br></div></div><div
style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="jbonilla@sipwise.com" photoname="Jon Bonilla (Manwe)"
src="cid:part1.07060806.09080903@gmail.com" name="postbox-contact.jpg"
width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:jbonilla@sipwise.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Jon Bonilla (Manwe)</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 19, 2013
4:08 PM</span></font></div></div></div><div
style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>El Fri, 19 Apr 2013
15:38:28 +0100<br></div><div><!----><br>Hi Deon<br><br>Please send the
proxy-log of that call (grep by ID and attach it as txt file)<br>and
then we'll check what your rewrite rules look like in the database.<br><br>Let's
see if the rewrite rules don't match or the rewrite_rule_set is not<br>binded
to the subscriber/peer<br><br></div><div>_______________________________________________<br>Spce-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br><a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a><br></div></div><div
style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="dgrotti@sipwise.com" photoname="Daniel Grotti"
src="cid:part3.04050505.04080606@gmail.com" name="postbox-contact.jpg"
width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:dgrotti@sipwise.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Daniel Grotti</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 19, 2013
3:00 PM</span></font></div></div></div><div
style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>Hi Deon,<br>sorry for the
stupid question, have you assigned the rewrite rules set<br>to your
subscribers or to your domain ?<br><br>This is how the rewrite rules
works:<br><br>1. Let's suppose you make a call between 2 internal
subscribers<br><br>2. You have assigned the rewrite rules set 'DEFAULT'
to both of these<br>subscribers<br><br>3. A call B<br><br>4. spce take
the caller and apply the INBOUND REWRITE RULES SET<br>'DEFAULT' to
caller number and callee number .<br><br>5. spce make some other test
and lookup the callee from database (call<br>is local).<br><br>6. spce
apply OUTBOUND REWRITE RULES SET 'DEFAULT' to caller number and<br>callee
number .<br><br>7. scpe forward the call to the callee.<br><br><br>Now
outbound calls:<br><br>2. You have assigned the rewrite rules set
'DEFAULT' to local caller and<br>rewrite rules set 'MY_PEER' to your sip
peer<br><br>3. A call B<br><br>4. spce take the caller and apply the
INBOUND REWRITE RULES SET<br>'DEFAULT' to caller number and callee
number .<br><br>5. spce make some other test and lookup the callee from
database (call<br>is NOT local -> outbound call).<br><br>6. spce
apply OUTBOUND REWRITE RULES SET 'MY_PEER' to caller number and<br>callee
number .<br><br>7. scpe forward the call to the callee.<br><br><br><br>br,<br>Daniel<br><br><br></div><div><!----><br>_______________________________________________<br>Spce-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br><a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a><br></div></div><div
style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="vermeulen.deon@gmail.com" photoname="Deon Vermeulen"
src="cid:part4.02010602.02000102@gmail.com" name="postbox-contact.jpg"
width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:vermeulen.deon@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Deon Vermeulen</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 19, 2013
2:48 PM</span></font></div></div></div><div
style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div style="font-size:
11pt;font-family: Calibri;"><span style="font-family: Calibri;">Hi
Daniel<br><br>I was confused with the previous mail and did not give you
the complete rule set.<br><br>Here with my complete Rewrite Rules for
completeness.<br><br>Inbound Rewrite for Caller:<br>ˆ(00|\+)([1-9][0-9]+)$
\2<br>ˆ0([1-9][0-9]+)$ ${caller_cc}\1<br>ˆ([1-9][0-9]+)$
${caller_cc}${caller_ac}\1<br><br>Inbound Rewrite for
Callee:<br></span><span><span style="font-family: Calibri;">ˆ(00|\+)([1-9][0-9]+)$
\2<br>
ˆ0([1-9][0-9]+)$ ${caller_cc}\1<br>
ˆ([1-9][0-9]+)$ ${caller_cc}${caller_ac}\1</span> </span><br><span
style="font-family: Calibri;"><br>Outbound Rewrite for Caller:<br></span><span><span
style="font-family: Calibri;">ˆ0([1-9][0-9]+)$</span> </span><span
style="font-family: Calibri;"> +44\1 (I see I made
a typo here as I have to strip "0" from CLI and append +44 for
International CLI)<br><br>Outbound for Callee:<br></span><span><span
style="font-family: Calibri;">ˆ(00|\+)([1-9][0-9]+)$</span>
\2</span><br><br><br>Looking at the above I guessing I don't properly
understand the Rewrites working order?<br><br><br>Thanks again for the
assistance.<br><br><br>Kind Regards<br>Deon<br><br><br></div></div><div
style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="dgrotti@sipwise.com" photoname="Daniel Grotti"
src="cid:part3.04050505.04080606@gmail.com" name="postbox-contact.jpg"
width="25px" height="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:dgrotti@sipwise.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Daniel Grotti</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">April 19, 2013
2:38 PM</span></font></div></div></div><div
style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>Hi Deon,<br><br>Your call
come from user F=<a class="moz-txt-link-freetext" href="sip:0839999989@192.168.0.250">sip:0839999989@192.168.0.250</a>, so his Inbound<br>rewrite
rules will be applied<br><br>INBOUND REWRITE RULES CALLER<br>INBOUND
REWRITE RULES CALLEE<br><br><br>after that the system will apply the
OUTBOUND REWRITE RULES set of the<br>callee (or the peer if the call is
an outbound call).<br><br>In your case the problem is with inbound
rewrite rules for callee for<br>the user 0839999989, because his rewrite
rules doesn't rewrite the<br>callee 0044113001417 into 44113001417.<br><br>So
you should have a rewrite rules like:<br><br>^(00|\+)([1-9][0-9]+)$
\2<br><br>to strip 00 from callee, and you don't have a rules like this
afaics.<br><br><br>br,<br>Daniel<br><br><br><br></div><div><!----><br>_______________________________________________<br>Spce-user
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br><a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a><br></div></div></blockquote></div></body></html>