Hi everyone,
I need to get asterisk 1.6 or 1.4 with func_devstate running on windows,
effectively meaning in cygwin. I downloaded and installed the most recent
cygwin with source packages for lib and devel. I also tried unix styled and
DOS styled text files. My home is in C:/cygwin/home/administrator and
from within cygwin in /home/administrator (no spaces in home path).
Unfortunately, neither 1.4.21 nor 1.6 beta9 will compile. After ./configure (no
problems) I executed make with and without changing options in menuconfig.
First error in 1.4 is encountered in aelparse.c, something about mutex_np.
Since I’m not into c programming, I don’t have a clue where to start. The
same code compiles without errors on an out-of-the-box fedora 8.
So has anyone compiled 1.4/6 successfully and could give me some advice?
Thanks,
Seven.
This has been tried many times and I dont think has ever been succesful. Why does it have to run on winodws? If its just because your not strong with linux I would suggest you either use AsteriskNOW or look into the Asterisk Appliance.
Well, it has. http://www.asteriskwin32.com would be the ressource of your choice. Unfortunately, only with * 1.2, not with 1.4 or 1.6; I need the devstate() function. The guy creating the windows build had to patch asterisk a bit though…
Simple: I already have a windows server running Exchange, file storage, fax services and IIS. I do not want another box. Saves the Environment on one hand, less to care about (administration, backup, security, access control, desaster recovery, battery devices) on the other hand.
Simple again. As I live in Germany, we have ISDN. And popular ISDN cards include PCI and USB devices made by AVM (BRI cards). Unfortunately, I really am a bit weak with linux when it comes to decrypting compiler error messages because a driver was made for SLED 9.3 and will not compile on 10.1, which is a problem with linux in general, and it is an experiance I made, coming from a nice windows environment.
So I tried asterisk with mISDN and chan_capi (fedora 8, as I said earlier) and didn’t get the ISDN card to work.
Then I tried AsteriskNow (no sources delivered, no yum, no apt-get) and again my PCI cards were not recognized.
That windows build from above ran like hell right after I clicked setup.exe; I believe, thats reason enough.
So please no more “use linux” replies
I know, most of you guys are happy with that solution, but I really really need it to run on Windows gg.
Thanks anyway,
Seven
Use same virtual machine !
You can use the AVM usb card (i use 4 usb fritz card) on the vm, and works great with chan_capi.
P.S. some products for vm are free for server version.
is there any way you could share your vmware image with me? stripped of its config files of course, because I had no luck getting the AVM driver to work with fedora or asteriskNOW. And it didn’t compile in SLED 10.3 either.
Thanks,
Seven
ps: what version do you use or does it have devstate() (func_devstate) available in the dialplan?
Hi again,
I’ve come a bit further in my quest 
It seems that the c compiler in cygwin is not able to locate the .h header files in the asterisk source directory and the system include directory. Can anyone tell me how to make the “make” command look in “/” recursively for header files, even if that takes ages?
Thanks,
Seven
Hi,
here I wrote an instruction list on how to compile in cygwin on i686 maschine. Unfortunately, I was not able to get chan_capi or misdn to work on cygwin, so no ISDN channels available. I’ve written to Patrick Deruel for support on the chan_capi issue, but not gotten any reply so far. Perhaps this helps others seeking advice as well…
------------ INSTRUCTIONS START ------------
A few notes and drawbacks before we start:
-
I did not get 1.4.21 to build and run on cygwin. It’s maybe because the configure script does not check for all possible differences between linux and cygwin header files (first error is some PTHREAD_MUTEX_RECURSIVE_NP missing in cygwin pthread.h; issue fixed in the configure file for 1.6beta9). Perhaps the devs will fix the source or configure script, but I gave up at that point. Same source compiled without errors on Fedora 8 btw.
-
The modules for speech recognition do not work. I removed them with menuconfig (see below)
-
home directory with special letters (ö ä ü ß or space) does not work! Use “/tmp” in that case instead!
-
Install cygwin from cygwin.com/:
- Download Setup.exe
- Install in c:\cygwin\ (other directories may be possible, but not tested)
- Use Unix Styled Text files and install for All Users
- When you are to select the packages use the setup default and in addition to that change the selection for “Devel” and “Libs” to “install”. Whether or not this is really necessary for building, I do not know.
-
Goto downloads.digium.com/pub/asteris … ta9.tar.gz to your home directory (i.e. C:\cygwin\home\administrator)
-
launch a cygwin command prompt, cd to your home directory (cygwin should start up with your home directory, just in case it doesnt) and untar the package with “tar -xzf asterisk-1.6.0-beta9.tar.gz”, tab key is your friend here 
-
cd to the new directory “cd asterisk-1.6.0-beta9”
-
execute configure by “./configure”… oh boy, that will take ages compared to native linux on the same hardware… don’t worry about some "no"s, if there is anything important missing, configure will abort. In my standard installation of cygwin (see above) it didn’t abort.
-
When you see:
configure: Package configured for:
configure: OS type : cygwin
configure: Host CPU : i686
configure: build-cpu:vendor:os: i686 : pc : cygwin :
configure: host-cpu:vendor:os: i686 : pc : cygwin :
we can get to the hard part…
I assume that you did not (yet) use menuconfig to add or remove any features.
So lets walk through the errors. Type “make” and . It will run through
a lot of files, but in case of error, see below:
- error in “res_config_ldap.c”: undefined reference to `_ber_free’
solution: sorry, no clue which header file is missing/outdated,
removing res_config_ldap with “make menuconfig” from the “Ressource Modules” tree in menu config. save with “s”. then “make” again
res_* went through just fine…
-
error in “chan_agent.c” and all other channels: cannot find "-lres_features.so"
quite right, res_features is not available but for some stupid reason still in the Makefile.
Let’s have a look “/home/administrator/asterisk-1.6.0beta9/channels/Makefile”
In one Line I found:
""“
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+= -lres_monitor.so -lres_features.so
endif
”""
change it to
""“
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+= -lres_monitor.so
endif
”""
chan_* went through just fine…
pbx_* went through just fine…
-
error in “app_adsiprog.c” and other apps: cannot find “-lres_features.so"
same here, in “/home/administrator/asterisk-1.6.0beta9/channels/Makefile” change:
”"“
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+= -lres_features.so -lres_ael_share.so -lres_monitor.so -lres_speech.so
LIBS+= -lres_smdi.so
endif
”""
to
“”“
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
LIBS+= -lres_ael_share.so -lres_monitor.so
LIBS+= -lres_smdi.so
endif
”""
-
error in “app_mixmonitor.c”: /home/Administrator/asterisk-1.6.0-beta9/include/asterisk/audiohook.h:90: error: field `read_time’ has incomplete type
No clue howto fix that app, so lets remove it via make menuconfig from the “Applications” Section
-
error in “app_speech_utils.c”: many errors No clue howto fix that app, so lets remove it via make menuconfig from the “Applications” Section
app_* went through just fine…
codec_* went through just fine…
format_* went through just fine…
cdr_* went through just fine…
func_* went through just fine…
and then voila… Thats it! you have a running asterisk in you home dir!
-
Install into cygwin
Now type “make install” and all files and voicemail sounds
will be installed into cygwin. After the install script finishes
there is only one small step left:
Copy the “asterisk.dll” from "/home/administrator/asterisk-1.6.0beta9/main"
to “/usr/sbin/”.
-
Install config files
Asterisk demo config files can be installed by “make samples” and will
be created in “/etc/asterisk”. Be sure to change them before launching
asterisk.
In general, if you do not need a module, dont load it!
------------ INSTRUCTIONS END ------------
Perhaps somebody can get mISDN oder chan_capi to work with cygwin, I unfortunately have no clue of c or c++ and cannot help here…
Bye,
Seven