Re: [OpenSIPS-Users] dialplan module - ensuring a substring exists in URI

2021-04-21 Thread Kingsley Tart
Hi, Thanks but I tried that and whatever I tried I could not get it to work. I don't know whether I have misunderstood what you meant? With this setup: +--++--++-+-+-+ | dpid | pr | match_op | match_exp | match_flags |

Re: [OpenSIPS-Users] dialplan module - ensuring a substring exists in URI

2021-04-21 Thread Bogdan-Andrei Iancu
Hi Kingsley, You could try with a single rule, like optional matching the param (like "(;user=phone)?") and in subst + repl part do not include the param inside the \1 parenthesis, having it added all the time in the repl part. Still you need a more complex matching if you have multiple

Re: [OpenSIPS-Users] dialplan module - dpid - could it be a string?

2021-04-21 Thread Kingsley Tart
ased > > dialplan IDs for use in the script, just like this. > > > > [1] > > https://github.com/OpenSIPS/opensips/issues/new?assignees===feature_request.md=%5BFEATURE%5D > > > > Ben Newlin > > > > From: Users on behalf of > > Kingsley Tart > > Date

Re: [OpenSIPS-Users] dialplan module - dpid - could it be a string?

2021-04-21 Thread Bogdan-Andrei Iancu
/OpenSIPS/opensips/issues/new?assignees===feature_request.md=%5BFEATURE%5D Ben Newlin *From: *Users on behalf of Kingsley Tart *Date: *Tuesday, April 20, 2021 at 12:22 PM *To: *OpenSIPS users mailling list *Subject: *[OpenSIPS-Users] dialplan module - dpid - could it be a string? I love

Re: [OpenSIPS-Users] dialplan module - dpid - could it be a string?

2021-04-20 Thread Ben Newlin
Tart Date: Tuesday, April 20, 2021 at 12:22 PM To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] dialplan module - dpid - could it be a string? I love the dialplan module and how the rules can be reloaded from a DB. However, is there any reason why the dpid can't be a string instead

[OpenSIPS-Users] dialplan module - ensuring a substring exists in URI

2021-04-20 Thread Kingsley Tart
Hi, I want a DP ruleset to ensure that ";user=phone" is in the SIP URI, ie if it is not there, add it, but if it is already there, do nothing. I've managed to do this with two lines, but is there a more efficient way? This is what I have in the dialplan table in this ruleset?

[OpenSIPS-Users] dialplan module - dpid - could it be a string?

2021-04-20 Thread Kingsley Tart
I love the dialplan module and how the rules can be reloaded from a DB. However, is there any reason why the dpid can't be a string instead of an integer? (ie the value that's stored in the dialplan.dpid field). I think it would be handy to be able to apply names to dialplan rulesets as it would

Re: [OpenSIPS-Users] dialplan module

2016-04-01 Thread Francjos
I read the tutorial but it seems not to be approrpiate to my environnement. In the enterprise where i do my training, they wish to put in palce two Opensips servers and two Freeswitch servers. The Opensips serves must register to their sip provider via a sip trunk (the registration is already

Re: [OpenSIPS-Users] dialplan module

2016-03-31 Thread Johan De Clercq
There is a nice tutorial on this on the opensips website. 2016-03-31 15:18 GMT+02:00 Francjos <35...@heb.be>: > Please, which configurations do i have to make in Opensips and FreeSwitch > servers in order calls from clients that come through my provider (OVH) to > land in FreeSwitch server via

Re: [OpenSIPS-Users] dialplan module

2016-03-31 Thread Bogdan-Andrei Iancu
Hi, Then you have to install also the opensips-dialplan package from the same repo. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 31.03.2016 12:03, Francjos wrote: I do not install opensips from source, i've done a deposit from opensips

Re: [OpenSIPS-Users] dialplan module

2016-03-31 Thread Francjos
I do not install opensips from source, i've done a deposit from opensips repository to /etc/apt/sources.list. So i dont see how i can recompile via "make menuconfig" because there is no Makefile. -- View this message in context:

Re: [OpenSIPS-Users] dialplan module

2016-03-31 Thread Nagorny, Dimitry
users-boun...@lists.opensips.org [mailto:users- /*boun...@lists.opensips.org] Im Auftrag von Francjos /*Gesendet: Donnerstag, 31. März 2016 10:26 /*An: users@lists.opensips.org /*Betreff: [OpenSIPS-Users] dialplan module /* /*Hello, /* /*I'm using Opensips 2.1.2 but the dialplan module is not present in the /*director

[OpenSIPS-Users] dialplan module

2016-03-31 Thread Francjos
Hello, I'm using Opensips 2.1.2 but the dialplan module is not present in the directory /usr/lib/opensips/modules. Because of this, the module can't be loaded. Is there a way to include the module? Thanks -- View this message in context:

Re: [OpenSIPS-Users] Dialplan module is not connecting to Database

2016-03-23 Thread Richard Robson
OK, I was passing the MI command via the CP interface and getting the errors there it is working via the console [root@gl-sip-01 ~]# opensipsctl fifo dp_translate greenlight:11 01382843843 Output:: 441382843843 ATTRIBUTES:: [root@gl-sip-01 ~]# opensipsctl fifo dp_translate 11 01382843843

Re: [OpenSIPS-Users] Dialplan module is not connecting to Database

2016-03-23 Thread Bogdan-Andrei Iancu
Hi Richard, So, at the end , what is the full correct syntax for calling the dp_translate via fifo ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 23.03.2016 13:37, Richard Robson wrote: Hi Guys, I've got this working now. Here's a

Re: [OpenSIPS-Users] Dialplan module is not connecting to Database

2016-03-23 Thread Richard Robson
Hi Guys, I've got this working now. Here's a couple of things I've found. You appear to need partitions, despite the documentation to the contrary. The MI command dp_translate does not accept the partition:dpid as a valid input it seems to want just the dpid the New book has " in its examples.

[OpenSIPS-Users] Dialplan module is not connecting to Database

2016-03-22 Thread Richard Robson
Hi, I'm trying to use the dialplan module, but every time I get a "400 Wrong db connection para" the connection is the same for all other modules, which are working fine and I can connect via opensipsCP, mysql and phpmyadmin. I'm using version 2.1 Mar 22 12:22:13 gl-sip-01 opensips:

Re: [OpenSIPS-Users] Dialplan module and priority

2015-07-18 Thread Ali Pey
Thank you for the responses. I have alternated priorities and every other thing I could think of and it would not change the behavior. It always picks the first match if it's a regex type (match_op=1). It works as expected if it's equal type (match_op=0) Priority doesn't seem to kick in when it

Re: [OpenSIPS-Users] Dialplan module and priority

2015-07-17 Thread Muhammad Danish Moosa
Hi. Higher the priority value means 888444's selection should be prioritized. Did you reload the config , have used similar rules and worked. On Fri, Jul 17, 2015 at 3:01 AM, SamyGo govoi...@gmail.com wrote: Hi, Swapping the priority works the way you want ? I have a feeling this makes sense

[OpenSIPS-Users] Dialplan module and priority

2015-07-16 Thread Ali Pey
Hello, Let's say I have the two following rules in my dialplan table: Rule 1: - match_op = 1 (regexp) - Priority=1 - match_exp = ^888[0-9]{7} Rule 2: - match_op = 1 (regexp) - Priority=2 - match_exp = ^888444[0-9]{4} If I use dp_translate for 8882221234, it matches rule 1 and that's good. If

Re: [OpenSIPS-Users] Dialplan module and priority

2015-07-16 Thread SamyGo
Hi, Swapping the priority works the way you want ? I have a feeling this makes sense (just like an ACL or firewall rules) ^888444* should get called before ^888* . On Thu, Jul 16, 2015 at 5:47 PM, Ali Pey ali...@gmail.com wrote: Hello, Let's say I have the two following rules in my dialplan

Re: [OpenSIPS-Users] DialPlan Module Nested dp_translate

2012-05-05 Thread Bogdan-Andrei Iancu
Hi Jamuel, And idea will be to simulate sub-levels by groups. Like top level rules (with wider regexps) are in group 1 and they point (via attributes) to another group of rules (tighter). Like in your case: Group 1 Matching Regular Expression: ^\+1.* Substitution Regular Expression:

[OpenSIPS-Users] DialPlan Module Nested dp_translate

2012-05-01 Thread Jamuel Starkey
Hi, I'm using OpenSIPs v1.7.2 and trying to come up with a way to nest dialplan dp_translate. I'd like to match against a fairly broad regex and do a replacement and then match the resulting replacement with a narrower regex this time just set an attribute (no replacement). I don't see how

Re: [OpenSIPS-Users] DialPlan Module Nested dp_translate

2012-05-01 Thread pa...@eremina.net
I can't understand what for you need to set a Attribute? pseudo code: dp_translate(0,$ruri/$ruri) (in dialplan table present rule with dpid=1, match_reg_exp=1415.*) if (dp_translate(1,$riru/$var(smth)) { $var(myvar) = '415'; do_anything; } 2012/5/2 Jamuel Starkey jam...@hcvoip.com: Hi, I'm

Re: [OpenSIPS-Users] Dialplan module and matching numbers

2012-04-05 Thread Ali Pey
Hi Sammy, Thank you for your response but I don't think you understood my question. As the subject of the thread suggests my question is regarding the dialplan module. I don't want to list all hundreds of my numbers in my config script and then restart opensips every time I need to make a

Re: [OpenSIPS-Users] Dialplan module and matching numbers

2012-04-05 Thread Bogdan-Andrei Iancu
Hi Ali, the dpid is DialPlan ID - the idea is that you can group the rules in different sets and use a certain set at a given moment. This dpid is linked to the first param of the dp_translate() function - you tell to the function which set of rules to use (and only the rules from that set

Re: [OpenSIPS-Users] Dialplan module and matching numbers

2012-04-05 Thread Ali Pey
Thank you Bogdan. That makes sense. I guess I would only need one dpid in my case. Regards, Ali On Thu, Apr 5, 2012 at 10:02 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: ** Hi Ali, the dpid is DialPlan ID - the idea is that you can group the rules in different sets and use a certain

Re: [OpenSIPS-Users] Dialplan module and matching numbers

2012-04-04 Thread SamyGo
Hey, I think using this would help if( $tU =~ 1234567890) { $avp(gid) = 1; }else if( $tU =~ 9876543210 ){ $avp(gid) = 2; } if (!load_balance($avp(gid),transc;pstn)) { sl_send_reply(500,Service full); exit; } engage

Re: [OpenSIPS-Users] Dialplan module

2010-07-29 Thread Bogdan-Andrei Iancu
Hi, What match-op are you using for that rule ? Regards, Bogda Антон Загорский wrote: Hello. I'm using a head version of opensips. In case when in the column subst_expr there is nothing, dp_translate() does not place to the output the repl_exp column value. But it should accordingly the

[OpenSIPS-Users] Dialplan module

2010-07-20 Thread Антон Загорский
Hello. I'm using a head version of opensips. In case when in the column subst_expr there is nothing, dp_translate() does not place to the output the repl_exp column value. But it should accordingly the dialplan module documentation. ___ Users

Re: [OpenSIPS-Users] Dialplan module

2010-07-20 Thread Denis Putyato
Hello Are you using regexp in repl_exp ? -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Антон Загорский Sent: Tuesday, July 20, 2010 4:19 PM To: users@lists.opensips.org Subject: [OpenSIPS-Users] Dialplan module Hello

Re: [OpenSIPS-Users] Dialplan module

2010-07-20 Thread Антон Загорский
@lists.opensips.org Subject: [OpenSIPS-Users] Dialplan module Hello. I'm using a head version of opensips. In case when in the column subst_expr there is nothing, dp_translate() does not place to the output the repl_exp column value. But it should accordingly the dialplan module documentation

Re: [OpenSIPS-Users] Dialplan module

2010-07-20 Thread Denis Putyato
mailling list' Subject: Re: [OpenSIPS-Users] Dialplan module No, just an exact string like sip:1...@mydomain.com Hello Are you using regexp in repl_exp ? -Original Message- From: users-boun...@lists.opensips.org [mailto:users- boun...@lists.opensips.org] On Behalf Of Антон Загорский

[OpenSIPS-Users] Dialplan module Usage

2009-10-22 Thread Indiver
Hi Every one, I'm new to the opensips. I dont know wheter it is a right question to post here. I worked on the amost all modules of opensips. I had some queries regarding dialplan module. 1)What is the exact usage of dialplan module other than calling regexpression from database. I tried some

Re: [OpenSIPS-Users] Dialplan module Usage

2009-10-22 Thread Indiver
Hi Flavio, Thanks for your response. I had to implement the similar scenario as mentioned by you. I tried with different scenario by using forums,but in vain. can you send the configuration implemented by your for local and pstn. we have to authenticate our customers for certain destinations.

Re: [OpenSIPS-Users] Dialplan module not working

2009-10-14 Thread Indiver
Hi Brett, Thanks for your quick response. I tested with the criteria you have given but in vain. I had followed the following scenario for dialplan module. Step 1: Added rules in opensips-cp as follows: Matching Regular Expression: sip:1[0-9]...@localhost Substitution Regular

Re: [OpenSIPS-Users] Dialplan module not working

2009-10-14 Thread Brett Nemeroff
Honestly, you'd be better off matching with $ruri.user and not the full RURI unless you really mean that. FWIW, I can't imagine that sip:1[0-9]...@localhost would *ever* match. Why don't you set an xlog showing what the RURI is, then write a regex you know matches that? Did you try my

[OpenSIPS-Users] Dialplan module not working

2009-10-13 Thread Indiver
HI Everyone, I want to implement the dialplan module. But i was confused little bit in the configuration part. my database table of dialplan module is ++--++--+---+---+---+--+---+ | id | dpid | pr | match_op | match_exp | match_len

Re: [OpenSIPS-Users] Dialplan module not working

2009-10-13 Thread Brett Nemeroff
Your very close.. look, your regex shows ^67.+ (starts with 67) BUT your string does NOT start with 67. it starts with sip:67 (ie: si != 67) so it just doesn't match. Also, I wouldn't use the $var vars here.. instead try: dp_translate(1, $ruri.user/$ruri.user) THEN your shown regex will work

Re: [OpenSIPS-Users] Dialplan module not working

2009-10-13 Thread Bogdan-Andrei Iancu
Hi Nehru, the rule matching regexp (match_exp ) expects to receive a string starting with 67, but you pass a string with sip: in front. Regards, Bogdan Indiver wrote: HI Everyone, I want to implement the dialplan module. But i was confused little bit in the configuration part. my database

Re: [OpenSIPS-Users] Dialplan module problems

2009-05-02 Thread Bogdan-Andrei Iancu
Hi Brett, Brett Nemeroff wrote: Hey Bogdan, you know, for the life of me, I couldn't get it to be an int. Even in my select, I cast the result to an INT. you mean you load this ID from DB where it is an INT field and you get a STR val AVP? Well, you know, I had the exact same problem with

[OpenSIPS-Users] Dialplan module problems

2009-04-30 Thread Brett Nemeroff
Hey All,I'm using the dialplan module and trying to use an avp for the dpid.. avp_print shows my avp like this: Apr 30 21:48:26 sip1 /usr/local/sbin/opensips[8079]: INFO:avpops:ops_print_avp: p=0xb620c0f8, flags=0x0003 Apr 30 21:48:26 sip1 /usr/local/sbin/opensips[8079]: INFO:avpops:ops_print_avp: