[Asterisk-Users] Realtime Extensions - DB concepts
Bruce Ferrell
bferrell at baywinds.org
Mon Oct 10 16:25:56 MST 2005
OK, I have just discovered what may be a conceptual flaw in realtime
extensions.
DB schema as follows:
uniqueid, context, exten_id, priority, application, application_data
Primary key is uniqueid with an compound index of context and exten_id
data looks something like this:
xxxxx, sip, 5555551212, 1, SetVar,ext=${EXT}
xxxxx, sip, 5555551212, 1, Goto, officevm|2|1
The database is MySQL
pretty stock layout you say
the first set of inserts goes correctly
Now here's where it get's tricky.
let's say we want to update an extension. The simple way is construct a
new pair of records you say and do a "REPLACE INTO" operation on the DB.
yes? NO! That results in a new pair being inserted, not the old ones
being updated so the table grows and grows and grows.
Well, am I doing something wrong?
More information about the asterisk-users
mailing list