[Vtigercrm-developers] PBX Manager - Duration Calls.

Michele Mastropieri michele.mastropieri at gmail.com
Tue Oct 13 15:34:15 GMT 2015


This is for update duration (in minutes).

delimiter |CREATE TRIGGER `end_time_update` BEFORE UPDATE ON
`vtiger_pbxmanager` FOR EACH ROWBEGIN
   set NEW.endtime = now();
   set NEW.duration = TIMESTAMPDIFF(SECOND, NEW.starttime, NEW.endtime);END|
delimiter ;


Additionally, you can create this trigger for UTC time sync, this is
because vtiger store times as UTC (+0)

delimiter |CREATE TRIGGER `end_time_update` BEFORE UPDATE ON `mytable`
FOR EACH ROWBEGIN
    set NEW.starttime = UTC_TIMESTAMP();END|
delimiter ;





2015-10-13 17:04 GMT+02:00 Vladimir Karažija <vladimir at kosacrta.hr>:

> Hi Michele,
>
> would you be so kind to share solution for this problem?
>
> regards, Vladimir
>
> Vladimir Karažija
>
> Kosa crta d.o.o.
> Jagnedje 1
> 10090 Zagreb
> OIB: 57724075047
>
> t. +385 1 777 33 85
> m. +385 91 122 0511
> www.kosacrta.hr
>
>
> On Oct 13, 2015 12:41 PM, "Michele Mastropieri" <
> michele.mastropieri at gmail.com> wrote:
>
>> Solved manually, I've create a mysql trigger before update into table
>> vtigerpbxmanager
>>
>> 2015-10-12 11:55 GMT+02:00 Michele Mastropieri <
>> michele.mastropieri at gmail.com>:
>>
>>> Hi to all,
>>>
>>> when I open PBX Manager module I can see all pbx calls. The problem is
>>> that the duration is always 60 seconds. But the actual duration is minimum
>>> 10 minutes or more.
>>>
>>> How resolve?
>>>
>>> --
>>>
>>> ------------------------------
>>> dott. Michele Mastropieri
>>> Email: michele.mastropieri at gmail.com
>>> Skype: thebookison
>>> Mobile: 3403050591
>>> Fax: 1782280825
>>> Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario.
>>> N.B. Rispetta l'ambiente. Non stampare questa mail se non è necessario.
>>>
>>>
>>
>>
>> --
>>
>> ------------------------------
>> dott. Michele Mastropieri
>> Email: michele.mastropieri at gmail.com
>> Skype: thebookison
>> Mobile: 3403050591
>> Fax: 1782280825
>> Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario.
>> N.B. Rispetta l'ambiente. Non stampare questa mail se non è necessario.
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
> _______________________________________________
> http://www.vtiger.com/
>



-- 

------------------------------
dott. Michele Mastropieri
Email: michele.mastropieri at gmail.com
Skype: thebookison
Mobile: 3403050591
Fax: 1782280825
Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute
in questo messaggio sono riservate ed a uso esclusivo del
destinatario.
N.B. Rispetta l'ambiente. Non stampare questa mail se non è necessario.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20151013/ad827119/attachment-0001.html>


More information about the vtigercrm-developers mailing list