admin管理员组文章数量:1125377
I am using PHP Laravel. So I have everything working on my project with Twilio Call API. Now I was asked to calculate the ring duration of outgoing call which Twilio does not provide directly. So what I did was, I saved the Timestamp of all outgoing status call back events that are "initiated ringing answered completed".
Next I calculated ring duration this way:
strtotime(Ring_Time_Stamp) - strtotime(In_Progress_Time_Stamp).
I hope my above logic is correct.
The problem: Twilio sends almost same Time Stamps or similar Time Stamps for initiated, ringing, in-progress. Twilio posts something like this:
RINGING:
Timestamp
"Wed, 08 Jan 2025 21:23:23 +0000"
IN PROGRESS:
Timestamp
"Wed, 08 Jan 2025 21:23:23 +0000"
I know that sometimes calls are received immediately which can cause in 0 ring duration. But in my case it is happening with almost all calls. I am getting almost 200-300 calls a day(beta version). This number will go up as soon as I put to Live.
I am also attaching two images for reference
Ring Time Stamp From Twilio
In Progress Time Stamp From Twilio
This example has a difference of 1 second but for many many other calls I am receiving almost same Time Stamp for Initiated, Ringing and in-progress status call backs.
Can someone guide me please or tell me how can I get correct ring duration which in my project plays a crucial role in determining commissions.
Thank you!
本文标签: Twilio out going status call backs returning almost same TimeStampsStack Overflow
版权声明:本文标题:Twilio out going status call backs returning almost same TimeStamps - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736659850a1946363.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论