<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.simpara, li.simpara, div.simpara
        {mso-style-name:simpara;
        mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.E-MailFormatvorlage22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage25
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage26
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.importantsign
        {mso-style-name:important_sign;}
span.E-MailFormatvorlage28
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:412163349;
        mso-list-type:hybrid;
        mso-list-template-ids:835348564 -1825258374 201785369 201785371 201785359 201785369 201785371 201785359 201785369 201785371;}
@list l0:level1
        {mso-level-text:"%1\.\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:54.0pt;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:90.0pt;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:126.0pt;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:162.0pt;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:198.0pt;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:234.0pt;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:270.0pt;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:306.0pt;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-AT link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>I thought about it again and wrote all together:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>* I only want to allow a particular Subscriber to make calls outside via 2 specific peering groups.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>* Which of the 2 peers the subscriber uses should be matched against the source and destination number.<o:p></o:p></span></p><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-US>* If call with country code "43 or 49" and destination "43 or 49" then peer 1.<o:p></o:p></span></p><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-US>* If call with country code "43 or 49" and destination NOT "43 or 49" then peer 2.<o:p></o:p></span></p><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-US>* If call with country code NOT "43 or 49" then peer 2.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>* All other subscribers should call outside via peer 3.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>* If an emergency call comes with Callee prefix "emergency_", then the call should also be made via peer 3.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Although I can set it up by editing the Callee Pattern and the Caller Pattern, this will apply to all subscribers.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I need the ability of a peering group to say that it can only accept calls from that subscriber, as well as telling another peering group to accept all calls from subscribers other than a particular subscriber.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Idea 1:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I would solve this with a negative lookahead. => If the subscriber had the username 4311111, then that would be ^ sip: (?! (4311111)). + $<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>My problem now is that I can’t test against the username.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Idea 2:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I could now edit the proxy.cfg:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>proxy.cfg:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>> $ var (lcr_match_content) = "sip:" + $ avp (s: first_caller_cli_userprov) + "@" + $ avp (s: caller_domain_netprov);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>> xlog ("L_NOTICE", "Load gws matching calling part '$ var (lcr_match_content)' and called user '$ rU' and called part '$ ru' - [% logreq -%] \ n");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>> Replace $ avp (s: first_caller_cli_userprov) with "$ avp (s: acc_caller_user)" in the lcr_match_content.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>However, if I do that, I lose the caller pattern and can’t do my above comparison.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>So I would need an extra field or hardcoden it somewhere, so I can define the username. => a "Caller Prefix / Username" field, so to speak.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Idea 3:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>My idea was to alienate the field "callee prefix" = "$ var (lcr_rU)" for purpose and to rewrite it internally so that this queries just against the username.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>In proxy.cfg this is currently defined as: "$ var (lcr_rU) = $ rU;" and change that to "$ var (lcr_rU) = $ avp (s: acc_caller_user);"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I do not know where else this field is interrogated or in use.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Also, I do not know what impact this has on calls with an "emergency_prefix".<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>If the "emergency_prefix" can also be read out of the "Called Part" field, then you could create a "Callee Pattern" for this, and thus do the emergency call routing to a specific peering, but I suspect that the "Callee Pattern" is not is preferred, because the priority of Outbound Routing Rules is queried on the basis of the "Callee Prefix" and if it should be empty, according to the priority of the Peering Group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Say, with this solution, it would be good if you next to "Callee Prefix" queries the "Callee Pattern", before the Peering Group priority is preferred.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Idea 4:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>An alternative would be to set an inbound callee rewrite rule for the subscriber and thus define a "callee prefix", which will then be used in a peering group. Thus, all calls through this subscriber would be forwarded there, but then I have the problem that I would have to provide the billing profile with this prefix, otherwise every call would stop the rate-o-mat. I also think that this is not a clean solution.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Idea 5:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>One would have to be able to assign several peering groups to a subscriber directly, so that this only ever this use and otherwise none.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Or you just have to have an extra field in the Outbound Routing Rule where you can allow or deny a specific subscriber the use of this peering group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>What do you think about this? Is there any way to fix this?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thank You for your help.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='mso-fareast-language:DE-AT'>Von:</span></b><span lang=DE style='mso-fareast-language:DE-AT'> Spce-user [mailto:spce-user-bounces@lists.sipwise.com] <b>Im Auftrag von </b>Hohl Matthias<br><b>Gesendet:</b> Mittwoch, 14. Februar 2018 14:51<br><b>An:</b> 'Rene Krenn' <rkrenn@sipwise.com>; 'Spce-user' <Spce-user@lists.sipwise.com><br><b>Betreff:</b> Re: [Spce-user] EEA and nonEEA Calle/Caller Pattern differentiation for Peering Group in mr5.5.2<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>Hello,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>i validate it today with an online validator and it looks like booth is working:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Variant 1:   ^sip:(?!(43|49|3222)).+$<span style='color:#1F497D'><o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Variant 2:   </span><span lang=EN-US>^sip:(?!43|49|3222).+$<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>But this not: ^sip:?!(43|49|3222).+$<span style='color:#1F497D'><o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>it is necessary to add the “<a href="sip:">sip:</a>” in front to identify, that the match pattern is directly on beginning of the number.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Do I also need a pattern in this format “<a href="sips:">sips:</a>” for TLS calls? <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I tested it now with a simplier pattern, but found out another problem with the right peer routing and run out of order to find a solution…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>My biggest problem is that “callee prefix” identifying is the highest priority and that I can’t set this prefix directly on subscriber and need to greate a rewrite rule for that.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>How do I set this “callee prefix” without breaking my rate-o-mat?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I tried with a rewrite rule on subscriber manipulating the “inbound rewrite rule for callee” and set there a prefix but this will break rate-o-mat.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Also I tried around a bit to find another solution, but if “callee_prefix” will be always be on highest priority I can’t use this peering group with a lower priority like my main peering group…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Can anybody can give me the right advice how I can force a subscriber to place calls primary over a specific peering?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='mso-fareast-language:DE-AT'>Von:</span></b><span lang=DE style='mso-fareast-language:DE-AT'> Rene Krenn [<a href="mailto:rkrenn@sipwise.com">mailto:rkrenn@sipwise.com</a>] <br><b>Gesendet:</b> Mittwoch, 14. Februar 2018 00:51<br><b>An:</b> 'Hohl Matthias' <<a href="mailto:matthias.hohl@telematica.at">matthias.hohl@telematica.at</a>>; 'Spce-user' <<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>><br><b>Betreff:</b> AW: [Spce-user] EEA and nonEEA Calle/Caller Pattern differentiation for Peering Group in mr5.5.2<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>></span><span lang=EN-US style='color:#1F497D'>should I change it there also?</span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Yes. Also, the lookbehind should be delimited by enclosing parantheses.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>^sip:(?!(43|49|32)).+$</span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Furthermore the lookbehind regexp-part is subject to some limitations, depending on the engine (see  <a href="https://www.regular-expressions.info/lookaround.html">https://www.regular-expressions.info/lookaround.html</a>). It explicitly states alternation groups like above are possible but eg. perl seem to require egual-length substrings (which is fine for 43800, 43810, .. -> they all have a length of 5).<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>It‘s otherwise a good idea to try the regexp either in mariadb console or at an (online) tester.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>regards<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='mso-fareast-language:DE-AT'>Von:</span></b><span lang=DE style='mso-fareast-language:DE-AT'> Hohl Matthias [<a href="mailto:matthias.hohl@telematica.at">mailto:matthias.hohl@telematica.at</a>] <br><b>Gesendet:</b> Mittwoch, 14. Februar 2018 00:29<br><b>An:</b> 'Rene Krenn' <<a href="mailto:rkrenn@sipwise.com">rkrenn@sipwise.com</a>>; 'Spce-user' <<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>><br><b>Betreff:</b> AW: [Spce-user] EEA and nonEEA Calle/Caller Pattern differentiation for Peering Group in mr5.5.2<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hey Rene,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thank for confirmation… I will test it tomorrow… <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>About “in front of”:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>In our last conversation about negative lookahead in the billing profile, I also used it inside the capturing group… <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#333333;background:white'>^(?!43800|43810|43820|43821|43900|43930|43901|43931|43939).+$</span><span lang=EN-US style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>As I can remember, this also worked… should I change it there also?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='mso-fareast-language:DE-AT'>Von:</span></b><span lang=DE style='mso-fareast-language:DE-AT'> Rene Krenn [<a href="mailto:rkrenn@sipwise.com">mailto:rkrenn@sipwise.com</a>] <br><b>Gesendet:</b> Dienstag, 13. Februar 2018 23:08<br><b>An:</b> 'Hohl Matthias' <<a href="mailto:matthias.hohl@telematica.at">matthias.hohl@telematica.at</a>>; 'Spce-user' <<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>><br><b>Betreff:</b> AW: [Spce-user] EEA and nonEEA Calle/Caller Pattern differentiation for Peering Group in mr5.5.2<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>basically sounding; the deny case is the interesting one, you should try to pull that negative lookahead in front of the the capturing group:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Callee Pattern: ^sip:?!(43|49|32).+$<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>regards<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='mso-fareast-language:DE-AT'>Von:</span></b><span lang=DE style='mso-fareast-language:DE-AT'> Spce-user [<a href="mailto:spce-user-bounces@lists.sipwise.com">mailto:spce-user-bounces@lists.sipwise.com</a>] <b>Im Auftrag von </b>Hohl Matthias<br><b>Gesendet:</b> Dienstag, 13. Februar 2018 22:48<br><b>An:</b> 'Spce-user' <<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>><br><b>Betreff:</b> [Spce-user] EEA and nonEEA Calle/Caller Pattern differentiation for Peering Group in mr5.5.2<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>i need your REGEX help…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I need to allow and deny calls from a subscriber with a specific NPN to a peering group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>1.)<span style='font:7.0pt "Times New Roman"'>    </span></span></span><![endif]><span lang=EN-US>Allow:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Every call from a subscriber with a NPN beginning with country code 43, 49 or 32 calling a number in country 43, 49 or 32 should be allowed to place the call over this peering group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Every other country code, for example +1 and +86, should NOT be allowed to place a call over this group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Callee Pattern: ^sip:(43|49|32).+$<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Caller Pattern: ^sip:(43|49|32).+$<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>2.)<span style='font:7.0pt "Times New Roman"'>    </span></span></span><![endif]><span lang=EN-US>Deny:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Every call from a subscriber with a NPN beginning with country code 43, 49 or 32 calling a number in country 43, 49 or 32 should NOT be allowed to place the call over this peering group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Every other country code, for example +1 and +86, should be allowed to place a call over this group.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Callee Pattern: ^sip:(?!43|49|32).+$<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Caller Pattern: empty<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Are this the right pattern for my scenario?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thank you.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>