[SR-Users] Issue in Dialplan Module

Logeshwaran G logeshwarangs at gmail.com
Fri Aug 4 06:34:38 CEST 2017


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.
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170804/51811e9e/attachment.html>


More information about the sr-users mailing list