Subject: Re: [vserver] Asterisk in guest
From: "Roderick A. Anderson" <raanders@cyber-office.net>
Date: Thu, 05 Aug 2010 14:00:09 -0700

Herbert Poetzl wrote:
> On Thu, Aug 05, 2010 at 12:27:56PM -0700, Roderick A. Anderson wrote:
>> Roderick A. Anderson wrote:
>>> One more time but with feeling I attempt to get Asterisk running in a 
>>> guest.  Seriously this time.  :-)
> 
>> Well you guys a far too slow.  :-)  

Strange sense of humor that failed.  :-(

> 
> I assumed your 'questions' were rhetorical, as
> everybody knows that device nodes can be created
> with mknod or simply copied from the host ;-)

Yes.  My reference below to kind-of had an idea.

>> I had to figure it out myself.  
>> But to give us all a break I kind-of had an idea and it seems to work.

Same poor sense of humor leaking out.

>> Form the host:
> 
>>    cd /vservers/$GUEST/dev
>>    mknod tty9 c 4 9
> 
>> I then entered the guest and was able to "service asterisk start".  
>> I don't know if it is really _working_, verses just running, but 
>> I can now proceed to the next steps.
> 
> asterisk was reported running fine a few year ago
> (the first time), so I guess it will be fine ...

I think I do remember seeing something about this.  I'll go digging in 
the archives.


Rod
-- 
> 
> best,
> Herbert
> 
>> \\||/
>> Rod
>> -- 
>>> I have a CentOS 5 host and a CentOS 5 guest with Asterisk 1.6 installed 
>> >from the asterisk.org and digium.com repositories.
>>> I can start Asterisk from the command line (though I don't have it 
>>> configured) but when I try "service asterisk start" (which uses 
>>> safe_asterisk) I get the error:
>>>
>>>   Starting asterisk: Cannot find specified TTY (9) [FAILED]
>>>
>>> The man pages says:
>>>
>>> ...
>>>
>>> DESCRIPTION
>>>       safe_asterisk  is  a  script that runs asterisk in a loop, which
>>>       can be useful if you fear asterisk may crash.
>>>
>>>       The script does not run in the  background  like  a  standard
>>>       service.  Rather,  it  runs in its own linux virtual console (9,
>>>       by default).  It also uses the option ???-c??? of asterisk(8) to
>>>       avoid  detaching  asterisk from that terminal.
>>>
>>>       safe_asterisk  also  runs  asterisk  with unlimited core file
>>>       size, and thus asterisk will dump core in case of a crash.
>>>
>>>       To get a "picture" of console 9, from another  terminal  (e.g:
>>>       from  a remote shell session) you can use:
>>>
>>> ...
>>>
>>> I've tried not using safe_asterisk in the init script but I got a simple 
>>> FAILED but haven't found an error message -- yet -- as to what the 
>>> problem is.
>>>
>>> I'm going to the Asterisk list shortly to find out how/if-it's-possible 
>>> to disable or remove this "feature" but would prefer to work with it.
>>>
>>> In the mean time is there a way to allow safe_asterisk to use virtual 
>>> console 9?  Create it in the guest?
>>>
>>>
>>> TIA,
>>> Rod