Skip to Content
Menu
This question has been flagged
2 Replies
2303 Views

Hi fellow Odooers 

i wanted to add a 3 digit phone number as a internal phone number of an employee in our company but , I can successfully add it too ,

but when I press dial 

I confronted with the following error

Error:
Odoo Server Error

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 648, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3.6/site-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 341, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 334, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 929, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3.6/site-packages/odoo/http.py", line 514, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3.6/site-packages/odoo/addons/base_phone/controllers/main.py", line 14, in click2dial
click2dial_id=click2dial_id).click2dial(phone_number)
File "/usr/lib/python3.6/site-packages/odoo/addons/asterisk_click2dial/models/phone_common.py", line 23, in click2dial
ast_number = self.convert_to_dial_number(erp_number)
File "/usr/lib/python3.6/site-packages/odoo/addons/base_phone/models/phone_common.py", line 140, in convert_to_dial_number
parsed_num = phonenumbers.parse(erp_number, None)
File "/usr/local/lib/python3.6/site-packages/phonenumbers/phonenumberutil.py", line 2850, in parse
"Missing or invalid default region.")
phonenumbers.phonenumberutil.NumberParseException: (0) Missing or invalid default region.



does someone know how can I reformat and validate phonenumbers to work with these 3 digit phone numbers?

Avatar
Discard
Best Answer

Hi!

You must set country for partner in order to use phonenumbers formatting.

Also you can check this module - https://apps.odoo.com/apps/modules/14.0/asterisk_common/

It has extension field that can be entered automatically (but it requires some Asterisk configuration in order to send DTMF digits after connect but it is described there).

Avatar
Discard
Author Best Answer

You have to add the country code at the beginning of the 3 digit phone number , like +97201

Avatar
Discard
Related Posts Replies Views Activity
3
Dec 23
5636
1
Sep 21
2886
0
Aug 24
137
1
Sep 24
3454
4
Jun 19
9374