<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Sure, but surely the point of SQL is to update only the affected fields? If it’s going to read the values out one by one, and then set them one by one on a following transaction, it just creates the opportunity for stale data, which is what I’m getting :(<div class=""><br class="">
<div><br class=""><blockquote type="cite" class=""><div class="">On 9 Oct 2017, at 19:34, Michael Jerris <<a href="mailto:mike@jerris.com" class="">mike@jerris.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">it updates them with the values in channel vars.<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 8, 2017, at 2:13 PM, Rick Jarvis <<a href="mailto:rick@magicmail.mooo.com" class="">rick@magicmail.mooo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I had resorted to updating the table directly through SQL as FS doesn't appear to dynamically update the table if I use uuid_setvar :/<div class="">
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On 8 Oct 2017, at 19:05, Vallimamod Abdullah <<a href="mailto:vma@vallimamod.org" class="">vma@vallimamod.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I am not sure how you are updating these columns but if you are doing it directly through sql, I don't think it's the correct way.</div><div class="">To set or update a value on a "presence data" column, you have to define or update a channel variable with the same name as the column. If there is no variable defined, the corresponding column will be set to NULL on the state change.</div><div class=""><br class=""></div><div class="">Hope this helps.</div><div class=""><br class=""><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Best Regards,<br class="">-- <br class="">Vallimamod Abdullah</div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">SIP Solutions</div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><a href="mailto:vma@sipsolutions.fr" class="">vma@sipsolutions.fr</a><br class="">tel: +33 6 62 60 68 97<br class="">.</div></div></div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 8 Oct 2017, at 16:50, Rick Jarvis <<a href="mailto:rick@magicmail.mooo.com" class="">rick@magicmail.mooo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Is there any reason why FS iterates through all the fields in the channels table, when it updates a field? I’ve created some custom columns (as per <a href="https://freeswitch.org/confluence/display/FREESWITCH/Variable+presence+data+cols" class="">https://freeswitch.org/confluence/display/FREESWITCH/Variable+presence+data+cols</a>) but the values I’m writing to my new columns are being overwritten when FS changes the channel state - it appears from the logs that this is due to FS reading the values from the table, and then setting every column (including my custom fields) when it then updates … to me this is counter-intuitive as far as SQL goes!?<br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></div></div>_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services:<br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></blockquote></div><br class=""></div></body></html>