[asterisk-users] asterisk start with php

2010-04-02 Thread salaheddine elharit
Hello All

i need your help i have asterisk installed in my server (unix centos) and i
want to create php code in order to start the asterisk service

using  a agent poste (windows xp ) without acces to the server with putty

thanks and regards

salah
-- 
_
-- 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

Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Tzafrir Cohen
On Fri, Apr 02, 2010 at 03:41:57PM +, salaheddine elharit wrote:
 Hello All
 
 i need your help i have asterisk installed in my server (unix centos) and i
 want to create php code in order to start the asterisk service
 
 using  a agent poste (windows xp ) without acces to the server with putty

Huh? why?

(Though generally you do that by allowing the user that runs the web
server to execute a specific command that will restart asterisk through
sudo)

However, reinventing the wheel is not that much fun. Look into e.g. monit.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

-- 
_
-- 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


Re: [asterisk-users] asterisk start with php

2010-04-02 Thread salaheddine elharit
thank you for your response but i need this solution as soon as possible

to restart the asterisk service via a agent poste

if ther is any solution please

thanks




2010/4/2 Tzafrir Cohen tzafrir.co...@xorcom.com

 On Fri, Apr 02, 2010 at 03:41:57PM +, salaheddine elharit wrote:
  Hello All
 
  i need your help i have asterisk installed in my server (unix centos) and
 i
  want to create php code in order to start the asterisk service
 
  using  a agent poste (windows xp ) without acces to the server with putty

 Huh? why?

 (Though generally you do that by allowing the user that runs the web
 server to execute a specific command that will restart asterisk through
 sudo)

 However, reinventing the wheel is not that much fun. Look into e.g. monit.

 --
   Tzafrir Cohen
 icq#16849755  
 jabber:tzafrir.co...@xorcom.comjabber%3atzafrir.co...@xorcom.com
 +972-50-7952406   mailto:tzafrir.co...@xorcom.com
 http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

 --
 _
 -- 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

-- 
_
-- 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

Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Steve Edwards

On Fri, 2 Apr 2010, salaheddine elharit wrote:


thank you for your response but i need this solution as soon as possible
 
to restart the asterisk service via a agent poste
 
if ther is any solution please


Are you asking for clues or are you asking somebody to write it for you?

General outline (off the top of my head) would be to add an entry to 
/etc/sudoers to allow the user executing the httpd process to execute 
/etc/init.d/asterisk (and maybe /etc/init.d/{zaptel,dahdi) and then add a 
CGI to the web server that executes something like:


system('sudo -u user-running-asterisk-process /etc/init.d/asterisk restart');

If you are asking someone to write the PHP code, most coders respond well
to an offer of compensation -- $$$, beer, etc.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000-- 
_
-- 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

Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Steve Edwards

On Fri, 2 Apr 2010, salaheddine elharit wrote:


thank you for your response but i need this solution as soon as possible
 
to restart the asterisk service via a agent poste
 
if ther is any solution please


On Fri, 2 Apr 2010, Steve Edwards wrote:


Are you asking for clues or are you asking somebody to write it for you?

General outline (off the top of my head) would be to add an entry to 
/etc/sudoers to allow the user executing the httpd process to execute 
/etc/init.d/asterisk (and maybe /etc/init.d/{zaptel,dahdi) and then add a CGI 
to the web server that executes something like:


to allow the user executing the httpd process to execute 
/etc/init.d/asterisk as the user executing the Asterisk process


system('sudo -u user-running-asterisk-process /etc/init.d/asterisk 
restart');


If you are asking someone to write the PHP code, most coders respond well
to an offer of compensation -- $$$, beer, etc.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000-- 
_
-- 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

Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Tzafrir Cohen
On Fri, Apr 02, 2010 at 09:52:31AM -0700, Steve Edwards wrote:
 On Fri, 2 Apr 2010, salaheddine elharit wrote:

 thank you for your response but i need this solution as soon as possible
  
 to restart the asterisk service via a agent poste
  
 if ther is any solution please

 On Fri, 2 Apr 2010, Steve Edwards wrote:

 Are you asking for clues or are you asking somebody to write it for you?

 General outline (off the top of my head) would be to add an entry to  
 /etc/sudoers to allow the user executing the httpd process to execute  
 /etc/init.d/asterisk (and maybe /etc/init.d/{zaptel,dahdi) and then add 
 a CGI to the web server that executes something like:

 to allow the user executing the httpd process to execute  
 /etc/init.d/asterisk as the user executing the Asterisk process

Rather: you only need to allow it to run '/etc/init.d/asterisk restart'

No need to allow it any other action (and for 'status' it should already
have the permissions).

When using sudo and alike, keep in mind to provide the minimal required
permissions, and keep things as simple as possible.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

-- 
_
-- 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


Re: [asterisk-users] asterisk start with php

2010-04-02 Thread salaheddine elharit
thank so much again for your response ,

i don't understand what shoud i do if you can please give me more
information how to do in oreder to excute this script

best regards

2010/4/2 Tzafrir Cohen tzafrir.co...@xorcom.com

 On Fri, Apr 02, 2010 at 09:52:31AM -0700, Steve Edwards wrote:
  On Fri, 2 Apr 2010, salaheddine elharit wrote:
 
  thank you for your response but i need this solution as soon as
 possible
 
  to restart the asterisk service via a agent poste
 
  if ther is any solution please
 
  On Fri, 2 Apr 2010, Steve Edwards wrote:
 
  Are you asking for clues or are you asking somebody to write it for you?
 
  General outline (off the top of my head) would be to add an entry to
  /etc/sudoers to allow the user executing the httpd process to execute
  /etc/init.d/asterisk (and maybe /etc/init.d/{zaptel,dahdi) and then add
  a CGI to the web server that executes something like:
 
  to allow the user executing the httpd process to execute
  /etc/init.d/asterisk as the user executing the Asterisk process

 Rather: you only need to allow it to run '/etc/init.d/asterisk restart'

 No need to allow it any other action (and for 'status' it should already
 have the permissions).

 When using sudo and alike, keep in mind to provide the minimal required
 permissions, and keep things as simple as possible.

 --
Tzafrir Cohen
 icq#16849755  
 jabber:tzafrir.co...@xorcom.comjabber%3atzafrir.co...@xorcom.com
 +972-50-7952406   mailto:tzafrir.co...@xorcom.com
 http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

 --
 _
 -- 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

-- 
_
-- 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

Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Steve Howes

On 2 Apr 2010, at 18:49, salaheddine elharit wrote:
 thank so much again for your response ,
  
 i don't understand what shoud i do if you can please give me more information 
 how to do in oreder to excute this script

He's damned near written it for you. Try researching the terms he used, and try 
doing a few of the bits. This is a community of people providing support to 
each-other, not a bunch of slaves to do your work for free.

Steve
-- 
_
-- 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


Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Steve Edwards
On Fri, 2 Apr 2010, salaheddine elharit wrote:

 thank so much again for your response,

 i don't understand what shoud i do if you can please give me more 
 information how to do in oreder to excute this script

If the previous post and your skill-set are not sufficient, then you 
really should hire somebody to do it for you or walk you through it 
because there are a lot of little places to go wrong with sudo access and 
file permissions. If you screw up /etc/sudoers, you may find yourself 
locked out.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- 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


Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Danny Nicholas
So Steve, when you gonna add that beer paypal link to sedwards.com so folks
who ask you a question 10 times can compensate you :)

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Friday, April 02, 2010 2:46 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] asterisk start with php

On Fri, 2 Apr 2010, salaheddine elharit wrote:

 thank so much again for your response,

 i don't understand what shoud i do if you can please give me more 
 information how to do in oreder to excute this script

If the previous post and your skill-set are not sufficient, then you 
really should hire somebody to do it for you or walk you through it 
because there are a lot of little places to go wrong with sudo access and 
file permissions. If you screw up /etc/sudoers, you may find yourself 
locked out.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- 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


-- 
_
-- 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


Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Steve Edwards
On Fri, 2 Apr 2010, Danny Nicholas wrote:

 So Steve, when you gonna add that beer paypal link to sedwards.com so 
 folks who ask you a question 10 times can compensate you :)

Virtual beer -- no calories, no buzz, no fun :)

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- 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


Re: [asterisk-users] asterisk start with php

2010-04-02 Thread Dr. Kenneth Noisewater
On 4/2/2010 12:12 PM, Steve Howes wrote:
 On 2 Apr 2010, at 18:49, salaheddine elharit wrote:

 thank so much again for your response ,

 i don't understand what shoud i do if you can please give me more 
 information how to do in oreder to excute this script
  
 He's damned near written it for you. Try researching the terms he used, and 
 try doing a few of the bits. This is a community of people providing support 
 to each-other, not a bunch of slaves to do your work for free.

 Steve

Really, it's not even a complicated task. It seems you may be in over 
your head. Hiring a contractor is probably something you should 
consider. I mean no offense, but as stated, he really couldn't have been 
more clear, and judging by your responses this doesn't sound like a 
project you are ready to take on. Luckily for you, there are probably 
numerous out of work developers right next door that would jump at the 
chance to help you out! The work you need shouldn't take any more than 1 
billable hour. You could even hire a consultant to teach you how to do 
it, and learn some new things at the same time.

Best of luck!

Kenny

-- 
_
-- 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