Re: [Asterisk-Users] variable in extension.conf

2003-03-11 Thread Rattana BIV
I try to detect if an user who use Netmeeting is connected or not.
I think in order to do that, Netmeeting-user open a web page (in PHP) et
press the button Connect or Disconnect and the PHP set the Environnement
variable which will be proceeded in extension.conf

So i need Environnement Variable, I have test it with :
s,1,SetVar,toto=$VARENV where VARENV is my environnement variable but toto
not take the value. perhaps should I try toto=${VARENV} or toto=${$VARENV}.


Regards
Rattana

- Message d'origine -
De : Steven Critchfield [EMAIL PROTECTED]
À : [EMAIL PROTECTED]
Envoyé : lundi 10 mars 2003 18:27
Objet : Re: [Asterisk-Users] variable in extension.conf


 On Mon, 2003-03-10 at 11:00, Rattana BIV wrote:
  Hi,
 
  How can we use Environnement variable in extension.conf ?

 I don't think you can at this moment, and I am not sure that would be a
 good idea as you asterisk thread should be long lived and therefore
 anything you would put in an environment variable would just as well be
 placed in a config file. Not to mention a config file can be reread
 without stopping asterisk or interupting running calls.

 Could you point out what you wanted to accomplish with environment
 variables so we can see if there is a better way of communicating the
 information to asterisk with you, or see what I am currently
 overlooking.
 --
 Steven Critchfield  [EMAIL PROTECTED]

 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] variable in extension.conf

2003-03-11 Thread Tilghman Lesher
On Tuesday 11 March 2003 08:44, Steven Critchfield wrote:
 On Tue, 2003-03-11 at 02:29, Rattana BIV wrote:
  I try to detect if an user who use Netmeeting is connected
  or not. I think in order to do that, Netmeeting-user open a
  web page (in PHP) et press the button Connect or Disconnect
  and the PHP set the Environnement variable which will be
  proceeded in extension.conf
 
  So i need Environnement Variable, I have test it with :
  s,1,SetVar,toto=$VARENV where VARENV is my environnement
  variable but toto not take the value. perhaps should I try
  toto=${VARENV} or toto=${$VARENV}.

 You can not pass information that way. The environment
 variable for your web server is JUST for your web server. It
 will not be available to asterisk. Your webserver should not
 run as root, nor as the same user as asterisk. Your best bet
 would be to get netmeeting to register to asterisk when it is
 opened, then asterisk will know the user is available.

You might be able to write an interface in PHP to the manager
port and pass commands (perhaps to set database entries?).

-Tilghman

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] variable in extension.conf

2003-03-11 Thread James Golovich



On Tue, 11 Mar 2003, Tilghman Lesher wrote:

 On Tuesday 11 March 2003 08:44, Steven Critchfield wrote:
  On Tue, 2003-03-11 at 02:29, Rattana BIV wrote:
   I try to detect if an user who use Netmeeting is connected
   or not. I think in order to do that, Netmeeting-user open a
   web page (in PHP) et press the button Connect or Disconnect
   and the PHP set the Environnement variable which will be
   proceeded in extension.conf
  
   So i need Environnement Variable, I have test it with :
   s,1,SetVar,toto=$VARENV where VARENV is my environnement
   variable but toto not take the value. perhaps should I try
   toto=${VARENV} or toto=${$VARENV}.
 
  You can not pass information that way. The environment
  variable for your web server is JUST for your web server. It
  will not be available to asterisk. Your webserver should not
  run as root, nor as the same user as asterisk. Your best bet
  would be to get netmeeting to register to asterisk when it is
  opened, then asterisk will know the user is available.
 
 You might be able to write an interface in PHP to the manager
 port and pass commands (perhaps to set database entries?).
 

Thats a good idea, currently with the manager interface you can execute
cli commands so that would be easily done.  I was thinking of adding
native manager astdb commands, but I haven't had the time to get to it
recently.

James


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] variable in extension.conf

2003-03-10 Thread Steven Critchfield
On Mon, 2003-03-10 at 11:00, Rattana BIV wrote:
 Hi,
 
 How can we use Environnement variable in extension.conf ?

I don't think you can at this moment, and I am not sure that would be a
good idea as you asterisk thread should be long lived and therefore
anything you would put in an environment variable would just as well be
placed in a config file. Not to mention a config file can be reread
without stopping asterisk or interupting running calls. 

Could you point out what you wanted to accomplish with environment
variables so we can see if there is a better way of communicating the
information to asterisk with you, or see what I am currently
overlooking.
-- 
Steven Critchfield  [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] variable in extension.conf

2003-03-10 Thread Martin Pycko
you put some definitions in
[globals] section in extensions.conf

later you just use SetGlobalVar variable to change the
values of global variables and then you just take
the value of a variable like this: ${variable} or
like this ${${variable}} or like this ${extension_${EXTEN}} etc.

a trivial example:
[global]
start=1

[local]
exten = s,1,SetGlobalVar,start=1
exten = s,2,Dial,Zap/${start}

is the same as
exten = s,1,Dial,Zap/1

regards
Martin



On Mon, 10 Mar 2003, Rattana BIV wrote:

 Hi,

 How can we use Environnement variable in extension.conf ?


 regards
 rattana


 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users