Your regex does not match what you dialed:<br>^10(\d)$ needs three digits but you only dialed two digits in your originate:<br>loopback/10/khomp-SIP/XML<br><br>try something like:<br>loopback/101/khomp-SIP/XML<br>
<br>-MC<br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 10:16 AM, Geovani Ricardo Wiedenhoft <span dir="ltr"><<a href="mailto:grw.freeswitch@gmail.com">grw.freeswitch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks for the sugestions. <br><br>I checked carefully every step, however, I got some questions.<br><br>We tested the originate with the loopback endpoint, because we need to pass through the dialplan.<br><br>My context:<br>
<br><context name="khomp-SIP"><br> <extension name="SIP"><br> <condition field="destination_number" expression="^10(\d)$"><br> <action application="bridge" data="user/100$1"/><br>
</condition><br> </extension><br></context><br><br><br>Test:<br>freeswitch@geovani> originate loopback/10/khomp-SIP/XML 1002<br><br><br>-ERR NO_ROUTE_DESTINATION<br><br><br><br>In this test, we send the digits 10 (simulating the reception of these digits in the FXS) for khomp-SIP context in XML. I expected the INVALID_NUMBER_FORMAT return (accept more digits and try again), but the result was NO_ROUTE_DESTINATION. This happened with the switch_ivr_originate function too.<br>
<br>switch_ivr_originate(NULL, &session, &cause, dialstring.c_str(), timeout, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL);<br><br>cause = 3 = NO_ROUTE_DESTINATION<br><br><br>In previous email I did not say, we can make calls with timeout between digits, but my goal is to anticipate the call if possible checking of the extension/context(exact match). Also, we need verify what context configured by the user is used.<br>
<br><br>Thanks again Anthony Minessale and Mathieu Parent, but the others options use timeout for connections, if we understand completely.<br><br><br><br><div class="gmail_quote">On Mon, Oct 11, 2010 at 5:44 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">We don't have a static monolithic dialplan like asterisk, there can be<br>
many dialplans or dynamic dialplans that reach out to external<br>
services.<br>
<br>
The proper way to implement overlap dialing on a per-protocol basis would be:<br>
<br>
1) Separate your native channel from the FreeSWITCH channel so you can<br>
create a FreeSWITCH session and attach the native channel.<br>
<br>
2) send the call to the configured dialplan and allow that dialplan<br>
module to work out it's own ambiguities and respond:<br>
<br>
SWITCH_CAUSE_INVALID_NUMBER_FORMAT or cause 28<br>
<br>
3) when you see this cause accept more digits and try again until you<br>
get some other cause code.<br>
<br>
<br>
This is how it's done in sip by doing an entire new call each time you<br>
need to dial more digits.<br>
<br>
<br>
<br>
The other way which we do in FreeTDM is to define 2 regex, one for<br>
anything that is valid and one for anything that is invalid and<br>
consult this regex on each digit until you know one way or another.<br>
<div><div></div><div><br>
<br>
<br>
<br>
<br>
<br>
On Mon, Oct 11, 2010 at 3:12 PM, Geovani Ricardo Wiedenhoft<br>
<<a href="mailto:grw.freeswitch@gmail.com" target="_blank">grw.freeswitch@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> We are completing development of the mod_khomp endpoint for Khomp boards:<br>
> - FXS<br>
> - FXO<br>
> - E1<br>
> - GSM (boards and usb devices)<br>
> - Passive record<br>
> - kommuter<br>
><br>
> However, we are constrained in our implementation. We needed to verify that<br>
> a given set of digits has a valid extension or if can wait for more digits<br>
> at some points of our code, without making the call.<br>
><br>
> In our implementation for Asterisk (our Khomp channel), we use the functions<br>
> provided by the Asterisk:<br>
><br>
> ##############################<br>
> ###############################################<br>
> ASTERISK:<br>
><br>
> /* \brief Looks for a valid matching extension */<br>
> - ast_canmatch_extension<br>
><br>
> /* \brief Looks to see if adding anything to this extension might match<br>
> something. (exists ^ canmatch) */<br>
> - ast_matchmore_extension<br>
> #############################################################################<br>
><br>
> Searching for a solution, we implemented within mod_khomp the reading and<br>
> checking functions of digits and expressions in XML, but our implementation<br>
> limits us to XML dialplans, which it would not be compatible if the user<br>
> need the database or other constructions of the dialplan.<br>
><br>
><br>
> So, I would like to know what is the possibility of similar functions to be<br>
> implemented in the core?<br>
><br>
><br>
><br>
><br>
><br>
><br>
> Thanks<br>
> :)<br>
><br>
><br>
><br>
><br>
> Geovani Ricardo Wiedenhoft<br>
><br>
</div></div>> _______________________________________________<br>
> FreeSWITCH-dev mailing list<br>
> <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
<br>
_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>
<br>_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>