[asterisk-users] How to write a function with a return value in Asterisk

Mike list at virtutel.ca
Wed Aug 8 10:24:45 CDT 2007


Hi,
 
Is it possible to write a function in Asterisk, that returns a value?  Sort
of like any programming language allows?
 
For example, I`d like function ReturnSipReg to return the right
SipRegistration to dial, based on some value so that I could use it in my
dial plan:
 
i.e:
 
exten => 1234,1,Dial(SIP/ReturnSipReg(John)) 
; would dial John's extension, which I don't know at this point to which Sip
Registration it's associated. ReturnSipReg would find that out for me.
 
 
Unfortunately, doing it in two steps (by setting a variable and using it
after) can't be done, I need it to all be done in the same Asterisk
priority. See my previous email for background ("Buddy watch and the hint
priority - brain teaser").
 
 
Any help is extremely appreciated.
 
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070808/f12debb6/attachment.htm 


More information about the asterisk-users mailing list