<div dir="ltr">Hello,<div><br></div><div>So I'm receiving an INVITE that i'm simply use to generate an origination, something like:</div><div><br></div><div><font face="monospace"><extension name="in_out_test"><br>    <condition field="destination_number" expression="^(whatever)$"><br>            <action application="log" data="ERR Starting lua script..."/><br>            <action application="info" data=""/><br>            <action application="set" data="hangup_after_bridge=true"/><br>            <action application="python" data="foo-outbound"/><br>    </condition><br></extension></font><br></div><div><br></div><div>With that in a python script in which i need to set a hangup_hook (I need the originated variables like billsec, etc) like this:</div><div><br></div><div><font face="monospace"># Some headers data gathering, then:</font></div><div><font face="monospace">session.execute( "set", "session_in_hangup_hook=true" )</font></div><div><font face="monospace">session.execute( "export", "nolocal:api_hangup_hook=python cdr" )<br>call_command = '{cldnum=' + CallStruct['to'] + \<br>    ',ignore_early_media=true,audio1=' + CallStruct['audios'] + \<br>    ',app_campaing_type=' + CallStruct['type'] + \<br>    ',originate_retries=' + CallStruct['retry'] + \<br>    ',app_phone_desc=' + CallStruct['phone_desc'] + \<br>    ',app_gateway=' + CallStruct['gateway'] + \<br>    ',originate_timeout=30' + \<br>    ',app_from=' + CallStruct['to'] + \<br>    ',app_to=' + CallStruct['from'] + \<br>    ',origination_callee_id_number=' + CallStruct['to'] + \<br>    ',origination_caller_id_number=' + CallStruct['from'] + \<br>    '}sofia/gateway/' + CallStruct['gateway'] + '/' + CallStruct['to'] + ' 9999 XML public'</font><br></div><div><br></div><div>But this doesn't seem to be doing anything..</div><div><br></div><div>Anyone ever done this before?</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div></div></div>