[Freeswitch-users] Channel Hold Info

mayamatakeshi mayamatakeshi at gmail.com
Thu Jun 14 00:29:02 UTC 2018


Hello,
I have a requirement to generate reports of for how long calls were left on
hold.
My original plan was to monitor CHANNEL_HOLD/CHANNEL_UNHOLD events and
update a channel variable preserving hold history.
Then, I happened to find:

https://freeswitch.org/confluence/display/FREESWITCH/CDR#CDR-Howlongwasthecallonhold
and realized there are already channel variables for this kind of purpose
like hold_events, hold_accum_seconds and even hold-record.

However, testing we recent commit:
  FreeSWITCH Version 1.9.0+git~20180516T213111Z~cfd99a03d4~64bit (git
cfd99a0 2018-05-16 21:31:11Z 64bit)

I verified all this data from XML CDR is related to the side that put the
call on hold:

Leg1) Side that put the other on hold:
    <hold_stamp>2018-06-14%2008%3A23%3A18</hold_stamp>
    <hold_events>%7B%7B1528932198592029,1528932199869251%7D%7D</hold_events>
    <last_hold_epoch>1528932198</last_hold_epoch>
    <last_hold_uepoch>1528932198592027</last_hold_uepoch>
    <hold_accum_seconds>1</hold_accum_seconds>
    <hold_accum_usec>1277224</hold_accum_usec>
    <hold_accum_ms>1277</hold_accum_ms>
  <hold-record>
    <hold on="1528932198592029" off="1528932199869251"
bridged-to="1adf353f-a4e0-4e16-8953-fbd8beccca99"></hold>
  </hold-record>
      <last_hold_time>1528932198592027</last_hold_time>
      <hold_accum_time>1277224</hold_accum_time>


Leg2) Side put on hold:
    <last_hold_epoch>0</last_hold_epoch>
    <last_hold_uepoch>0</last_hold_uepoch>
    <hold_accum_seconds>0</hold_accum_seconds>
    <hold_accum_usec>0</hold_accum_usec>
    <hold_accum_ms>0</hold_accum_ms>

      <last_hold_time>0</last_hold_time>
      <hold_accum_time>0</hold_accum_time>


I am curious about this.
Wouldn't it be better to have this kind of hold info at the side that was
put on hold?
Was this missed or done on purpose?
I mean, we can with extra processing of hold-record of all Leg1s to resolve
hold history for Leg2 however having this info at the Leg2 itself would be
much simpler (and so I am considering in using the original
CHANNEL_HOLD/CHANNEL_UNHOLD approach).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180614/856ff3ca/attachment-0001.html>


More information about the FreeSWITCH-users mailing list