A J Stiles
2012-Oct-03 12:14 UTC
[asterisk-users] Passing a variable downstream to an IAX server
Apologies if this is a really stupid n00b question, but I don't seem to be able to find an answer anywhere. Is it possible somehow to pass a channel variable to another Asterisk server down an IAX trunk? I have 2 machines; one which is fitted with an ISDN card to make outside calls via an E1 line, and another with a GSM card to make outside calls via the mobile network. The GSM machine gets some calls passed onto it by a command like Dial(IAX2/user:pass at host.cc/number) . This works nicely, but I want to know: is there any way to pass on a variable (already set in the dialplan before the Dial() occurs) to the downstream server? It's a single numeric value that I want to pass on, so I guess in the worst case it could be sent within the actual number e.g. by appending * and the data to the extension number and then using CUT() on the downstream server. But is there a less-ugly method that I am just missing? -- AJS Answers come *after* questions.
Danny Nicholas
2012-Oct-03 13:46 UTC
[asterisk-users] Passing a variable downstream to an IAX server
Look in the archives. This was covered sometime in July or August. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of A J Stiles Sent: Wednesday, October 03, 2012 7:14 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Passing a variable downstream to an IAX server Apologies if this is a really stupid n00b question, but I don't seem to be able to find an answer anywhere. Is it possible somehow to pass a channel variable to another Asterisk server down an IAX trunk? I have 2 machines; one which is fitted with an ISDN card to make outside calls via an E1 line, and another with a GSM card to make outside calls via the mobile network. The GSM machine gets some calls passed onto it by a command like Dial(IAX2/user:pass at host.cc/number) . This works nicely, but I want to know: is there any way to pass on a variable (already set in the dialplan before the Dial() occurs) to the downstream server? It's a single numeric value that I want to pass on, so I guess in the worst case it could be sent within the actual number e.g. by appending * and the data to the extension number and then using CUT() on the downstream server. But is there a less-ugly method that I am just missing? -- AJS Answers come *after* questions. -- _____________________________________________________________________ -- 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
Satish Barot
2012-Oct-03 14:28 UTC
[asterisk-users] Passing a variable downstream to an IAX server
On Wed, Oct 3, 2012 at 5:44 PM, A J Stiles <asterisk_list at earthshod.co.uk>wrote:> Apologies if this is a really stupid n00b question, but I don't seem to be > able to find an answer anywhere. > > Is it possible somehow to pass a channel variable to another Asterisk > server > down an IAX trunk? > > I have 2 machines; one which is fitted with an ISDN card to make outside > calls > via an E1 line, and another with a GSM card to make outside calls via the > mobile network. The GSM machine gets some calls passed onto it by a > command > like Dial(IAX2/user:pass at host.cc/number) . > > This works nicely, but I want to know: is there any way to pass on a > variable > (already set in the dialplan before the Dial() occurs) to the downstream > server? > > It's a single numeric value that I want to pass on, so I guess in the worst > case it could be sent within the actual number e.g. by appending * and the > data to the extension number and then using CUT() on the downstream server. > But is there a less-ugly method that I am just missing? > > -- > AJS > > Answers come *after* questions. > > -- > _____________________________________________________________________ > -- 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 >Glad I found you asking a question! Check a function IAXVAR. I think Asterisk version matters for it. --Satish Barot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121003/3cf7b2f0/attachment.htm>