Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: invalid literal for int() with base 10: '' #324

Open
SuNounix opened this issue Sep 5, 2024 · 1 comment
Open

ValueError: invalid literal for int() with base 10: '' #324

SuNounix opened this issue Sep 5, 2024 · 1 comment

Comments

@SuNounix
Copy link

SuNounix commented Sep 5, 2024

Odoo 16
Debian 12
clic2dial work like a charm

Hi,

i've following this instruction : https://akretion.com/fr/open-source-contributions/odoo-asterisk-voip-connector

i have an error when i test the script :

# echo \"agi_callerid:0141931242\"| set_name_incoming_timeout.sh
ARGS: ['/usr/local/bin/set_name_agi.py', '--ssl', '--server', 'MY_ODOO_SERVER', '--database', 'db_odoo', '--username', 'MY_USERNAME', '--password', 'MY_PASSWORD']
ENV LINE: "agi_callerid:0141931242"
ENV LINE: 
class AGI: self.env = {'"agi_callerid': '0141931242"'}
Traceback (most recent call last):
  File "/usr/local/bin/set_name_agi.py", line 394, in <module>
    main(args)
  File "/usr/local/binjoin/set_name_agi.py", line 212, in main
    phone_number = agi.env["agi_callerid"]
                   ~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'agi_callerid'

# pip3 list | grep -e 'Odoo' -e 'pyst'
OdooRPC            0.9.0
pyst2              0.5.1

I forgot something ?

Thanks for your help

@SuNounix
Copy link
Author

SuNounix commented Sep 6, 2024

hummm with this :

# echo "agi_callerid:0141931242"| set_name_incoming_timeout.sh

i have this result :

ARGS: ['/usr/local/bin/set_name_agi.py', '--ssl', '--server', 'MY_ODOO_SERVER', '--database', 'db_odoo', '--username', 'MY_USERNAME', '--password', 'MY_PASSWORD']
ENV LINE: agi_callerid:0141931242
ENV LINE: 
class AGI: self.env = {'agi_callerid': '0141931242'}
    COMMAND: VERBOSE "Phone number = 0141931242" 1
VERBOSE "Phone number = 0141931242" 1
    RESULT_LINE: 
Traceback (most recent call last):
  File "/usr/local/bin/set_name_agi.py", line 394, in <module>
    main(args)
  File "/usr/local/bin/set_name_agi.py", line 223, in main
    agi.verbose("Phone number = %s" % phone_number)
  File "/usr/local/lib/python3.11/dist-packages/asterisk/agi.py", line 628, in verbose
    self.execute('VERBOSE', self._quote(message), level)
  File "/usr/local/lib/python3.11/dist-packages/asterisk/agi.py", line 150, in execute
    return self.get_result()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/asterisk/agi.py", line 180, in get_result
    code = int(code)
           ^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

@SuNounix SuNounix changed the title KeyError: 'agi_callerid' ValueError: invalid literal for int() with base 10: '' Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant