[Spce-user] NEED HELP On Rewrite Rules
    Hohl Matthias 
    matthias.hohl at telematica.at
       
    Thu Mar  8 06:29:18 EST 2018
    
    
  
Hello,
 
firstly, just read this: https://www.sipwise.org/doc/mr5.5.3/spce/ar01s06.html#dialplans
 
If you just want to manipulate the INBOUND numbers, from a subscriber to SPCE you need the Inbound Rules for the subscriber.
If you want to manipulate the OUTBOUND numbers, from the SPCE to a subscribe you need the Outbound Rules for the subscriber.
 
What you need is: 
 
Strip leading 00 or +
Match Pattern: ^(00|\+)([1-9][0-9]+)$
Replacement Pattern: \2
Description: International to E.164
Direction: Inbound
Field: Caller
 
Replace 0 by caller’s country code:
Match Pattern: ^0([1-9][0-9]+)$
Replacement Pattern: ${caller_cc}\1
Description: National to E.164
Direction: Inbound
Field: Caller
 
This is just if you also want to allow somebody to dial a local number without CC and AC
Normalize local calls:
Match Pattern: ^([1-9][0-9]+)$
Replacement Pattern: ${caller_cc}${caller_ac}\1
Description: Local to E.164
Direction: Inbound
Field: Caller
 
 
And again the same for the Callee number:
 
Strip leading 00 or +
Match Pattern: ^(00|\+)([1-9][0-9]+)$
Replacement Pattern: \2
Description: International to E.164
Direction: Inbound
Field: Callee
 
Replace 0 by caller’s country code:
Match Pattern: ^0([1-9][0-9]+)$
Replacement Pattern: ${caller_cc}\1
Description: National to E.164
Direction: Inbound
Field: Callee
 
This is just if you also want to receive calls from somebody with a local number without CC and AC and to see the full number on the subscribers phone.
Normalize areacode-internal calls:
Match Pattern: ^([1-9][0-9]+)$
Replacement Pattern: ${caller_cc}${caller_ac}\1
Description: Local to E.164
Direction: Inbound
Field: Callee
 
 
Hope this help you a bit.
 
Von: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Syaiful Bahri Kamaruddin
Gesendet: Donnerstag, 8. März 2018 12:04
An: spce-user at lists.sipwise.com
Betreff: [Spce-user] NEED HELP On Rewrite Rules
Priorität: Hoch
 
Hi All,
 
As I installing SPCE Mr 5.5.2 for my school project and used the system for online call and messaging only (sip + xmpp)  (no sip trunk or peering – only intended after further exploration).
 
Hereby need some help on rewrite rule . (as mimicking the original number they have on the contact list in their phone)
 
As default system is using ENUM [60 , either mobile code or state code 2/3/4/11/12/13/14/15/16/18/19, subscriber numberXXXXXXXX]
 
My Country code is 60 (Malaysia).
 
How should I do the rewrite call for caller and callee – inbound / outbound
 
As here (on normal operator) can dial : example subscriber number +60 13 6654329
1)      00 60 13 xxxx  – can go through
2)      +60     13 xxxx – can go through
3)      013 xxxx – can go through
 
How can I setup the call rewrite in the admin so either a caller dial by the initial prefix ie: 0060 , +60 , 013   still can pass to the subscriber number of  60136654329 set in the admin ENUM form. ( so using any SIP Apk need not to change their contact number which they might set either 3 way of the above. 
 
Your help is highly appreciated.
 
Best Regards
 
Syaiful
 
Newbie..
 
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20180308/fa682143/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5532 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20180308/fa682143/attachment-0001.p7s>
    
    
More information about the Spce-user
mailing list