Manipulating Dialplan Variables : Asterisk

iNet Expert Technology

We often require to do string manipulation on a variable. For example, a variable named phonenumber which represents a number we’d like to call, and we want to strip off the first 5 digit before dialing the number. Asterisk provides a special syntax for doing just that, which looks like ${variable[:skip[:length]} The optional skip field tells Asterisk how many … Read more

Asterisk – ChannelRedirect

Asterisk dial command

ChannelRedirect : This is used to redirect the given channel to target dialplan. For example if you want to redirect the channel SIP/1222-09992 to wrap context at 2 priority. You can use this function/command to do so. This has been added in Asterisk 1.4 version. For Asterisk 1.4 version ChannelRedirect(channel|[[context|]extension|]priority) For Asterisk 1.8 and above … Read more

show progress on MySQL DB Import

MySQL Cluster

You can use Pipe Viewer to monitor mysql dump. If you don’t already have pv, you can install it with: yum install pv # pv db1.sql.gz | gunzip | mysql -u root -p db1 693MiB 1:00:33 [ 325kiB/s] [====================> ] 68% ETA 0:16:20    

Remove duplicate rows in MySQL

MySQL Cluster

Easiest way to do this is to add a UNIQUE index on the column. When you write the ALTER statement, include the IGNORE keyword. Like so: ALTER IGNORE TABLE jobs ADD UNIQUE INDEX idx_name (site_id, title, company); This will drop all the duplicate rows. As an added benefit, future INSERTs that are duplicates will error … Read more

MySQL Cluster – Core Concept

MySQL Cluster

NDBCLUSTER (also known as NDB) is an in-memory storage engine offering high-availability and data persistence features. The NDBCLUSTER storage engine can be configured with a range of failover and load-balancing options, but it is easiest to start with the storage engine at the cluster level. MySQL Cluster’s NDB storage engine contains a complete set of … Read more

MySQL Cluster Overview

MySQL Cluster

MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture enables the system to work with very inexpensive hardware, and with a minimum of specific requirements for hardware or software. MySQL Cluster is designed not to have any single point of failure. In a shared-nothing system, each … Read more

Client Programming Security Guidelines – MySQL

MySQL Cluster

Applications that access MySQL should not trust any data entered by users, who can try to trick your code by entering special or escaped character sequences in Web forms, URLs, or whatever application you have built. Be sure that your application remains secure if a user enters something like “; DROP DATABASE mysql;”. This is … Read more