<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">(2 comments)</p><p style="white-space: pre-wrap; word-wrap: break-word;">StasisStart gets its timestamp from the start_message_blob, which just obtains it from the current system time and passes it in. Which should still make it unique/different from other events (as I don't see any other event referencing the start_message_blob).</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Hi Kevin,</p><p style="white-space: pre-wrap; word-wrap: break-word;">Thank you for your kind reviewing. :)</p><p style="white-space: pre-wrap; word-wrap: break-word;">I've fixed it as your comment and replied it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">About the why I think this is bug is,</p><p style="white-space: pre-wrap; word-wrap: break-word;">I think, the StasisStart/StasisEnd is must be placed into the channel's life circle. Especially between 'ChannelCreated' and 'ChannelDestroyed' ARI event.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Because it's Channel event, it doesn't make sense receiving channel event after ChannelDestroyed event. So I'm trying to fixing it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">StasisStart creates timestamp when the message was creating.<br>StasisEnd was creating timestamp when the message was sending.</p><p style="white-space: pre-wrap; word-wrap: break-word;">ChannelDestroyed creates timestamp when the event(channel) was occurred(it gets the timestamp from channel's blob).</p><p style="white-space: pre-wrap; word-wrap: break-word;">It's very small different, but in the messages, sometimes, StasisEnd's timestamp has later than ChannelDestroyed. And StasisEnd sent it faster then ChannelDestroyed. Which is doesn't make sense.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11133">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11133/1/res/res_stasis.c">File res/res_stasis.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11133/1/res/res_stasis.c@128">Patch Set #1, Line 128:</a> <code style="font-family:monospace,monospace">        msg = ast_json_pack("{s: s, s: O, s: o}",</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Bumping the ref here makes sense to me, but (as Josh pointed out) this is now doing something simila […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ah, I've got it. Fixed it. :)</p><p style="white-space: pre-wrap; word-wrap: break-word;">Btw, this branch is 13. I was working in the master to make patch. In the master branch it dump the ref like this for StasisStart.</p><p style="white-space: pre-wrap; word-wrap: break-word;">But I agree with your point. :) It might be causing some unexpected ref free. I fixed it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11133/1/res/res_stasis.c@130">Patch Set #1, Line 130:</a> <code style="font-family:monospace,monospace">          "timestamp", ast_json_object_get(payload->blob, "timestamp"),</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The blob here gets created in "app_send_end_msg" correct? If so I am not seeing where the timestamp  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You're right, and it does creating the timestamp there.</p><p style="white-space: pre-wrap; word-wrap: break-word;">app_send_end_msg() -> ast_channel_blob_create() -> create_channel_blob_message() -> stasis_message_create() -> stasis_message_create_full() -> 'message->timestamp = ast_tvnow();'</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11133">change 11133</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11133"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I5eb8380fc472f1100535a6bc4983c64767026116 </div>
<div style="display:none"> Gerrit-Change-Number: 11133 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 14 Mar 2019 21:42:18 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>