Patching asterisk on redux 3.0.6

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

Patching asterisk on redux 3.0.6

Postby covarrubiasgg » Sun Nov 14, 2010 3:51 pm

Hi, i have installed a fresh Vicibox Redux 3.0.6.iso. I need to configure a special signaling for my country (MFC/R2) wich is supported by asterisk 1.6.2, but our lovely vicidial have to work with 1.4 so i need to patch asterisk with libopenr2 (http://www.libopenr2.org/) to get it working with that signaling.

I alredy setup the signaling and my E1 is properly configured (tested with libr2 test utils) but asterisk doesnt "know" how to use mfcr2 thats why i have to patch the asterisk sources, i alredy done that, recompile asterisk and make install again, restart vicidial but the patch does not work.

Dont be confused i am not asking help to configure the signaling, i just want to know if there is any special procedure to patch asterisk on vicibox redux.

This are the steps i am doing.

Code: Select all
Cd into the source directory
/usr/src/asterisk-1.4.27.1-vici

Apply the patch
patch -p0 < patch

compile asterisk  again
make

Install patched version of asterisk
make install

restart vicidial (so asterisk too)
/etc/init.d/vicidial restart


Doing the same steps on a Debian from scratch installation it is working. How do i know if the patch work? because when asterisk is patched i can use mfcr2 applications such as
Code: Select all
mfcr2 show channels


And with my current "patched" vicibox i am not able to do it.

Do i have to patch asterisk before the vicidial-install command?


Vicibox3.0.6.iso | Vicidial 2.4-283 | Build 100929-1203 | asterisk: 1.4.27.1-vici | Sangoma A102E | aditional software: libopenr2 | No updates after installation.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Postby williamconley » Sun Nov 14, 2010 4:18 pm

thank you for listing all your specifications (although "no updates" is kinda confusing does that mean you didn't choose OS update during install? :) )

First I would recommend rebooting instead of just restarting vicidial to be SURE asterisk has really been restarted.

If that fails, find out what files are being patched, and visually (use nano) verify that the changes were actually made.

the location of a file on this system may be different or the location of an item within the file may be different causing the patch to fail as the vicidial version of asterisk already has patches applied. This patch may be failing as a result.

So find out what file(s) are being altered (using your other test box that WORKED) and ensure all the changes are also being made in the Vicidial machine.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby covarrubiasgg » Sun Nov 14, 2010 4:40 pm

Hey Will thanks for that quick reply.

Yes by no updates i mean no OS updates.

I actually check the files with nano and the files were patched, but checking the logs, the patch defnie some vars for the libs and include to use during compilation, i changed them to the absolute path and now when i check the logs after compilation there is no error, still not working but i made a mess trying to figured how to get it working, now, i will reinstall to work again with a fresh install and try to do it right this time. :)
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Postby williamconley » Sun Nov 14, 2010 9:18 pm

yep. troubleshooting is fun. and installing LOTS of times makes it work. never fear starting over. :)

also remember that when you are done, should you ever need to build another machine, having a good "solid" install method will be important so you don't have to go through the learning curve again.

be sure to POST your solution (so when you lose it, it'll be here waiting) i mean so others can benefit from your experience! :)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby covarrubiasgg » Mon Nov 15, 2010 2:06 pm

Hey William finally i get it working =)

For future references as you suggested these are the steps i follow up to get it working

Installation scenario:
- Vicibox Redux 3.0.6
- Hardware Sangoma A102E



1) Install vicibox redux as normal
2) Install vicidial using vicidial-install

3) Install libopenr2 (its important to install vicidial before because this libs depends on dahdi)
get the lastest version of libopenr2 form here:
http://code.google.com/p/openr2/downloads/list
a) download it to /usr/src
b) extract it tar xvzf libopenr2.tar.gz
c) cd libopenr2
e) ./configure
f) make
g) make install
h) ldconfig (IMPORTANT if you dont do this, the new installed libraries will not be loaded on the system)

4) Patch asterisk
a) cd /usr/src/asterisk-1.4.21.1-vici
b) wget http://code.google.com/p/openr2/downloa ... h&can=2&q=
c) apply the patch: patch -p0 < openr2-asterisk-1.4.32-p1.patch
d) execute ./bootstrap.sh (EXTREMLY IMPORTANT anything below is going to work if you skip this)
e) ./configure
f) make
g) make install

5) Configure wanrouter (wich has been installed from vicidial-install script)
a) execute wancfg (this will generate /etc/wanpipe/wanpipe1.conf)
b) execute wancfg_dahdi (this will generate a template for /etc/dahdi/system.com and /etc/asterisk/chan_dahdi.con)
c) edit your chan_dahdi.conf and system.conf according to your country. You can find propper documentacion on the docs/asterisk directory in your libopenr2 sources. For my country the file reads like this
;;;;;; Configuration for Mexico ;;;;;;;;;;
; zapata.conf or chan_dahdi.conf in /etc/asterisk
signalling=mfcr2
mfcr2_variant=mx
mfcr2_get_ani_first=no
mfcr2_max_ani=10
mfcr2_max_dnis=4
mfcr2_category=national_subscriber
mfcr2_mfback_timeout=-1
mfcr2_metering_pulse_timeout=-1
; this is for debugging purposes
mfcr2_logdir=log
mfcr2_logging=all
; end debugging configuration
channel => 1-15
channel => 17-31

; /etc/dahdi/system.conf or /etc/zaptel.conf
span=1,1,0,cas,hdb3
cas=1-15:1101
cas=17-31:1101
loadzone=us
defaultzone=us

span=2,1,0,cas,hdb3
cas=32-46:1101
cas=48-62:1101
loadzone=us
defaultzone=us


6) Restart vicidial
/etc/init.d/vicidial restart

If everythings is well configure, after restart you will be able to see something like this on your CLI:
Code: Select all
vicibox*CLI> mfcr2 show channels
Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS   Rx CAS 
   1 MX      10      4        No        No               IDLE     IDLE   
   2 MX      10      4        No        No               IDLE     IDLE   
   3 MX      10      4        No        No               IDLE     IDLE   
   4 MX      10      4        No        No               IDLE     IDLE   
   5 MX      10      4        No        No               IDLE     IDLE   
   6 MX      10      4        No        No               IDLE     IDLE   
   7 MX      10      4        No        No               IDLE     IDLE   
   8 MX      10      4        No        No               IDLE     IDLE   
   9 MX      10      4        No        No               IDLE     IDLE   
  10 MX      10      4        No        No               IDLE     IDLE   
  11 MX      10      4        No        No               IDLE     IDLE   
  12 MX      10      4        No        No               IDLE     IDLE   
  13 MX      10      4        No        No               IDLE     IDLE   
  14 MX      10      4        No        No               IDLE     IDLE   
  15 MX      10      4        No        No               IDLE     IDLE   
  17 MX      10      4        No        No               IDLE     IDLE   
  18 MX      10      4        No        No               IDLE     IDLE   
  19 MX      10      4        No        No               IDLE     IDLE   
  20 MX      10      4        No        No               IDLE     IDLE   
  21 MX      10      4        No        No               IDLE     IDLE   
  22 MX      10      4        No        No               IDLE     IDLE   
  23 MX      10      4        No        No               IDLE     IDLE   
  24 MX      10      4        No        No               IDLE     IDLE   
  25 MX      10      4        No        No               IDLE     IDLE   
  26 MX      10      4        No        No               IDLE     IDLE   
  27 MX      10      4        No        No               IDLE     IDLE   
  28 MX      10      4        No        No               IDLE     IDLE   
  29 MX      10      4        No        No               IDLE     IDLE   
  30 MX      10      4        No        No               IDLE     IDLE   
  31 MX      10      4        No        No               IDLE     IDLE 
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Postby williamconley » Mon Nov 15, 2010 2:22 pm

MX? So this is for Mexico? Good to know ... what telecom are you connecting to that you needed this signalling?

Excellent solution post by the way!
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby covarrubiasgg » Mon Nov 15, 2010 3:54 pm

williamconley wrote:MX? So this is for Mexico? Good to know ... what telecom are you connecting to that you needed this signalling?


This is hard to say since this is not a conventional telecom, this is our client and we are connected with them through serveral E1s with their telephony system (avaya i think).

But here in México (and many countries in latin america) there are serveral carriers using MFC/R2 such as Telmex, Avantel and Axtel.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Postby Kumba » Mon Nov 15, 2010 5:15 pm

I'll put this on the list to include in ViciBox Redux v.3.1. Thanks for the detailed instructions on what makes it work. That makes it all really simple and easy for me to include in future versions of ViciBox Redux.

And just an FYI for everyone else reading this: This is a good example of how you can get your own additions added to ViciBox. If you send me straight-forward steps/commands like this, I can make sure it gets included.
Kumba
 
Posts: 939
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Postby covarrubiasgg » Mon Nov 15, 2010 5:25 pm

Kumba wrote:I'll put this on the list to include in ViciBox Redux v.3.1. Thanks for the detailed instructions on what makes it work. That makes it all really simple and easy for me to include in future versions of ViciBox Redux.

And just an FYI for everyone else reading this: This is a good example of how you can get your own additions added to ViciBox. If you send me straight-forward steps/commands like this, I can make sure it gets included.


Yei ñ_ñ, that would be really nice :).

Cheers!
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 262 guests