[asterisk-users] How to write a function with a return value inAsterisk
Andrew Kohlsmith
akohlsmith-asterisk at benshaw.com
Wed Aug 8 10:59:26 CDT 2007
On Wednesday 08 August 2007 11:41:38 am Mike wrote:
> But what if I wanted to write my own custom application for one specific
> purpose, I can't set a return value? It's not possible at all?
Not possible, to my knowledge.
> Let me put it this way then, if I needed to have some processing all done
> in the same Asterisk priority (in my case, I want to use the "hint"
> priority but I need to find the value of a variable and use it in the same
> line).
Create a function and Dial(SIP/${MY_FUNKY_NEW_FUNC(ooga)})
> Exten => 12345,hint,Dial(SIP/${A}) ; I need to know ${A} first, but I can't
> know before this line is called (it's very DB driven).
Give the function method a try; that's about the only way I can think of doing
something like that... Note that if it's a very DB driven system, you can
use func_odbc to do what you want by declaring an SQL statement as a
function.
-A.
More information about the asterisk-users
mailing list