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?



_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to