Skip to content

Commit

Permalink
Fix "dialplan addrule" command.
Browse files Browse the repository at this point in the history
The match_len column was replaced with match_flags
Closes #513

(cherry picked from commit 607fb3e)
  • Loading branch information
bogdan-iancu committed May 26, 2015
1 parent 980b680 commit de477a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/opensipsctl
Expand Up @@ -1640,20 +1640,20 @@ dialplan() {
exit 1
esac
DIALPLAN_MATCH_EXP=$4
DIALPLAN_MATCH_LEN=$5
DIALPLAN_MATCH_FLAGS=$5
DIALPLAN_SUBST_EXP=$6
DIALPLAN_REPL_EXP=$7
DIALPLAN_ATTRS=$8

QUERY="insert into $DIALPLAN_TABLE \
( $DIALPLAN_DPID_COLUMN, $DIALPLAN_PR_COLUMN, $DIALPLAN_MATCH_OP_COLUMN, \
$DIALPLAN_MATCH_EXP_COLUMN, $DIALPLAN_MATCH_LEN_COLUMN, \
$DIALPLAN_MATCH_EXP_COLUMN, $DIALPLAN_MATCH_FLAGS_COLUMN, \
$DIALPLAN_SUBST_EXP_COLUMN, $DIALPLAN_REPL_EXP_COLUMN, \
$DIALPLAN_ATTRS_COLUMN ) \
VALUES ( $DIALPLAN_DPID, $DIALPLAN_PR, $DIALPLAN_MATCH_OP, \
'$DIALPLAN_MATCH_EXP', $DIALPLAN_MATCH_LEN, '$DIALPLAN_SUBST_EXP', \
'$DIALPLAN_MATCH_EXP', $DIALPLAN_MATCH_FLAGS, '$DIALPLAN_SUBST_EXP', \
'$DIALPLAN_REPL_EXP', '$DIALPLAN_ATTRS')";
#mecho "$QUERY"
mecho "$QUERY"
$DBCMD "$QUERY"

if [ $? -ne 0 ] ; then
Expand Down
4 changes: 2 additions & 2 deletions scripts/opensipsctl.base
Expand Up @@ -340,7 +340,7 @@ DIALPLAN_DPID_COLUMN=dpid
DIALPLAN_PR_COLUMN=pr
DIALPLAN_MATCH_OP_COLUMN=match_op
DIALPLAN_MATCH_EXP_COLUMN=match_exp
DIALPLAN_MATCH_LEN_COLUMN=match_len
DIALPLAN_MATCH_FLAGS_COLUMN=match_flags
DIALPLAN_SUBST_EXP_COLUMN=subst_exp
DIALPLAN_REPL_EXP_COLUMN=repl_exp
DIALPLAN_ATTRS_COLUMN=attrs
Expand Down Expand Up @@ -526,7 +526,7 @@ cat <<EOF
dialplan show <dpid> .............. show dialplan tables
dialplan reload ................... reload dialplan tables
dialplan addrule <dpid> <prio> <match_op> <match_exp>
<match_len> <subst_exp> <repl_exp> <attrs>
<match_flags> <subst_exp> <repl_exp> <attrs>
.................... add a rule
dialplan rm ....................... removes the entire dialplan table
dialplan rmdpid <dpid> ............ removes all the gived dpid entries
Expand Down

0 comments on commit de477a4

Please sign in to comment.