Welcome! Log In Create A New Profile

Advanced

Installing Asterisk

Posted by lewy1 
Installing Asterisk
February 15, 2012 03:58PM
I'm trying to install Asterisk based on twinclouds guide here. In the guide he mentions the following

After opening utils.c do the following:
(1) Under the line:

#include asterisk/config.h
add the following line:

#define __arm__ 1

(2) Search for "__sparc__" and replace the line "#ifdef __sparc__" with:

#if defined(__sparc__) || defined(__arm__)
for two instances.

With regard to adding #define __arm__ 1 should I also add the # at the beginning? I thought it usualy means it's a comment.
Regarding the search for _sparc_ I can't find that anywhere in my utils.c under asterisk 1.8.9.2. The utils.c is attached below.
Any help would be appreciated.
Thanks

P.S. @twinclouds, if you read this your post there lists apache as a asterisk dependency, you might want to delete it when in reality it's not needed as mentioned in another post somewhere on these forums.



Edited 2 time(s). Last edit at 02/15/2012 08:07PM by lewy1.
Attachments:
open | download - utils.c (56.7 KB)
Re: Installing Asterisk
February 15, 2012 08:20PM
Did you read the thread always to the end? You don't need to modify utils.c anymore.
Re: Installing Asterisk
February 15, 2012 08:51PM
Thanks. Sorry about that, I read the whole thread a long time ago and now just went to the first post.
Re: Installing Asterisk
February 16, 2012 09:25AM
OK, I got a new problem now. After running ./configure and selecting the modules I started compiling by running "make". I'm getting this error

Error: unknown architecture `arm'

Error: unrecognized option -march=arm
src/add.c:1: error: bad value (arm) for -march= switch
make[2]: *** [src/add.o] Error 1
make[1]: *** [gsm/lib/libgsm.a] Error 2
make: *** [codecs] Error 2

A similar error is reported here.
I can't get it to work. (I'm on a POGO-E02).

On another note if someone has experience setting up freepbx with nginx I would appreciate some help since I can't find any guides explaining how to set it up.

Thanks
Re: Installing Asterisk
February 16, 2012 10:33AM
Did you do step 6?
6. Set proper compilation for ARM platform:
Code:
# vi makeopts.in
After opening the file, search for "PROC=" and change the line to be:
Code:
PROC=arm
Re: Installing Asterisk
February 16, 2012 11:22AM
Sure. I tried it both with arm and arm5tel.
Re: Installing Asterisk
February 17, 2012 11:01AM
@lewy1, funtoy1001:
I haven't tried it for a long time so I even didn't know there's no need to modify utils.c anymore. Thanks for pointing out.
Many of the packages in the dependency may not be needed. Besides apache, there're probably more. I just put a sufficient set, not necessary set. If you can put of a minumal necesary set. It will be great.
I will try to recompile once to see any changes will be needed, when get chance.
Re: Installing Asterisk
February 17, 2012 12:19PM
@twinclouds
Thanks. I'm still hoping for some help regarding the error I encountered when running the "make" command as posted above in post # 4.
Re: Installing Asterisk
February 17, 2012 03:50PM
I can't suggest a solution to lewy1, or even suggest anything to try, but I did build asterisk-1.8.9.2 earlier this week from source on a Pogo E02 without any problems, so I can attest that it is doable. I did not have to make any changes to utils.c. I also checked and found that the mod to channels/chan_gralk.c to pick up both "redirect" and "sta:redirect" had also been incorporated into the latest code. All I did was modify makeopts.in to sqawk "PROC=arm". (Not sure even that was necessary any more, but figured it wouldn't hurt.) I then ran ./configure, make menuconfig, make, and make install, copied the applicable config files from my prior invocation, and found it works fine.

I don't know what lewy1 is doing wrong. I can't even say if it is a configuration problem with asterisk, or with his tool chain, but I've been using the 1.8.9.2 asterisk for the past several days with Google Voice and it works fine.
Re: Installing Asterisk
February 17, 2012 04:24PM
restamp Wrote:
-------------------------------------------------------
> I can't suggest a solution to lewy1, or even
> suggest anything to try, but I did build
> asterisk-1.8.9.2 earlier this week from source on
> a Pogo E02 without any problems, so I can attest
> that it is doable. I did not have to make any
> changes to utils.c. I also checked and
> found that the mod to channels/chan_gralk.c
> to pick up both "redirect" and "sta:redirect" had
> also been incorporated into the latest code. All
> I did was modify makeopts.in to sqawk
> "PROC=arm". (Not sure even that was necessary any
> more, but figured it wouldn't hurt.) I then ran
> ./configure, make menuconfig,
> make, and make install, copied the
> applicable config files from my prior invocation,
> and found it works fine.
>
> I don't know what lewy1 is doing wrong. I can't
> even say if it is a configuration problem with
> asterisk, or with his tool chain, but I've been
> using the 1.8.9.2 asterisk for the past several
> days with Google Voice and it works fine.


Thanks for the info. I guess I'll try again from scratch.
Re: Installing Asterisk
February 17, 2012 05:58PM
I also built asterisk late Jan 2012 on my pogoplug pro using twinclouds' guide without problem. Don't remember the version I build but I do know I didn't modfiy utils.c. One thing I do know is if I deselect all the modules and only select only the ones twinclouds specified, the resulted binary does not work. The only way I can have a workable binary is not to deselect anything and make sure the ones mentioned by twinclouds are selected during the make menuconfig step. Some modules maybe built unnecessary but I don't know enough about asterisk to find out.
Re: Installing Asterisk
February 17, 2012 06:35PM
Absolutely, you will need all of the other default modules besides what I mentioned in the how to. Sorry if I didn't state clear enough.
Re: Installing Asterisk
February 17, 2012 10:20PM
I have modified the original post to reflect the changes in asterisk 1.8. I compiled 1.8.9.2 without patchs. The only change still needed is PROC=arm. I compiled it successfully with no problem at all.
Re: Installing Asterisk
February 18, 2012 10:23PM
Thanks to everyone here for the help. I just reinstalled from scratch and everything went without a hitch.
Re: Installing Asterisk
February 18, 2012 11:04PM
My next problem now. How do I install freepbx. The guide by twinclouds doesn't explain that part. The other guide at plugpbx uses the script from corenetworks which includes the installation of asterisk. How do I do this with the current asterisk installed.

EDIT: I think I'm going to start this as a new topic, hopefully I'll get some help.



Edited 1 time(s). Last edit at 02/19/2012 11:13AM by lewy1.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: