<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'm probably going to push towards cdr, but what are you trying to actually do with that info?<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 12, 2016, at 2:39 PM, Joel Serrano &lt;<a href="mailto:joel@gogii.net" class="">joel@gogii.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Michael,&nbsp;<div class=""><br class=""></div><div class="">I want to call an API basically with the following info:</div><div class=""><br class=""></div><div class="">sip_from_uri</div><div class="">destination_number</div><div class="">billsec</div><div class=""><br class=""></div><div class="">I found away using "api_hangup_hook=lua script.lua" + "session_in_hangup_hook=true", but, I don't like it... I would prefer using curl from within the dialplan.<br class=""></div><div class=""><br class=""></div><div class="">Can you give me your suggestion? I have also asked in IRC and using the CDRs looks like the best way to go, so we will probably follow that, but I would still like to now if it is possible and how.</div><div class=""><br class=""></div><div class="">Thanks!</div><div class="">Joel.</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Apr 12, 2016 at 12:22 PM, Michael Jerris <span dir="ltr" class="">&lt;<a href="mailto:mike@jerris.com" target="_blank" class="">mike@jerris.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Billsec is set in reporting state, after you are out of dial plan. &nbsp; What are you trying to do based on that, I can suggest a few approaches<div class="HOEnZb"><div class="h5"><span class=""></span><br class=""><br class="">On Monday, April 11, 2016, Joel Serrano &lt;<a href="mailto:joel@gogii.net" target="_blank" class="">joel@gogii.net</a>&gt; wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi,&nbsp;<div class=""><br class=""></div><div class="">Is it possible to access ${billsec} in the dialplan after the bridge application (having hangup_after_bridge=false)??</div><div class=""><br class=""></div><div class="">I want to log the billsec but currently it is always empty.</div><div class=""><br class=""></div><div class="">I have a workaround in a test server using api_hangup_hook to call a lua script with session_in_hangup_hook=true, and inside the lua script I can access the billsec variable and thus write it to the logs.</div><div class=""><br class=""></div><div class="">Is there no way to do this within the XML dialplan?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">Best regards,&nbsp;</div><div class="">Joel.</div><div class=""><br class=""></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>