Re: [Asterisk-Users] Inheriting variables

2005-02-24 Thread Jonathan Hobbs
What you want is SetGlobalVar, which sets a variable that is available to
any channel.

hth

Jonathan


- Original Message -
From: Asterisk [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Sent: February 24, 2005 10:31 AM
Subject: [Asterisk-Users] Inheriting variables


 I'm trying to set a channel variable and make it available to another
 channel:

 I thought that if I SetVar(_SomeVariable=SomeValue) or
 SetVar(__SomeVariable=SomeValue) then SomeVariable would be available in
 the destination channel.

 However __SomeVariable, _SomeVariable and SomeVariable are all blank.

 The scenario:

 Agents logon to the queue using callbacklogin. From what I can gather
 the following happens:

 1) Incomming Call - answered, plays welcome message added to Q
 2) Local channel calls the agent, plays announcement
 3) incomming call connected to agent

 where would I be able to retreive the inherited variables ?
 ___
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Inheriting variables

2005-02-24 Thread Asterisk
Jonathan Hobbs wrote:
What you want is SetGlobalVar, which sets a variable that is available to
any channel.
No, I only want the variable available to the original channel and all 
connected channels. I don't want it available to any channel.

For example, I want to store the zap channel number into SourceChannel 
on the incoming call, and make it available to the called agent channel.

Thanks anyway.
Julian.
hth
Jonathan
- Original Message -
From: Asterisk [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Sent: February 24, 2005 10:31 AM
Subject: [Asterisk-Users] Inheriting variables

I'm trying to set a channel variable and make it available to another
channel:
I thought that if I SetVar(_SomeVariable=SomeValue) or
SetVar(__SomeVariable=SomeValue) then SomeVariable would be available in
the destination channel.
However __SomeVariable, _SomeVariable and SomeVariable are all blank.
The scenario:
Agents logon to the queue using callbacklogin. From what I can gather
the following happens:
1) Incomming Call - answered, plays welcome message added to Q
2) Local channel calls the agent, plays announcement
3) incomming call connected to agent
where would I be able to retreive the inherited variables ?
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Inheriting variables

2005-02-24 Thread Peter Svensson
On Thu, 24 Feb 2005, Asterisk wrote:

 I'm trying to set a channel variable and make it available to another
 channel:
 
 I thought that if I SetVar(_SomeVariable=SomeValue) or
 SetVar(__SomeVariable=SomeValue) then SomeVariable would be available in
 the destination channel.
 
 However __SomeVariable, _SomeVariable and SomeVariable are all blank.
 
 The scenario:
 
 Agents logon to the queue using callbacklogin. From what I can gather
 the following happens:
 
 1) Incomming Call - answered, plays welcome message added to Q
 2) Local channel calls the agent, plays announcement
 3) incomming call connected to agent
 
 where would I be able to retreive the inherited variables ?

Perhaps there is a problem with variable inheritance across a queue? It 
should work the way to expected it to (passing the _SomeVariable into 
SomeVariable).

Peter


___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Inheriting variables

2005-02-24 Thread Bill Seddon
Julian

 For example, I want to store the zap channel number into
SourceChannel 
on the incoming call, and make it available to the called agent
channel.

If global variables are not suitable maybe the registry will work.  You
may have looked at DBGet and DBPut to retrieve and store arbitrary
values.  For example you might store values using the channel id as the
key and when the call ends delete the values.

Database values are available to all channels but you can have your
dialplan only work with database values related to its own channel or
channels that are related in someway.

Bill Seddon

Lyquidity Solutions Limited

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Asterisk
Sent: February 24, 2005 3:41 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Inheriting variables

Jonathan Hobbs wrote:
 What you want is SetGlobalVar, which sets a variable that is available
to
 any channel.

No, I only want the variable available to the original channel and all 
connected channels. I don't want it available to any channel.

For example, I want to store the zap channel number into SourceChannel 
on the incoming call, and make it available to the called agent channel.

Thanks anyway.

Julian.

 
 hth
 
 Jonathan
 
 
 - Original Message -
 From: Asterisk [EMAIL PROTECTED]
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 asterisk-users@lists.digium.com
 Sent: February 24, 2005 10:31 AM
 Subject: [Asterisk-Users] Inheriting variables
 
 
 
I'm trying to set a channel variable and make it available to another
channel:

I thought that if I SetVar(_SomeVariable=SomeValue) or
SetVar(__SomeVariable=SomeValue) then SomeVariable would be available
in
the destination channel.

However __SomeVariable, _SomeVariable and SomeVariable are all blank.

The scenario:

Agents logon to the queue using callbacklogin. From what I can gather
the following happens:

1) Incomming Call - answered, plays welcome message added to Q
2) Local channel calls the agent, plays announcement
3) incomming call connected to agent

where would I be able to retreive the inherited variables ?
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

 
 
 
 ___
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 

___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Inheriting variables

2005-02-24 Thread Asterisk
Hmm. I'm running
Asterisk CVS-HEAD-02/16/05-07:03:04
I'll look into the bug list.
Julian.
Peter Svensson wrote:
On Thu, 24 Feb 2005, Asterisk wrote:

I'm trying to set a channel variable and make it available to another
channel:
I thought that if I SetVar(_SomeVariable=SomeValue) or
SetVar(__SomeVariable=SomeValue) then SomeVariable would be available in
the destination channel.
However __SomeVariable, _SomeVariable and SomeVariable are all blank.
The scenario:
Agents logon to the queue using callbacklogin. From what I can gather
the following happens:
1) Incomming Call - answered, plays welcome message added to Q
2) Local channel calls the agent, plays announcement
3) incomming call connected to agent
where would I be able to retreive the inherited variables ?

Perhaps there is a problem with variable inheritance across a queue? It 
should work the way to expected it to (passing the _SomeVariable into 
SomeVariable).

Peter
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Inheriting variables

2005-02-24 Thread Asterisk
Bill Seddon wrote:
Julian
 For example, I want to store the zap channel number into
SourceChannel 
on the incoming call, and make it available to the called agent
channel.

If global variables are not suitable maybe the registry will work.  You
may have looked at DBGet and DBPut to retrieve and store arbitrary
values.  For example you might store values using the channel id as the
key and when the call ends delete the values.
The problem with this is that if I use the channel ID as the key, the 
target channel does not know the parent channel, and therefore does not 
know what key to use.

Internally, the channels obviously know how they are linked, but I 
wanted to achieve this without having to write app_GetChanData - 
although that sounds quite interesting now ... :)

Julian
Database values are available to all channels but you can have your
dialplan only work with database values related to its own channel or
channels that are related in someway.
Bill Seddon
Lyquidity Solutions Limited
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users