<div dir="auto">Hi Brian,<div dir="auto"><br></div><div dir="auto">I am not doing billing. But I need to set session variable in lua script called from api_hangup_hook.</div><div dir="auto"><br></div><div dir="auto">I am able to access the session object and channel variable in lua script but could not set the channel variable from there. </div><div dir="auto"><br></div><div dir="auto">I can see that when CHANNEL_DESTROY comes it does not come with last set value from lua script.</div><div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto">Varun</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 27, 2022, 5:30 PM <<a href="mailto:freeswitch-dev-request@lists.freeswitch.org">freeswitch-dev-request@lists.freeswitch.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send FreeSWITCH-dev mailing list submissions to<br>
<a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank" rel="noreferrer">freeswitch-dev@lists.freeswitch.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" rel="noreferrer noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:freeswitch-dev-request@lists.freeswitch.org" target="_blank" rel="noreferrer">freeswitch-dev-request@lists.freeswitch.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:freeswitch-dev-owner@lists.freeswitch.org" target="_blank" rel="noreferrer">freeswitch-dev-owner@lists.freeswitch.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of FreeSWITCH-dev digest..."<br>
Today's Topics:<br>
<br>
1. Cannot update a Channel Variable inside the api_hangup_hook<br>
lua script (varun pratapsingh)<br>
2. Re: Cannot update a Channel Variable inside the<br>
api_hangup_hook lua script (Brian West)<br>
<br><br><br>---------- Forwarded message ----------<br>From: varun pratapsingh <<a href="mailto:varunps2003@gmail.com" target="_blank" rel="noreferrer">varunps2003@gmail.com</a>><br>To: <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank" rel="noreferrer">freeswitch-dev@lists.freeswitch.org</a><br>Cc: <br>Bcc: <br>Date: Mon, 26 Sep 2022 11:36:56 +0530<br>Subject: [Freeswitch-dev] Cannot update a Channel Variable inside the api_hangup_hook lua script<br><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Hi Freeswitch Experts,<br></div><div dir="ltr"><div><br></div><div>I am using session_in_hangup_hook = true and api_hangup_hook to call my lua script where I want to change the value of my channel variable through session:setVariable("custom_channel_variable", "new_value"). But I can see that I cannot do that. It is not getting changed. I am able to access the channel variables through session:getVariable("custom_channel_variable") but I cannot set them after the call is hung up. </div><div><br></div><div>How can I do that? If I cannot do that then what is the reason? I do not see any reason yet in the Freeswitch documentation.</div><div><br></div><div>Can anyone enlighten me over this?</div><div><br></div><div>Thanks and Regards</div><div>Varun Singh</div></div>
</div></div>
<br><br><br>---------- Forwarded message ----------<br>From: Brian West <<a href="mailto:brian@freeswitch.com" target="_blank" rel="noreferrer">brian@freeswitch.com</a>><br>To: <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank" rel="noreferrer">freeswitch-dev@lists.freeswitch.org</a><br>Cc: <br>Bcc: <br>Date: Mon, 26 Sep 2022 08:56:14 -0500<br>Subject: Re: [Freeswitch-dev] Cannot update a Channel Variable inside the api_hangup_hook lua script<br><div dir="ltr">Are you doing billing?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 26, 2022 at 8:48 AM varun pratapsingh <<a href="mailto:varunps2003@gmail.com" target="_blank" rel="noreferrer">varunps2003@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Hi Freeswitch Experts,<br></div><div dir="ltr"><div><br></div><div>I am using session_in_hangup_hook = true and api_hangup_hook to call my lua script where I want to change the value of my channel variable through session:setVariable("custom_channel_variable", "new_value"). But I can see that I cannot do that. It is not getting changed. I am able to access the channel variables through session:getVariable("custom_channel_variable") but I cannot set them after the call is hung up. </div><div><br></div><div>How can I do that? If I cannot do that then what is the reason? I do not see any reason yet in the Freeswitch documentation.</div><div><br></div><div>Can anyone enlighten me over this?</div><div><br></div><div>Thanks and Regards</div><div>Varun Singh</div></div>
</div></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer 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 noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank" rel="noreferrer">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank" rel="noreferrer">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" rel="noreferrer noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" rel="noreferrer noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="https://freeswitch.com" rel="noreferrer noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><font color="#000000"><br></font></div><div style="font-size:12.8px"><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Brian West | Co-founder and Developer</font></span></p><p style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Need Commercial support? email <a href="mailto:sales@freeswitch.com" target="_blank" rel="noreferrer">sales@freeswitch.com</a> </font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">FreeSWITCH Solutions | <a href="https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g" style="color:rgb(17,85,204)" target="_blank" rel="noreferrer">17345 Civic Drive #2531 Brookfield, WI 53045</a></font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><font color="#000000"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Email: </span><span style="color:rgb(17,85,204);font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:brian@freeswitch.com" target="_blank" rel="noreferrer">brian@freeswitch.com</a></span></font></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font color="#000000">Mobile: <span title="Call with Google Voice">918-424-9378</span></font></span></p><p dir="ltr" style="font-size:12.8px;line-height:1.38;margin-top:0pt;margin-bottom:0pt;margin-left:4.5pt"><font color="#000000"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Website: </span><a href="https://www.freeswitch.com/" style="color:rgb(17,85,204)" target="_blank" rel="noreferrer"><span style="font-size:8pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">https://www.FreeSWITCH.com</span></a></font></p><p dir="ltr" style="font-size:12.8px;line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"><a href="https://www.facebook.com/freeswitch" target="_blank" rel="noreferrer"><img alt="https://www.facebook.com/signalwireinc?src=email" src="https://lh6.googleusercontent.com/AYfRoSNaDNtMPRMevPn_GqcVEMd5NDRFi0GlluGUWzV6I5TAY_3T2-Tt0IuIXeUtEdYsgNsM8DOYKRKhjmrG_-n2Ga-LCnoNk46sO8VyEma1sBFYdiGJcLRUvkrD1CYHN79qimeg" width="31" height="31" style="border:none"></a> </span><span style="background-color:transparent;font-size:9pt;font-family:Tahoma;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap"><a href="https://twitter.com/freeswitch" target="_blank" rel="noreferrer"><img alt="https://twitter.com/freeswitch" src="https://lh3.googleusercontent.com/W4SqXyybH2qdAozvtoKjcz736qOjk9LHDwldvs1ahc-WVU0putVMSsUH474KDrJ32jsqi6JDjyUWxqeEkN5I1xSlC5ShYrd1b8NIMUkDzDrtbWQfa6A_90UcygqesBtRLgeFirKa" width="31" height="31" style="border:none"></a></span><br></p></div></div></div></div></div></div></div></div></div></div></div></div></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer 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 noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank" rel="noreferrer">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank" rel="noreferrer">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" rel="noreferrer noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" rel="noreferrer noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="https://freeswitch.com" rel="noreferrer noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>