Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
wget http://openr2.googlecode.com/files/openr2-1.3.2.tar.gz
tar -xzf openr2-1.3.2.tar.gz
cd openr2-1.3.2.tar.gz

 

  1. Run the 'configure' script and then compile and install the library.

Code Block
./configure --prefix=/usr
make
make install

NOTES* :

  • The --prefix=/usr option will install the library in /usr/lib/, but if you don't specify a “--prefix” option it will be installed in /usr/local/.  We recommend installing with –prefix=/usr.

  • If the configure script does not find the DAHDI headers then it will fail with an error.  Be sure to search for configure errors and install any dependency you might be missing (in general only DAHDI is required). 

  • An error after running make most likely means a bug or that you are compiling in an unsupported platform.

  1. Final steps...

Now that the library is installed you can proceed to install Asterisk. However, you can also test your R2 lines without Asterisk being involved.
For instructions on how to conduct these tests please see the section OpenR2 Test to test without Asterisk. If you are not interested in testing without Asterisk, you can proceed to the next section.

...

Install Asterisk by running the following commands from the the Asterisk source directory.

 

Code Block
./configure
Code Block
 

...
checking for openr2_chan_new in -lopenr2... yes
checking openr2.h usability... yes
checking openr2.h presence... yes
checking for openr2.h... yes
...

Code Block
Code Block
make
make install
make samples (in case of very first install)
Code Block
 

 Now Asterisk should be installed and ready for configuration.

...

Asterisk and OpenR2

Asterisk does not understand R2 signaling by itself, it requires the help of the OpenR2 library to do it. 
You also need to make Asterisk aware of the presence of the OpenR2 library so the proper code inside Asterisk can be compiled to make use of OpenR2.

...

 

Code Block
r2test -c r2test.conf

found category = NATIONAL_SUBSCRIBER
found Log Level = all
found option callfiles=no
found R2 variant = mx
found MAX ANI= 10
found MAX DNIS= 4
found option Get ANI First = no
found option Use DAHDI MF = no
found option MF threshold = 0
found option MF backward timeout = -1
found option meteringpulsetimeout=-1
found option collectcalls=no
found option chargecalls=yes
found option doubleanswer=no
found option immediateaccept=no
found option skipcategory=no
found channel range = 1-15
found channel range = 17-31
found DNID = 4321
found CID = 0987654321
found channel range = 32-46
found channel range = 49-62
channel 1, variant = MX
channel 2, variant = MX
channel 3, variant = MX
channel 5, variant = MX
[41:48:391][CAS TRACE] Channel 1 -- CAS Tx >> [IDLE] 0x08
[41:48:393][CAS TRACE] Channel 1 -- CAS Raw Tx >> 0x09
channel 4, variant = MX
...
...

Code Block

The default behavior after completing a call is to put the audio in an echo-like application where everything said is repeated immediately. 
However, you can also specify the options:

...