[asterisk-dev] RealTime API advice (Solved)

Dan Austin Dan_Austin at Phoenix.com
Wed Apr 25 19:31:02 MST 2007


I wrote:
> I did not get any responses to my MeetMe enhancement
> RFC, so I started coding to see if I could make myself
> happy before offering up the code.

> The results are promising with a couple issues.
> I made the RT column names configurable from inside
> meetme.conf.  Basic scheduling logic is in place and
> working.  I still need to add code to process conference
> options loaded from a DB, but expect that to be straight
> forward.

> The major issue at this point is confusion over the
> RT API itself.

> ast_load_realtime() only pulls the first row from the
> db.  Originally I thought I could keep calling it until
> I found a match, but that quickly went down in flames.
> It looks like ast_load_realtime_multientry() is closer
> to what I want, but existing uses in the codebase leave
> me with questions.
Ast_load_realtime_multientry was a dead end.  It turned
out that careful tuning of the arguments to 
ast_load_realtime worked the trick. 

> I'd like to be able to do one of the following:
>   1.  Perform a query with multiple conditions to
>		ensure a single returned match.
And I found a way to use the ast_load_realtime function
call to do just that.

>   2.  Perform a simple query and then iterate over
>		the results to find the correct entry.
>
> Any advice?

So in responding to myself, I have app_meetme with
RealTime storage of scheduled conferences.  Next up
is enforcement of participant limits (easy), optional
announcements for callers that are just a bit too early
(also easy), and lastly figure out a way to parse
conference options as stored in the DB (looks a bit 
tricky based on the location of the find_conf_realtime()
call compared to the code to parse options from the 
command line(sic).

Dan


More information about the asterisk-dev mailing list