# asterisk, zapata voip.

## seaq

Hi, i'm building an asterisk pbx but having some trouble building zapata and zaptel modules.

1.  There's a new version zaptel/zapata 0.9 and there`s not ebuild yet

2. The portage version of zaptel/zapata doesn't compile in 2.6 (but in the readme it says it does).

Well, if someone out there is building an * server any help would be gratly appreciated.

Regards

andres

----------

## funkmankey

cvs version works great ^_^

https://bugs.gentoo.org/show_bug.cgi?id=33345

(in fact I just rebuilt mine earlier today...)

if you want to use the release versions, it won't be terribly hard to alter zaptel 0.8.1 ebuild to 0.9 -- and of course change 'make' to 'make linux26' for 2.6 kernel.

----------

## sgrimee

I'm planning to install asterisk as well (CVS version, this seems to be a must with asterisk). 

Has anyone a goot init.d startup script to recommend for use with the CVS version?

thanks

Sam

----------

## sgrimee

Let me answer myself...

without using the ebuild, I'll use these files:

 /usr/portage/net-misc/asterisk/files/0.7.2/asterisk.rc6

/usr/portage/net-misc/asterisk/files/0.7.2/asterisk.confd 

and see what it gives...

----------

## funkmankey

I never got around to getting an init script working (but someday I'd like to use safe_asterisk properly...)

I have this in /etc/inittab:

```
# run asterisk

ax:2345:respawn:/usr/sbin/asterisk -qcf
```

which is handy because init will always restart asterisk if it happens to die, and then to restart I simply go into  the asterisk CLI and do a stop now.

of course, to actually stop I have to edit inittab and then do telinit q...vaguely irritating.

----------

## funkmankey

btw, regular cvs would not build for me just now; but 1.0-stable cvs branch builds (and runs!) just fine... I think someone said on #asterisk channel earlier that there are only 10 open bugs left in 1.0

1.0 cvs ebuild is in the same bug report as the regular cvs ebuild.

----------

## mazirian

I doubt know if anyone is still monitoring this post, but I'll give it a shot anyway.

I just installed * from CVS and its working great.  To start it, I am using the same init.d script that is created when you install * through portage, which is also working great. 

I have a digium X100P FXO card, for which I need to modprobe the wcfxo and zaptel modules on startup.  So I have those two modules listed in /etc/modules.autoload.d/kernel-2.4.  I want to get ztcfg to run after the two zaptel modules get loaded, so that card's channel gets configured and it can start accepting calls from the pstn.  What is the best way to achieve this?

Isn't there some file in which I can list commands that will be executed on startup?  Is that where it should go?  Or should I be editing the init.d script?

----------

## funkmankey

the zaptel install should have created /etc/modules.d/zaptel for you, which has stuff like:

```
install wcfxo /sbin/modprobe --ignore-install wcfxo && /sbin/ztcfg

install wcfxs /sbin/modprobe --ignore-install wcfxs && /sbin/ztcfg
```

in it ... if not, you can just create it yourself and then run modules-update to propagate it over to modules.conf.

----------

## mazirian

Ahhh, that's how it's supposed to be done.  Making the zaptel driver from CVS didn't create that file for me.  What else is in that file?  Would you mind posting the whole thing?

----------

## funkmankey

this is the whole thing:

```
options torisa base=0xd0000

alias char-major-196 torisa

install tor2 /sbin/modprobe --ignore-install tor2 && /sbin/ztcfg

install torisa /sbin/modprobe --ignore-install torisa && /sbin/ztcfg

install wcusb /sbin/modprobe --ignore-install wcusb && /sbin/ztcfg

install wcfxo /sbin/modprobe --ignore-install wcfxo && /sbin/ztcfg

install wcfxs /sbin/modprobe --ignore-install wcfxs && /sbin/ztcfg

install ztdynamic /sbin/modprobe --ignore-install ztdynamic && /sbin/ztcfg

install ztd-eth /sbin/modprobe --ignore-install ztd-eth && /sbin/ztcfg

install wct1xxp /sbin/modprobe --ignore-install wct1xxp && /sbin/ztcfg

install wct4xxp /sbin/modprobe --ignore-install wct4xxp && /sbin/ztcfg
```

(although none of the other lines will be relevant to your current setup)

----------

## mazirian

Oh, you're right, I really only need the line for the fxo stuff, but it's enlightening anyway.  Hey, thanks very much, that seems to work nicely.

----------

## funkmankey

no worries, glad it finally works for you ^_^

I guess it's good to have the other stuff anyway, in case you get different hardware in future.

----------

## GamesBond

I'm going to try asterisk too and would like to try the cvs ebuilds from the bug # you mentioned. Haven't got a clue however how to do this. Would I need only the 2 ebuild files from the bug (one for zapata and the other for asterisk) or are any additional files required too?

----------

## funkmankey

if you already have some zaptel hardware (x101, tdm400 etc.) then zaptel-cvs is necessary, but if you simply want to try asterisk, then the asterisk-cvs build is all that you need.

(zaptel-cvs has some additional patch files that need to be downloaded, but asterisk-cvs does not)

----------

## GamesBond

I will need to install both  :Smile: 

But am a n00b with Gentoo, I only once installed an ebuild from the bugs section and for this I needed to download ther ebuild files plus a whole series of other files that were required by the ebuild (init scripts etc.)

Are any additional files required or will asterisk take care of the installation of the required startup/shutdown scripts and other stuff?Last edited by GamesBond on Tue Jul 06, 2004 10:29 am; edited 1 time in total

----------

## funkmankey

you should only need:

zaptel-cvs-modulesd.patch

zaptel-cvs-0.6.ebuild

asterisk-cvs-0.2.ebuild

(the modulesd patch goes into:

/usr/local/portage/net-misc/zaptel-cvs/files/ )

you can look at the official ebuild for 0.9.0 to get an idea of some more advanced stuff, e.g. they do have a basic init script:

/usr/portage/net-misc/asterisk/files/0.9.0/asterisk.rc6

and you will find more interesting stuff in

/usr/portage/distfiles/cvs-src/asterisk-cvs/asterisk/contrib/

----------

