[asterisk-users] Variable inheritance with dialplan command Originate

Naomi Rosenberg naomi at dmcip.com
Mon Apr 11 05:15:52 CDT 2011


Hi, 

The reason I think Dial isn't appropriate is not to do with the database call. Here's the wider context of the application I'm putting together:

Punter calls in, leaves a message, gets a reference number, hangs up. System then initiates call to a queue of on-call staff and when one answers it plays them the ref and the punter's message.

The Originate bit is when, after the punter's hung up, the system initiates an outgoing call. 

I've worked around the inheritance problem by using the reference number as the extension, which being the primary key then allows me to retrieve the rest of the data from the DB again once over the Originate hump.

Passing it all in the extension is an idea, but would not suit this case since there is a lot of data and as the application develops the nature of the data may change.

Naomi 

----- Original Message -----
From: "Sherwood McGowan" <sherwood.mcgowan at gmail.com>
To: asterisk-users at lists.digium.com
Sent: Friday, 8 April, 2011 5:10:55 PM
Subject: Re: [asterisk-users] Variable inheritance with dialplan command Originate

On 4/8/2011 11:05 AM, Jim Dickenson wrote:
> Another option is to pass the information in the extension. At times I
> have an extension like
>
> _[s][o][m][e]-[e][x][a][m][p][l][e].
>
> And call it like some-example:info1:info2 and use cut to extract the
> info1 and info2 values. Not real pretty but as this is computer
> generated calls it gets the job done.

Still not sure why you guys need this...Here's my example

[firstleg]
exten => 200,1,Set(__myvar=foo) ; Don't forget you don't want quotes!)
exten => 200,n,Dial(Local/123 at test_orig)
[test_orig] exten => 123,1,Noop(${myvar})
same => n,Set(dbtest=${ODBC_TESTQUERY(myvar)})

-- Sherwood McGowan <sherwood.mcgowan at gmail.com>
Carrier, ITSP, Call Center, and PBX Solutions Consultant


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



More information about the asterisk-users mailing list