[asterisk-users] [asterisk-user] Can't get hostname on asterisk dialplan by ENV()

RAJNIKANT VANZA rajnivanza at gmail.com
Fri Apr 29 00:20:00 CDT 2011


Hi Friends,

I got hostname through dialplan ENV() function and set environment variable
hostname in asterisk init script.

Thanks for everyone to resolve my problem.



On Fri, Apr 22, 2011 at 2:27 AM, Mark Deneen <mdeneen at gmail.com> wrote:

> On Thu, Apr 21, 2011 at 4:30 PM, Steve Edwards
> <asterisk.org at sedwards.com> wrote:
> > On Thu, 21 Apr 2011, Mark Deneen wrote:
> >
> >> I use runit to manage the asterisk process, and the chpst program
> >> allows fine control over environment and other limits.
> >
> > runit is intended to be a sysvinit (/sbin/init) replacement and is not
> > installed (by default) on CentOS or Ubuntu distributions.
> >
> > Can chpst be used by itself? It seems a useful program except that you
> need
> > to explicitly name each environment variable you want 'ignored' and it is
> > part of a larger package that may have far reaching implications
>
> Steve,
>
> runit is actually very unobtrusive.  It is capable to replacing init,
> but I don't think many people actually use it that way.
> http://smarden.org/runit/useinit.html documents how to use it with
> init.
>
> If I wanted to clear the environment first, I'd just use env and have
> that call chpst.  I like runit because it manages the process without
> the typical pid-file tracking that most init scripts use.  If the
> process dies, for whatever reason, it is automatically restarted.
> stdout is captured and redirected to an optional log process which can
> roll logs, removing the need for logrotate and figuring out what
> special signal to send the process to tell it that you've truncated
> the log file.
>
> There is a catch, though.  Your process has to run in the foreground,
> and runsv keeps it in the background.  So, for programs which
> auto-detach and background themselves, you have to run them with a
> switch that says not to run as a daemon.
>
> It's not everyone's cup of tea, but I find it to be perfect for my
> needs, and a very well written utility.
>
> -M
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Best Regards,

Rajnikant Vanza
Call : +91-9737456583
Software Engineer
-------------------------------------------------------
Working On Linux,C/C++,Asterisk Technology
Gandhinagar - Gujarat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110429/dedc8a8b/attachment.htm>


More information about the asterisk-users mailing list