Closed CraftedCat closed 4 years ago
You can use channel variables for that:
or originate {my_arg=my_value}user/1000 &socket(...)
You'll have access to my_arg at your python code.
via sys.argv not accessable...
Not in sys module, look at the channel variables.
i set channel vars api originate {userid=userid, ignore_early_media=true... how to print userid? in esl socket?
help, please :(
print(self.sessiondata.get('variable userid'))
File "out_esl.py", line 50, in safe_run print(self.sessiondata.get('variable userid')) AttributeError: 'MyApplication' object has no attribute 'session_data'
Can you share your code? A gist would be sufficient.
right code: print(self.session.session_data.get('variable_userid')) Thank you
How to send some args to socket? i used mod_commands, and use originate &(socket) via API