Hi,

I need to implement real-time call control within asterisk i.e. rather then 
just setting a time limit at the start it needs to be preiodically checked in 
case the caller has run out of credit due to simultaneous calls or such. 
Thankfully KNK has submitted a patch that does most of the work 
http://bugs.digium.com/view.php?id=6335 (without that I'd be struggling). I 
have a modified patch working pretty well but have a question regards the way 
it can be implemented with the Dial command. 

KNK used some global variables in the dial plan to set the real-time call 
control application (or recheck application) however I don't think that's an 
ideal way to do it as it will affect every call of the Dial appication and it's 
most likely that there will be cases where the check isn't required. As such 
I've changed the patch to accept the application as a parameter of the Dial 
command along the lines of:

"    L(x[:y][:z][:rtccapp]) - Limit the call to 'x' ms. Play a warning when 'y' 
ms are\n"
"           left. Repeat the warning every 'z' ms. Call real-time call control 
applciation 'rtccapp'\n"

Initially I was thinking:

L(x[:y][:z][:rtccapp[:rtccfreq]]) where rtccfreq is a period in milliseconds at 
which the rtccapp should be called but since the application I will be using is 
FastAGI the colon after agi://... made that tricky. The other problem with 
having the rtcapp as a parameter is that the first instance of a closing 
bracket ) indicates the end of the L options.

So my question is would anyone have any ideas about a good approach to be able 
to use "difficult" strings as parameters? Should there be an option to enclose 
a parameter in quotes of some kind and allow them to get passed in that way?

The ideal string for what I need is:

 L(108000:60000:30000:Agi(agi://192.168.1.10:4573?app=rtcc):60000) 

To allow that I'd need to write some custom parameter handling code which would 
deviate from the utility methods already in Asterisk and I thought I'd check 
here first in case there was a better idea.

Regards,

Greyman.




      
____________________________________________________________________________________
 Yahoo!7 Mail has just got even bigger and better with unlimited storage on all 
webmail accounts.
http://au.docs.yahoo.com/mail/unlimitedstorage.html




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to