<div><div dir="auto">Hi Marruzelli,</div></div><div dir="auto">I am doing exactly same for live calls stats, and those are working good. Its only issue when i do that on transfer calls.</div><div dir="auto">Its not even 10CPS calls.</div><div dir="auto"><br></div><div dir="auto"><br></div><div><div dir="auto">Regards</div><div dir="auto">Abbasi</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 1 Jan 2020 at 8:24 PM, Giovanni Maruzzelli <<a href="mailto:gmaruzz@gmail.com">gmaruzz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>you have probably race conditions <br></div><div><br></div><div>eg, more than one call modify same counter</div><div><br></div><div>maybe you want to keep a uniqe counter for each callid, and then sum them up ?</div><div><br></div><div>just first thoughts, maybe completely wrong</div><div><br></div><div><br></div><br></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 1, 2020 at 3:17 PM Bilal Abbasi <<a href="mailto:bilaln018@gmail.com" target="_blank">bilaln018@gmail.com</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Users,<br><div>I have a switch where people are calling and they press 1 to get transferred to client's DID.</div><div>I need to have stats for live total calls on my switch along with calls that are transferred(realtime stats).</div><div>I am doing following commands to get the live total calls.(basically increasing variable ${CampaignId}_live on getting call and on hangup i decrement that variable).</div><div><font color="#ff0000"><action application="set" data="ignore=${memcache(increment ${CampaignId}_live 1)}"/><br><action application="set" data="api_hangup_hook=memcache decrement ${CampaignId}_live 1"/></font><br></div><div><br></div><div>I am doing this while i transfer the calls to client's number(basically increasing variable ${CampaignId}_transfer on when somebody presses transfer button and on hangup i decrement that variable).</div><div><font color="#ff0000"><action application="bridge" data="{api_hangup_hook='memcache decrement ${CampaignId}_transfer 1 both',ignore='${memcache(increment ${CampaignId}_transfer 1)}'transfer_trigger=1}sofia/external/${TransferTo}"/></font><br></div><div><font color="#ff0000"><br></font></div><div><font color="#000000">Now i have live calls stats coming correctly.</font></div><div><font color="#000000">But in case of transfer calls, when i have low number of calls(like 3-4 calls) it works good, but when i have 50-60 calls the stats are not presented correctly(it does not increase/decrease memcache variable).</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Can someone guide me how to do this in a better way?, or what mistake i am making in doing it.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Regards</font></div><div><font color="#000000">Abbasi</font></div></div></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr">Sincerely,<br><br>Giovanni Maruzzelli<br>OpenTelecom.IT<br>cell: +39 347 266 56 18<br><br></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div></div>