TIPS Viva WAZO: A New Beginning

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Hello, i did a very simple example with our python API. https://gist.github.com/sboily/fdcd1f1922a62b443677fb2cb097f200
It's not really a good code, but it's a script to show you how you can do it easily with XiVO.

I assume we need a Web Services Account with ACLs for this to work. I get as far as user being created but not extension or line. See below for permission errors. Could you document which ACLs are required in the web services account?? Do we just need the name and password of the Web Services Account imbedded in the add-user.py script?

Code:
# ./add-user.py Nerd Tres 703
Traceback (most recent call last):
  File "./add-user.py", line 106, in <module>
    associate_user(data)
  File "./add-user.py", line 61, in associate_user
    confd.users.relations(data['uuid']).add_line(data['id_line'])
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/util.py", line 35, in wrapper
    return func(self, resource_id)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/commands/users.py", line 45, in add_line
    return self.user_line.associate(self.user_id, line_id)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/relations.py", line 28, in associate
    response = self.session.post(url, body)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/session.py", line 70, in post
    self.check_response(response, check_response)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/session.py", line 47, in check_response
    response.raise_for_status()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 825, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: UNAUTHORIZED
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
No you need to add the properly ACL. To be simple add confd.#.

Tried that first and got:
Code:
# ./add-user.py Nerd Quattro 704
There is an error to create extension : 401 Client Error: UNAUTHORIZED
There is an error to create endpoint SIP : 401 Client Error: UNAUTHORIZED

For username and password in add-user-py, I used the web services Login name and Password.

RESULT: User account is created, but Lines is empty with no extension or Line created.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Also tried using xivo-ctid-ng account, and that got me a little further with a User and Line, but still no Phone Number.

Code:
# ./add-user.py Nerd Six 706
Traceback (most recent call last):
  File "./add-user.py", line 106, in <module>
    associate_user(data)
  File "./add-user.py", line 62, in associate_user
    confd.extensions.relations(data['id_exten']).add_line(data['id_line'])
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/util.py", line 35, in wrapper
    return func(self, resource_id)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/commands/extensions.py", line 31, in add_line
    return self.line_extension_relation.associate(line_id, self.extension_id)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/relations.py", line 95, in associate
    response = self.session.post(url, body)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/session.py", line 70, in post
    self.check_response(response, check_response)
  File "/usr/lib/python2.7/dist-packages/xivo_confd_client/session.py", line 47, in check_response
    response.raise_for_status()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 825, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: UNAUTHORIZED
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
You need to create a web service user like ward/ward with acl confd.#

Is there a special firewall port that needs to be open perhaps??

Issued this command:
Code:
# ./add-user.py Nerd Seven 707
There is an error to create endpoint SIP : 401 Client Error: UNAUTHORIZED

With this web service user: ward pw: ward and ACL confd.#

Results:

User created: as shown below
No Line created.
707 is in the authorized range: 701 - 799

Ck5Ml8uUoAA9J_p.jpg


Ck5MvIGUUAApHOp.jpg
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Hum, is it long to create this user ? Maybe the timeout i set is to short for you. I set 10 seconds by default. What's your version ? I changed the script to extend the life duration of the token. Can you retry ?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Hum, is it long to create this user ? Maybe the timeout i set is to short for you. I set 10 seconds by default. What's your version ? I changed the script to extend the life duration of the token. Can you retry ?

Thanks, Sylvain. That was definitely the problem. It's working for me now but, even on this very fast Cloud-based server, it's taking about 25 seconds to create the average account. Out of six tries, one still failed. To be on the safe side, I think the token duration probably should be bumped up a bit more.

Looks like we could grep for id_endpoint_sip to make sure the user account was successfully created. Very nice.

Now, if we had a way to do something similar for trunks and outgoing routes and incoming calls, we'd have a turnkey platform. :hat:
 
Last edited:

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
It's very strange you need 25 secondes ... :( I developed this script with my xivo home on virtualbox, and the hard disk is sooooooooooooooo slow but 10 secondes is correct.
Ok for outgoing and trunk, you need to wait because there is no REST API for the moment ... We working on it ! But yes we need it :)
Please note i'm using our python client, but you can do exactly the same with another languages like php, js, go etc ... Check http://api.xivo.io to get the API. I did a small example on JS. Only a proof of concept for playing ;) : https://github.com/sboily/xivo-js
 
Joined
May 16, 2011
Messages
94
Reaction score
0
I have tried the install more than a dozen times only to get hung up with Validate button on the initial web access. I get this:
POST /wizard - Unexpected error: sysconfd error: status 415 -
Error response

Error code 415.

Message:

invalid arguments for command
.
Error code explanation: 415 = Entity body in unsupported format..

I followed both tutorials (original and newer without wizard.py) and still get the error. Installing on VMWare ESXi 5.5 fully patched. Any ideas?
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Hello gg3, please open a thread on our forum for help or coming on irc (freenode #xivo). It's not normal ... There is not reason you can't install XiVO. We need logs to help you.
 
Joined
May 16, 2011
Messages
94
Reaction score
0
Hello gg3, please open a thread on our forum for help or coming on irc (freenode #xivo). It's not normal ... There is not reason you can't install XiVO. We need logs to help you.

I posted it in the Help forum as requested. Can you reply Sylvain with the logs you need
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Telephone Reminders for XiVO

reminder.gif


I think we're ready for the Pioneers.

To install Telephone Reminders, issue the following commands after logging into your XiVO server as root.

To schedule a reminder, dial 123 from any XiVO phone.

Code:
cd /root
wget http://incrediblepbx.com/reminders-xivo.tar.gz
tar zxvf reminders-xivo.tar.gz
./reminders-xivo.sh

Today on Nerd Vittles...

As Easy As 1-2-3: Introducing Incredible PBX Telephone Reminders for XiVO
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
XiVO Star Codes Cheat Sheet

Here's a handy reference to all of the XiVO Star Codes (PDF-formatted file also attached)

Cle7o1aWIAAcZno.jpg
 

Attachments

  • XiVO-Star-Codes.pdf
    244.2 KB · Views: 5
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Maiden Voyage: Incredible PBX 13 Installer for XiVO

15 minute install looks pretty good. Note the new Asterisk and XiVO versions.

New version numbering so we can document changes in ChangeLog as we move forward:

ClgTDSGWkAEqAzH.jpg


Should be ready for the Pioneers shortly...

ClgOGddWAAAIAa5.jpg
 
Last edited:

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Hello,

i updated my asteridex4 version for xivo 16.08, now we don't need to configure a web service user to do a call. We have new API to make call with a simple user. I released the 0.1.6, but you need xivo 16.08-dev or waiting the release will be coming the next monday (jun, 27).

To download : https://github.com/sboily/asteridex4/releases
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
Maiden Voyage: Incredible PBX 13 Installer for XiVO

15 minute install looks pretty good. Note the new Asterisk and XiVO versions.

New version numbering so we can document changes in ChangeLog as we move forward:

ClgTDSGWkAEqAzH.jpg


Should be ready for the Pioneers shortly...

ClgOGddWAAAIAa5.jpg


Ward, rabbitmq is another important service on xivo ;-)
Your panel is really nice.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Incredible PBX DialPlan Cheat Sheet

Here's a handy reference to all of the Incredible PBX DialPlan numbers with XiVO (PDF-formatted file also attached)
ClkdpZVWkAALK2i.jpg
 

Attachments

  • IncrediblePBX.numbers.pdf
    244.1 KB · Views: 7
Last edited:

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,849
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top