[Freeswitch-dev] Searching for a valid extension
Anthony Minessale
anthony.minessale at gmail.com
Tue Oct 12 12:05:49 PDT 2010
check the new switch_ivr_dmachine object
On Tue, Oct 12, 2010 at 1:40 PM, Mathieu Parent <math.parent at gmail.com> wrote:
> Hello,
>
> 2010/10/1 Geovani Ricardo Wiedenhoft <grw.freeswitch at 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
>
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
More information about the FreeSWITCH-dev
mailing list