Hello, 2010/10/1 Geovani Ricardo Wiedenhoft <grw.freeswitch@gmail.com>:
Hello,
We are completing development of the mod_khomp endpoint for Khomp boards: ...
However, we are constrained in our implementation. We needed to verify that a given set of digits has a valid extension or if can wait for more digits at some points of our code, without making the call.
I have already encountered this during the mod_skinny development. I asked the question to anthm on IRC and implemented what he suggested. This is mainly done in function skinny_session_dest_match_pattern() in src/mod/endpoints/mod_skinny/skinny_server.c. As processing all the dialplan can take too much CPU, a simpler dialplan is created which is named skinny-patterns. The conditions are processed like in a normal routing (Code was stolen from switch_core_standard_on_routing) with less and simpler expressions. Also specific commands are parsed instead of the common ones. Currently, those are skinny-route, skinny-drop and skinny-wait (only wait forever implemented).
In our implementation for Asterisk (our Khomp channel), we use the functions provided by the Asterisk:
############################################################################# ASTERISK:
/* \brief Looks for a valid matching extension */ - ast_canmatch_extension
/* \brief Looks to see if adding anything to this extension might match something. (exists ^ canmatch) */ - ast_matchmore_extension #############################################################################
Searching for a solution, we implemented within mod_khomp the reading and checking functions of digits and expressions in XML, but our implementation limits us to XML dialplans, which it would not be compatible if the user need the database or other constructions of the dialplan.
You don't need to parse XML, the "dialplan_interface" does it for you.
So, I would like to know what is the possibility of similar functions to be implemented in the core?
There is no such function now in the core but we can work together to implement one. There was some though on this in http://jira.freeswitch.org/browse/FS-477. We need a way to be able to call 123 as well as 1234/
Thanks :)
Geovani Ricardo Wiedenhoft -- Mathieu Parent