TIPS Viva WAZO: A New Beginning

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Just an FYI that we're now getting serious about XiVO so we've inserted the appropriate GPL3 licenses in all of the dialplan code. In addition, we've added a LICENSE.conf file in /etc/asterisk/extensions_extra.d. It can be reviewed in the XiVO GUI as well in the Configuration Files section. If you haven't updated your config files, please do so at your earliest convenience to take advantage of all the new additions. The commands are shown in the preceding post. More to come!
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
XiVO Trunks Tutorial: Installing an Anveo Direct Outbound Trunk

CkIqa9kWEAAgr_Z.jpg
 
Last edited:

wardmundy

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

Here is the code required to implement the AsteriDex SpeedDialers using the SQLite3 version of AsteriDex and 00-prefix dialing. Major improvements have been made in the AsteriDex setup so reinstall it first from the previous tutorial here. Asteridex is available from your browser at: http://xivo-server-ip/asteridex4/.

1. In XiVO, add the following dialplan code to the end of Configuration Files:xivo-extrafeatures.conf:
Code:
;# // BEGIN AsteriDex SpeedDialer
exten => 223,1,Answer
exten => 223,n,Wait(2)
exten => 223,n,Festival("Please enter the 3 digit astra dex dial code.")
exten => 223,n,Read(DIALCODE,beep,3)
exten => 223,n,NoOp(DIALCODE: ${DIALCODE})
exten => 223,n,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => 223,n,GotoIf($["${USERDATA},foo" = ",foo"]?notfound)
exten => 223,n,Set(USER=${CUT(USERDATA,\,,1)})
exten => 223,n,Set(PHONE=${CUT(USERDATA,\,,2)})
exten => 223,n(theanswer),Festival("Here is the number for ${USER}: ${PHONE}:  :To place the call: press 1. To repeat the information: press 2.")
exten => 223,n,NoOp(Entry: ${USER} - ${PHONE})
exten => 223,n,Read(REPEAT,beep,1)
exten => 223,n,GotoIf($["${REPEAT}" = "2"]?theanswer)
exten => 223,n,GotoIf($["${REPEAT}" = "1"]?dialit)
exten => 223,n,Festival("Have a nice day. Good bye.")
exten => 223,n,Hangup
exten => 223,n(notfound),Festival("No matching entry on file. Good bye.")
exten => 223,n,Hangup
exten => 223,n(dialit),Festival("Calling ${USER}: One moment please.")
exten => 223,n,Dial(Local/${PHONE}@default)
exten => 223,n,Hangup

exten => _00.,1,NoOp(Outgoing call)
exten => _00.,n,NoOp(SpeedDial: ${EXTEN})
exten => _00.,n,Set(DIALCODE=${EXTEN:2}
exten => _00.,n,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => _00.,n,GotoIf($["${USERDATA},foo" = ",foo"]?notfound:dialit)
exten => _00.,n(dialit),Set(USER=${CUT(USERDATA,\,,1)})
exten => _00.,n,Set(PHONE=${CUT(USERDATA,\,,2)})
exten => _00.,n,NoOp(Calling ${USER} at ${PHONE}...)
exten => _00.,n,Festival("Calling ${USER} at ${PHONE}: One moment please.")
exten => _00.,n,Dial(Local/${PHONE}@default)
exten => _00.,n,Hangup
exten => _00.,n(notfound),Festival("No matching entry on file. Good bye.")
exten => _00.,n,Hangup
;# // END AsteriDex SpeedDialer

2. Be sure the following code is added to /etc/odbcinst.ini if it is not already there:
Code:
[SQLITE3]
Description=SQLite3 ODBC Driver
Driver=/usr/lib/odbc/libsqlite3odbc.so
Setup=/usr/lib/odbc/libsqlite3odbc.so
Threading=2
UsageCount=1

3. Be sure the following code is added to /etc/odbc.ini if it is not already there:
Code:
[SQLITE3-asteridex]
Description=SQLite3 asteridex database
Driver=SQLITE3
Database=/var/lib/asterisk/agi-bin/asteridex.sqlite

4. Be sure the following code is added to /etc/asterisk/res_odbc.conf if it is not already there:
Code:
[SQLITE3-asteridex]
enabled => yes
dsn => SQLITE3-asteridex
preconnect => yes

5. Be sure the following code is added to /etc/asterisk/func_odbc.conf if it is not already there:
Code:
[ASTERIDEX]
dsn=SQLITE3-asteridex
read=SELECT name, out FROM user1 WHERE dialcode='${SQL_ESC(${ARG1})}'

6. Activate the following modules in /etc/asterisk/modules.conf by issuing these commands:
Code:
sed -i 's|noload => cdr_adaptive_odbc.so|;noload => cdr_adaptive_odbc.so|' /etc/asterisk/modules.conf
sed -i 's|noload => cdr_odbc.so|;noload => cdr_odbc.so|' /etc/asterisk/modules.conf
sed -i 's|noload => func_odbc.so|;noload => func_odbc.so|' /etc/asterisk/modules.conf
/etc/init.d/asterisk restart

7. Try things out by dialing 223 from a phone on your PBX. Enter 335 (DEL) which is the 3-digit Speed Dial Code for Delta Airlines.

8. To use 00-prefix SpeedDialing, dial 00 + Speed Dial Code, e.g. 00335.
 
Last edited:

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
AsteriDex SpeedDialer for XiVO

Here is the code required to implement the AsteriDex SpeedDialer using the SQLite3 version of AsteriDex. Major improvements have been made in the AsteriDex setup so reinstall it first from the previous tutorial here. Asteridex is available from your browser at: http://xivo-server-ip/asteridex4/.

1. In XiVO, add the following dialplan code to the end of Configuration Files:xivo-extrafeatures.conf:
Code:
;# // BEGIN AsteriDex SpeedDialer
exten => 223,1,Answer
exten => 223,n,Wait(2)
exten => 223,n,Festival("Please enter the 3 digit astra dex dial code.")
exten => 223,n,Read(DIALCODE,beep,3)
exten => 223,n,NoOp(DIALCODE: ${DIALCODE})
exten => 223,n,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => 223,n,GotoIf($["${USERDATA},foo" = ",foo"]?notfound)
exten => 223,n,Set(USER=${CUT(USERDATA,\,,1)})
exten => 223,n,Set(PHONE=${CUT(USERDATA,\,,2)})
exten => 223,n(theanswer),Festival("Here is the number for ${USER}: ${PHONE}:  :To place the call: press 1. To repeat the information: press 2.")
exten => 223,n,NoOp(Entry: ${USER} - ${PHONE})
exten => 223,n,Read(REPEAT,beep,1)
exten => 223,n,GotoIf($["${REPEAT}" = "2"]?theanswer)
exten => 223,n,GotoIf($["${REPEAT}" = "1"]?dialit)
exten => 223,n,Festival("Have a nice day. Good bye.")
exten => 223,n,Hangup
exten => 223,n(notfound),Festival("No matching entry on file. Good bye.")
exten => 223,n,Hangup
exten => 223,n(dialit),Festival("Calling ${USER}: One moment please.")
exten => 223,n,Dial(Local/${PHONE}@default)
exten => 223,n,Hangup
;# // END AsteriDex SpeedDialer

2. Be sure the following code is added to /etc/odbcinst.ini if it is not already there:
Code:
[SQLITE3]
Description=SQLite3 ODBC Driver
Driver=/usr/lib/odbc/libsqlite3odbc.so
Setup=/usr/lib/odbc/libsqlite3odbc.so
Threading=2
UsageCount=1

3. Be sure the following code is added to /etc/odbc.ini if it is not already there:
Code:
[SQLITE3-asteridex]
Description=SQLite3 asteridex database
Driver=SQLITE3
Database=/var/lib/asterisk/agi-bin/asteridex.sqlite

4. Be sure the following code is added to /etc/asterisk/res_odbc.conf if it is not already there:
Code:
[SQLITE3-asteridex]
enabled => yes
dsn => SQLITE3-asteridex
preconnect => yes

5. Be sure the following code is added to /etc/asterisk/func_odbc.conf if it is not already there:
Code:
[ASTERIDEX]
dsn=SQLITE3-asteridex
read=SELECT name, out FROM user1 WHERE dialcode='${SQL_ESC(${ARG1})}'

6. Activate the following modules in /etc/asterisk/modules.conf by issuing these commands:
Code:
sed -i 's|noload => cdr_adaptive_odbc.so|;noload => cdr_adaptive_odbc.so|' /etc/asterisk/modules.conf
sed -i 's|noload => cdr_odbc.so|;noload => cdr_odbc.so|' /etc/asterisk/modules.conf
sed -i 's|noload => func_odbc.so|;noload => func_odbc.so|' /etc/asterisk/modules.conf
/etc/init.d/asterisk restart

7. Try things out by dialing 223 from a phone on your PBX. Enter 335 (DEL) which is the 3-digit Speed Dial Code for Delta Airlines.


Hello Ward,

If you use ODBC, why did you not using postgres ? There is already an ODBC connection for Postgres by default on XiVO.

Sylvain
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
We had already rebuilt AsteriDex in SQLite3, and I really wanted to keep our additions separate from the XiVO primary database... in case we do something stupid along the way. :aureola:
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
We had already rebuilt AsteriDex in SQLite3, and I really wanted to keep our additions separate from the XiVO primary database... in case we do something stupid along the way. :aureola:

ok, i understand, but you can use a specific database for asteridex4 in postgres and it's separated from xivo.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
@arztde your blog articles are basically directly pulled from Nerdvittles - http://tocan.de/en/blog/2016/06/04/...oice-account-to-install-the-gateway-Simonics/

Probably Ward should have more to say about this, but these English to German to English translations are not good. (Besides the copyright infringement.) I recommend posting the link to Nerdvittles instead of the retranslation.

(Why do I care? You are referencing my service and the mistranslated English is confusing.)
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Do yourself a favour. Click near the flags. On the Edit translation box. There will appear little green, yellow and in some cases a red box.And if you click on them you can without registrätion correct ANY mistranslation including grammar.

I think you should exclude the original English language article from your "experiment" and post it verbatim (with source credits) if Ward has permitted you to do so. There is no need to fix translation errors in the English because the original English version is readily available.

In a lot of countries Paypal is forbidden Turkey also now. or Paypal do not work either credit cards. They do not have any chance to pay yours service. And i have to think for solutions there too.

Coincidentally, most of the fraudulent transactions I get are from that region extending eastward. So, frankly, I am ok with the PayPal restrictions.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
We've finished 00-Prefix Speed Dialing for AsteriDex. If you've already installed the original Speed Dialing code, just cut-and-paste the amended dialplan code into your setup. If you're just getting started, just follow the amended AsteriDex Speed Dialing tutorial here. To use this, dial 00 + the Speed Dial Code from AsteriDex.
 

hecatae

resident hecatae
Joined
Feb 7, 2014
Messages
769
Reaction score
202
anyone up to building a client that talks to the xivo api and does all this heavy lifting for you?

it could even sit on the box and talk to localhost ./add-user hecatae sip 702 etc ./add-trunk freevoipdeal etc
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
There is also an api to import mass users with CVS.

Code:
#Mass import users using CSV data
csvdata = """firstname,lastname
John,Smith
"""

c.users.import_csv(csvdata, encoding='utf-8', timeout=300)
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
SpeedDial Code Generator for AsteriDex (SQLite3 version)

Attached is the first release of the SpeedDial Code Generator for XiVO. Untar the attached dialcode.tar.gz file into /var/www/html/asteridex4 directory. Then run dialcode.php from either your browser (http://ipaddr/asteridex4/dialcode.php) or from the CLI (php dialcode.php). The script will generate 3-digit dialcodes for every entry in your AsteriDex database. These codes will match the first three letters of each AsteriDex name with the corresponding keys on a touchtone phone. Remove the dialcode.php app from /var/www/html/asteridex4 once you have generated the SpeedDial codes (mv /var/www/html/asteridex4/speeddial.php /root).

Once the dialcodes have been generated, you can use either of the Speed Dialers for AsteriDex. Dial 223 and enter the 3-digit dialcode when prompted. Or dial 00 + 3-digit speeddial code.
 

Attachments

  • dialcode.tar.gz
    1.3 KB · Views: 6

Jose Casares

Member
Joined
Mar 21, 2016
Messages
37
Reaction score
2
Hi guys. I started to build a Xivo PBX using an ImpactVPS upon logging on to the web GUI I got to the part where I had to enter a domain name and hostname under the interface VoIP section I am not able to select a Default Gateway therefore I can't proceed further. Any ideas?
 

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