[Spce-user] Peering Rules

Thomas Odorfer odotom at gmail.com
Wed Mar 4 07:39:26 EST 2015


Hello Sebastien,

you should use regex expression according to Posix (pcre/php)  style for the SPCE platform  - unfortunately javascript regex has some differences and will not work for replacement patterns in SPCE.
A good link for testing & learning:

https://regex101.com/#pcre

http://www.zytrax.com/tech/web/regex.htm

As an example to convert a number in international format (inbound) into the E164 format that sipwise SPCE likes internally (small bug fix on Jons example) by looking for leading 00 or a leading +:

inbound number:  003361234567   or +3361234567

regex search/match pattern:   ^(00|\+)([1-9][0-9].)$
replacement pattern (pick match part 2 - 2nd bracket):    \2

result:     3361234567

Once you got the idea of the whole regex stuff you will see its power and flexibility.
Have fun
Thomas   



Am 04.03.2015 um 11:54 schrieb Sebastien Lesimple <slesimple at laposte.net>:

Many thanks for this URL Mykola!

Le 04/03/2015 11:32, Mykola Zaika a écrit :
> Hello,
> This web site gives opportunity check rules.
> 
> http://java-regex-tester.appspot.com/
> 
> -- 
> З повагою,
> Микола Заїка
> Компанія VoIPTime,
> Тел: +380 32 2328022
> mzaika at voiptime.net
> www.voiptime.net
> 
> 2015-03-02 22:07 GMT+02:00 Jon Bonilla (Manwe) <manwe at sipdoc.net>:
> El Mon, 2 Mar 2015 18:16:40 +0100
> "Jon Bonilla (Manwe)" <manwe at sipdoc.net> escribió:
> 
> > El Mon, 02 Mar 2015 18:03:16 +0100
> > Sebastien Lesimple <slesimple at laposte.net> escribió:
> >
> > > Hi!
> > >
> > > Can someone share some Peering Rules examples?
> > >
> > > All sorts of manipulations like droping a +00 or a leading Zero and
> > > replace by country code for inbound calls from a peer?
> > >
> > > Regards,
> > > Seb.
> >
> >
> > ^(00\+)([1-9][0-9]+)$
> > \1
> > International to E164
> >
> >
> 
> \2 actually
> 
> 
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user
> 
> 
> 
> 
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user

_______________________________________________
Spce-user mailing list
Spce-user at lists.sipwise.com
https://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/20150304/198ceb23/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20150304/198ceb23/attachment-0001.asc>


More information about the Spce-user mailing list