[SR-Users] Issue in Dialplan Module
Anthony Joseph Messina
amessina at messinet.com
Sat Aug 5 06:48:13 CEST 2017
You missed what Daniel said:
IN a regexp ^ matches the beginning of the line/string, and $ matches
the end.
So "^000$" only matches exactly "000" and not "000xxxx"
Remove the $ to match strings begining with 000.
--
Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery
F9B6 560E 68EA 037D 8C3D D1C9 FF31 3BDB D9D8 99B6
On Friday, August 4, 2017 11:18:04 PM CDT Logeshwaran G wrote:
> Yes I have Tried, please find below the Rules I have applied and the Result:
>
> Rules:
> ======
> dpid: 1
> pr: 1
> match_op: 1
> match_exp: ^000$
> match_len: 0
> subst_exp: ^0000$
> repl_exp:
> attrs:
>
>
> I am Calling to the number 00091xxxxxxxxxx , But its saying as Too many
> Hops.
>
> Its only looking for 000, Its not taking the 91xxxxxxxxxx numbers, If I
> call 000 only its replacing with the given number in the Rule table.
>
> I need to Remove only the first 3 digits, and the other numbers should go
> to the call.
>
> For Example If I am calling 00091xxxxxxxxx, It should remove the first 3
> digits 000 and 91xxxxxxxxx call should be place.
>
> Please Guide me for removing the first three digits alone and other numbers
> should takes place.
>
> On Fri, Aug 4, 2017 at 6:43 PM, Joel Serrano <joel at gogii.net> wrote:
> > Have you tried what Daniel suggested?
> >
> > Share the results of the tests and we can go from there.
> >
> > On Thu, Aug 3, 2017 at 21:34 Logeshwaran G <logeshwarangs at gmail.com>
> >
> > wrote:
> >> Input Please!!
> >>
> >> On Thu, Aug 3, 2017 at 5:08 PM, Logeshwaran G <logeshwarangs at gmail.com>
> >>
> >> wrote:
> >>> Thanks a lot!
> >>>
> >>> But for my scenario,
> >>>
> >>> If I am Dialling 000919999999999, need to remove the first three digits
> >>> 000, so the call should go to 919999999999.
> >>>
> >>> I am stucked to create the rule for the above scenario, Kindly help me
> >>> for the same.
> >>>
> >>> Kind Regards,
> >>> Logeshwaran
> >>>
> >>> On Thu, Aug 3, 2017 at 4:48 PM, Daniel Tryba <d.tryba at pocos.nl> wrote:
> >>>> On Thu, Aug 03, 2017 at 04:00:45PM +0530, Logeshwaran G wrote:
> >>>> > +----+------+----+----------+-----------+-----------+-------
> >>>>
> >>>> ----+----------+-------+
> >>>>
> >>>> > | id | dpid | pr | match_op | match_exp | match_len | subst_exp |
> >>>>
> >>>> repl_exp
> >>>>
> >>>> > | attrs |
> >>>> >
> >>>> > +----+------+----+----------+-----------+-----------+-------
> >>>>
> >>>> ----+----------+-------+
> >>>>
> >>>> > | 1 | 1 | 1 | 1 | ^000$ | 0 | ^000$ |
> >>>> > |
> >>>> > | | 111
> >>>> >
> >>>> > +----+------+----+----------+-----------+-----------+-------
> >>>>
> >>>> ----+----------+-------+
> >>>>
> >>>> > The above rule replacing only the 000, If we Dial 000xxxx its
> >>>>
> >>>> omitting,
> >>>>
> >>>> > While Dialing 000 its replacing that with 111.
> >>>>
> >>>> IN a regexp ^ matches the beginning of the line/string, and $ matches
> >>>> the end.
> >>>>
> >>>> So "^000$" only matches exactly "000" and not "000xxxx"
> >>>> Remove the $ to match strings begining with 000.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170804/de34f3e7/attachment.sig>
More information about the sr-users
mailing list