[SR-Users] issue in Dialplan

2017-08-08 Thread Logeshwaran G
Please find the below rules I am using: ++--++--+--+---+ ---+--+---+ | id | dpid | pr | match_op | match_exp| match_len | subst_exp | repl_exp | attrs | ++--++--+--+---+ ---+

[SR-Users] Issue in Dialplan Module

2017-08-03 Thread Logeshwaran G
Hi, I am facing an Problem in Dialplan Module. Scenario: I am Dialling 00091xx number, I need to remove only the prefix 000, then the call placement will be 91xx. My dialplan rule: == MariaDB [kamailio]> select * from dialplan; ++--++--+--

Re: [SR-Users] Issue in Dialplan Module

2017-08-03 Thread Daniel Tryba
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 | > ++--++--+---+---+--

Re: [SR-Users] Issue in Dialplan Module

2017-08-03 Thread Logeshwaran G
Thanks a lot! But for my scenario, If I am Dialling 0009199, need to remove the first three digits 000, so the call should go to 9199. 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,

Re: [SR-Users] Issue in Dialplan Module

2017-08-03 Thread Logeshwaran G
Input Please!! On Thu, Aug 3, 2017 at 5:08 PM, Logeshwaran G wrote: > Thanks a lot! > > But for my scenario, > > If I am Dialling 0009199, need to remove the first three digits > 000, so the call should go to 9199. > > I am stucked to create the rule for the above scenario, Kindl

Re: [SR-Users] Issue in Dialplan Module

2017-08-04 Thread Joel Serrano
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 wrote: > Input Please!! > > On Thu, Aug 3, 2017 at 5:08 PM, Logeshwaran G > wrote: > >> Thanks a lot! >> >> But for my scenario, >> >> If I am Dialling 0009

Re: [SR-Users] Issue in Dialplan Module

2017-08-04 Thread Logeshwaran G
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: ^$ repl_exp: attrs: I am Calling to the number 00091xx , But its saying as Too many Hops. Its only looking for 000, Its not t

Re: [SR-Users] Issue in Dialplan Module

2017-08-04 Thread Anthony Joseph Messina
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 "000" Remove the $ to match strings begining with 000. -- Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery F9B6 5

Re: [SR-Users] Issue in Dialplan Module

2017-08-04 Thread Joel Serrano
Ok, so clearly you have not tried what Daniel suggested... *IN a regexp ^ matches the beginning of the line/string, and $ matchesthe end. So "^000$" only matches exactly "000" and not "000"Remove the $ to match strings begining with 000.* Rules: == dpid: 1 pr: 1 match_op: 1 match_exp: ^

Re: [SR-Users] Issue in Dialplan Module

2017-08-04 Thread Logeshwaran G
Thanks a lot for the Detailed Explanation. I am Beginner to Kamailio, As per Your Suggestion I have used the below Rule: Rules: == dpid: 1 pr: 1 match_op: 1 match_exp: ^000[0-9]+$ <<< This will trigger a match on any number that will start with three zeros. match_len: 0 subst_exp: ^000([

Re: [SR-Users] Issue in Dialplan Module

2017-08-05 Thread Joel Serrano
Can you post your block of config related to dialplan module from kamailio.cfg? Also, how are you calling the dp_* functions? On Fri, Aug 4, 2017 at 10:34 PM, Logeshwaran G wrote: > Thanks a lot for the Detailed Explanation. > > I am Beginner to Kamailio, As per Your Suggestion I have used the

Re: [SR-Users] Issue in Dialplan Module

2017-08-06 Thread Logeshwaran G
I am using the below function: if (is_method("INVITE")) { dp_translate("1", "$rU/$rU"); } On Sat, Aug 5, 2017 at 9:19 PM, Joel Serrano wrote: > Can you post your block of config related to dialplan module from > kamailio.cfg? > > Also, how are you calling the dp_* functions? >

Re: [SR-Users] Issue in Dialplan Module

2017-08-06 Thread Joel Serrano
Can you add logging and post results? if (is_method("INVITE")) { xlog("R-URI User: $rU\n"); dp_translate("1", "$rU/$rU"); xlog("R-URI User: $rU\n"); } On Sun, Aug 6, 2017 at 10:05 PM, Logeshwaran G wrote: > I am using the below function: > > if (

Re: [SR-Users] Issue in Dialplan Module

2017-08-06 Thread Logeshwaran G
Please find the below output 5(12951) ERROR:

Re: [SR-Users] Issue in Dialplan Module

2017-08-06 Thread Logeshwaran G
I mean to say by applying the Rule mentioned from Joel is also not worked. Rules: == dpid: 1 pr: 1 match_op: 1 match_exp: ^000[0-9]+$ <<< This will trigger a match on any number that will start with three zeros. match_len: 0 subst_exp: ^000([0-9]+)$ <<< If the match_exp is found, th

Re: [SR-Users] Issue in Dialplan Module

2017-08-07 Thread Joel Serrano
Hi, (Sorry, my previous reply got blocked due to email size). Can you enable debug logs and try again, then send the logs? I tried the regex with the number 000919629897172 and it worked for me.. We must be missing something.. On Sun, Aug 6, 2017 at 11:19 PM, Logeshwaran G wrote: > I mean to

Re: [SR-Users] Issue in Dialplan Module

2017-08-07 Thread Logeshwaran G
Hi , Please find the below logs , The call is not placing Its in Trying state. To: From: ;tag=e4269c5e Via: SIP/2.0/UDP 192.168.3.5:6090 ;branch=z9hG4bK-d87543-161839468-1--d87543-;rport Call-ID: e01ac670234a8675 CSeq: 3 REGISTER Contact: ;expires=0 Max-Forwards: 70 Allow: INVITE, ACK, C

Re: [SR-Users] Issue in Dialplan Module

2017-08-09 Thread Daniel Tryba
On Wed, Aug 09, 2017 at 01:34:13PM +0530, Logeshwaran G wrote: > I have given the below query, > > INSERT INTO dialplan(id, dpid, pr, match_op, match_exp, match_len, > subst_exp, repl_exp, attrs) VALUES (1, "1", "1", 1, "^000[0-9]+$ ", 0, > "^000([0-9]+)$", "\1", " "); > > But the Rule is tking a

Re: [SR-Users] Issue in Dialplan Module

2017-08-09 Thread Logeshwaran G
Hi, I have changed the rules as you mentioned INSERT INTO dialplan(id, dpid, pr, match_op, match_exp, match_len, subst_exp, repl_exp, attrs) VALUES (1, "1", "1", 1, "^000[0-9]+$ ", 0, "^000([0-9]+)$", "\\1", " "); Eventhough its failing. Thanks & Kind Regards, Logeshwaran G On Wed, Aug 9, 2017

Re: [SR-Users] Issue in Dialplan Module

2017-08-10 Thread Logeshwaran G
Issue Resolved.. Thanks a lot For you Inputs. INSERT INTO dialplan(id, dpid, pr, match_op, match_exp, match_len, subst_exp, repl_exp, attrs) VALUES (2, "1", "2", 1, "^000[0-9]+\\$ ", 0, "^000([0-9]+)$", "", " "); Thanks & Kind Regards, Logeshwaran G On Thu, Aug 10, 2017 at 10:13 AM, Logeshwaran