Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOD DIALPLAN v2.2: New Dialplan Features #794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Parantido
Copy link
Contributor

  • Rules preload/translate alghoritm reworked: no more needs to have different buckets for REGEXP and BEST MATCH ones. All rules belong from same bucket. This way opens to many different scenarios and future development without afflicting performances (this rework will also fix issue Wrong rule selected in dialplan translation when both string and regexp rules are matched #696 Wrong rule selected in dialplan translation when both string and regexp rules are matched #696).

  • New "match_var" database column introduced. This column will override "src/dest" dp_translate parameter when filled. It respects same syntax (wrong syntax will cause rule to being discarded at preload time).

  • New "matched_pvar" AVP introduced. It will be filled with last matched rule id. AVP name can be set by modparam directive:

    modparam("dialplan", "matched_pvar", "$avp(dp_ruleid)")
    
  • New "continue_search" database column introduced. When filled to "1", rule matching will continue through other rules. ATTRS and MATCHED_PVAR will be updated as soon as rule matches (next rule match will works on PVAR updated values). After a dp_translate ATTRS and MATCHED_PVAR will be updated with last rule match values.

All new features and code rework default behaviour respects old syntaxes. No database entries or opensips.cfg scripts needs to be changed on module
upgrade

	* Rules preload/translate alghoritm reworked: no more needs to have different buckets for REGEXP and BEST MATCH ones. All rules belong from
	  same bucket. This way opens to many different scenarios and future development without afflicting performances (this rework will also fix
	  issue OpenSIPS#696 OpenSIPS#696).
	* New "match_var" database column introduced. This column will override "src/dest" dp_translate parameter when filled. It respects same syntax
	  (wrong syntax will cause rule to being discarded at preload time).
	* New "matched_pvar" AVP introduced. It will be filled with last matched rule id. AVP name can be set by modparam directive:

		modparam("dialplan", "matched_pvar", "$avp(dp_ruleid)")

        * New "continue_search" database column introduced. When filled to "1", rule matching will continue through other rules. ATTRS and MATCHED_PVAR
	  will be updated as soon as rule matches (next rule match will works on PVAR updated values). After a dp_translate ATTRS and MATCHED_PVAR will
	  be updated with last rule match values.

All new features and code rework default behaviour respects old syntaxes. No database entries or opensips.cfg scripts needs to be changed on module
upgrade.
@bogdan-iancu bogdan-iancu added this to the 2.2 milestone Feb 15, 2016
Parantido added a commit to Parantido/opensips that referenced this pull request Feb 16, 2016
…SIPS#794)

    Rules preload/translate alghoritm reworked: no more needs to have different buckets for REGEXP and BEST MATCH ones. All rules belong from same bucket. This way opens to many different scenarios and future development without afflicting performances (this rework will also fix issue OpenSIPS#696 OpenSIPS#696).
    New "match_var" database column introduced. This column will override "src/dest" dp_translate parameter when filled. It respects same syntax (wrong syntax will cause rule to being discarded at preload time).

    New "matched_pvar" AVP introduced. It will be filled with last matched rule id. AVP name can be set by modparam directive:

    modparam("dialplan", "matched_pvar", "$avp(dp_ruleid)")

    New "continue_search" database column introduced. When filled to "1", rule matching will continue through other rules. ATTRS and MATCHED_PVAR will be updated as soon as rule matches (next rule match will works on PVAR updated values). After a dp_translate ATTRS and MATCHED_PVAR will be updated with last rule match values.

All new features and code rework default behaviour respects old syntaxes. No database entries or opensips.cfg scripts needs to be changed on module
upgrade
@Parantido
Copy link
Contributor Author

Sorry I totally missed database schema

CREATE TABLE IF NOT EXISTS dialplan (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
dpid int(11) unsigned DEFAULT NULL,
pr int(11) NOT NULL,
match_op int(11) NOT NULL,
match_exp char(64) NOT NULL,
match_flags int(11) DEFAULT NULL,
match_len int(11) NOT NULL,
subst_exp char(64) NOT NULL,
repl_exp char(32) NOT NULL,
disabled int(11) NOT NULL DEFAULT '0',
attrs char(32) DEFAULT NULL,
timerec varchar(255) NOT NULL DEFAULT '',
match_var char(32) DEFAULT NULL,
continue_search tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (id),
);

@bogdan-iancu bogdan-iancu changed the title MOD DIALPLAN v2.1.2: New Dialplan Features MOD DIALPLAN v2.2: New Dialplan Features Mar 8, 2016
@bogdan-iancu bogdan-iancu self-assigned this Mar 8, 2016
@Parantido
Copy link
Contributor Author

Hi Bogdan,

in which opensips version this feature will be introduced?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants