[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeswitch-users
Subject:    Re: [Freeswitch-users] Dialplan conditions
From:       Raúl_Alexis_Betancor_Santana <rbetancor () gmail ! com>
Date:       2017-05-18 15:16:02
Message-ID: CAKsfQBjn5bR-SaqNRhsZD0Us00249Hb4HxK6HQx_X-A_VcMQsg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Could do it, if you have a completion plugging for the syntax file ...

2017-05-18 15:45 GMT+01:00 Joel Serrano <joel@gogii.net>:

> Arrrrg, I see a typo more than a syntax problem... Does sublime have typo
> checkers? :P
>
> On Thu, May 18, 2017 at 7:41 AM, Raúl Alexis Betancor Santana <
> rbetancor@gmail.com> wrote:
>
>> I'll need to add the syntax check to my sublime editor
>>
>> 2017-05-18 15:41 GMT+01:00 Raúl Alexis Betancor Santana <
>> rbetancor@gmail.com>:
>>
>>> :-P
>>>
>>> 2017-05-18 15:38 GMT+01:00 David Villasmil <
>>> david.villasmil.work@gmail.com>:
>>>
>>>> "expression" is with 2 "s"... and that works for me
>>>> ᐧ
>>>>
>>>> Regards,
>>>>
>>>> David Villasmil
>>>> email: david.villasmil.work@gmail.com
>>>> phone: +34669448337 <+34%20669%2044%2083%2037>
>>>>
>>>> On Thu, May 18, 2017 at 12:01 PM, Raúl Alexis Betancor Santana <
>>>> rbetancor@gmail.com> wrote:
>>>>
>>>>>
>>>>> Now that I have solved the problem of loading the dialplan from the
>>>>> xml files ... I get to the point that it doesn't work as I expect.
>>>>>
>>>>> This is the only extension defined:
>>>>>
>>>>> <context name="default">
>>>>>  <extension name="t38_transcode">
>>>>>   <condition field="sip_h_X-T38-Transcode" expresion="^True"/>
>>>>>   <condition field="destination_number" expresion="^(\+1|1)([2-9]\d\d[2-9]\d{6})$">
>>>>>
>>>>>     <action application="set" data="fax_enable_t38=true"/>
>>>>>     <action application="set" data="sip_execute_on_image=t38_gateway
>>>>> peer nocng"/>
>>>>>     <action application="bridge" data="sofia/external/$1$2@proxy.server.tld"/>
>>>>>
>>>>>   </condition>
>>>>>  </extension>
>>>>> </context>
>>>>>
>>>>> I expect not to call the bridge app if there is no T38-Transcode
>>>>> header on the incoming INVITE request and if it is present ... that $1$2
>>>>> will be filled ... but what I get on the traces is that any call fires the
>>>>> call to the bridge app and also that the dialled number is exactly $1$2 ...
>>>>> instead of the values they should have.
>>>>> I'm loading a minimal setup of modules, did I need to load someother
>>>>> one to get the conditions and the expresions to work on this simple
>>>>> dialplan?
>>>>>
>>>>> My modules.conf.xml file:
>>>>>
>>>>> <configuration name="modules.conf" description="Modules">
>>>>>  <modules>
>>>>>
>>>>>    <load module="mod_syslog"/>
>>>>>    <load module="mod_logfile"/>
>>>>>
>>>>>    <load module="mod_event_socket"/>
>>>>>    <load module="mod_sofia"/>
>>>>>    <load module="mod_commands"/>
>>>>>    <load module="mod_dptools"/>
>>>>>    <load module="mod_spandsp"/>
>>>>>    <load module="mod_tone_stream"/>
>>>>>    <load module="mod_db"/>
>>>>>    <load module="mod_xml_rpc"/>
>>>>>    <load module="mod_expr"/>
>>>>>    <load module="mod_dialplan_xml"/>
>>>>>
>>>>>  </modules>
>>>>> </configuration>
>>>>>
>>>>> Best regards
>>>>>
>>>>>
>>>>> ____________________________________________________________
>>>>> _____________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting@freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users@lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>>> switch-users
>>>>> http://www.freeswitch.org
>>>>>
>>>>
>>>>
>>>> ____________________________________________________________
>>>> _____________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting@freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users@lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>> switch-users
>>>> http://www.freeswitch.org
>>>>
>>>
>>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting@freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users@lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting@freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>

[Attachment #5 (text/html)]

<div dir="ltr">Could do it, if you have a completion plugging for the syntax file \
...</div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-18 15:45 \
GMT+01:00 Joel Serrano <span dir="ltr">&lt;<a href="mailto:joel@gogii.net" \
target="_blank">joel@gogii.net</a>&gt;</span>:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
dir="ltr">Arrrrg, I see a typo more than a syntax problem... Does sublime have typo \
checkers? :P</div><div class="HOEnZb"><div class="h5"><div \
class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 7:41 AM, \
Raúl Alexis Betancor Santana <span dir="ltr">&lt;<a \
href="mailto:rbetancor@gmail.com" target="_blank">rbetancor@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr">I&#39;ll need to add the syntax check to \
my sublime editor</div><div class="m_6212197158727031347HOEnZb"><div \
class="m_6212197158727031347h5"><div class="gmail_extra"><br><div \
class="gmail_quote">2017-05-18 15:41 GMT+01:00 Raúl Alexis Betancor Santana <span \
dir="ltr">&lt;<a href="mailto:rbetancor@gmail.com" \
target="_blank">rbetancor@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">:-P</div><div \
class="m_6212197158727031347m_-4414976259887545711HOEnZb"><div \
class="m_6212197158727031347m_-4414976259887545711h5"><div \
class="gmail_extra"><br><div class="gmail_quote">2017-05-18 15:38 GMT+01:00 David \
Villasmil <span dir="ltr">&lt;<a href="mailto:david.villasmil.work@gmail.com" \
target="_blank">david.villasmil.work@gmail.co<wbr>m</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">&quot;expression&quot; is with 2 \
&quot;s&quot;... and that works for me</div><div hspace="streak-pt-mark" \
style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" \
src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&amp;type=zerocontent&amp;guid=7f86afc1-b78a-44ab-b1b5-d08e9ab664f0"><font \
color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><span><br \
clear="all"><div><div \
class="m_6212197158727031347m_-4414976259887545711m_1982983058766097141m_2820498065570201706gmail_signature" \
data-smartmail="gmail_signature"><div \
dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a \
href="mailto:david.villasmil.work@gmail.com" \
target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: <a \
href="tel:+34%20669%2044%2083%2037" value="+34669448337" \
target="_blank">+34669448337</a></div></div></div></div> <br></span><div \
class="gmail_quote"><span>On Thu, May 18, 2017 at 12:01 PM, Raúl Alexis Betancor \
Santana <span dir="ltr">&lt;<a href="mailto:rbetancor@gmail.com" \
target="_blank">rbetancor@gmail.com</a>&gt;</span> wrote:<br></span><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div \
class="m_6212197158727031347m_-4414976259887545711m_1982983058766097141h5"><div \
dir="ltr"><br><div>Now that I have solved the problem of loading the dialplan from \
the xml files ... I get to the point that it doesn&#39;t work as I \
expect.</div><div><br></div><div>This is the only extension \
defined:</div><div><br></div><div><span style="font-family:monospace"><span \
style="color:rgb(0,0,0)">&lt;context name=&quot;default&quot;&gt; </span><br>   \
&lt;extension name=&quot;t38_transcode&quot;&gt; <br>     &lt;condition \
field=&quot;sip_h_X-T38-Transcode&quot; expresion=&quot;^True&quot;/&gt; <br>     \
&lt;condition field=&quot;destination_number&quot; \
expresion=&quot;^(\+1|1)([2-9]\d\d[<wbr>2-9]\d{6})$&quot;&gt; <br>         &lt;action \
application=&quot;set&quot; data=&quot;fax_enable_t38=true&quot;/&gt; <br>         \
&lt;action application=&quot;set&quot; \
data=&quot;sip_execute_on_image=t38<wbr>_gateway peer nocng&quot;/&gt; <br>         \
&lt;action application=&quot;bridge&quot; \
data=&quot;sofia/external/$1$2@prox<wbr>y.server.tld&quot;/&gt; <br>     \
&lt;/condition&gt; <br>   &lt;/extension&gt;
<br>&lt;/context&gt;<br></span></div><div><br></div><div>I expect not to call the \
bridge app if there is no T38-Transcode header on the incoming INVITE request and if \
it is present ... that $1$2 will be filled ... but what I get on the traces is that \
any call fires the call to the bridge app and also that the dialled number is exactly \
$1$2 ... instead of the values they should have.</div><div>I&#39;m loading a minimal \
setup of modules, did I need to load someother one to get the conditions and the \
expresions to work on this simple dialplan?</div><div><br></div><div>My \
modules.conf.xml file:</div><div><br></div><div><span \
style="font-family:monospace"><span style="color:rgb(0,0,0)">&lt;configuration \
name=&quot;modules.conf&quot; description=&quot;Modules&quot;&gt; </span><br>   \
&lt;modules&gt; <br>
<br>       &lt;load module=&quot;mod_syslog&quot;/&gt;
<br>       &lt;load module=&quot;mod_logfile&quot;/&gt;
<br>
<br>       &lt;load module=&quot;mod_event_socket&quot;/&gt;
<br>       &lt;load module=&quot;mod_sofia&quot;/&gt;
<br>       &lt;load module=&quot;mod_commands&quot;/&gt;
<br>       &lt;load module=&quot;mod_dptools&quot;/&gt;
<br>       &lt;load module=&quot;mod_spandsp&quot;/&gt;
<br>       &lt;load module=&quot;mod_tone_stream&quot;/&gt;
<br>       &lt;load module=&quot;mod_db&quot;/&gt;
<br>       &lt;load module=&quot;mod_xml_rpc&quot;/&gt;
<br>       &lt;load module=&quot;mod_expr&quot;/&gt;
<br>       &lt;load module=&quot;mod_dialplan_xml&quot;/&gt;
<br>
<br>   &lt;/modules&gt;
<br>&lt;/configuration&gt;</span></div><div><span \
style="font-family:monospace"><br></span></div><div><span \
style="font-family:monospace">Best regards<br> <br></span></div></div>
<br></div></div><span>______________________________<wbr>______________________________<wbr>_____________<br>
 Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" \
target="_blank">consulting@freeswitch.org</a><br> <a \
href="http://www.freeswitchsolutions.com" rel="noreferrer" \
target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br> <br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br> <a \
href="http://confluence.freeswitch.org" rel="noreferrer" \
target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br> <a \
href="http://www.cluecon.com" rel="noreferrer" \
target="_blank">http://www.cluecon.com</a><br> <br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" \
target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br> <a \
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" \
target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
 UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" \
rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
 <a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br></span></blockquote></div><br></div> \
<br>______________________________<wbr>______________________________<wbr>_____________<br>
 Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" \
target="_blank">consulting@freeswitch.org</a><br> <a \
href="http://www.freeswitchsolutions.com" rel="noreferrer" \
target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br> <br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br> <a \
href="http://confluence.freeswitch.org" rel="noreferrer" \
target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br> <a \
href="http://www.cluecon.com" rel="noreferrer" \
target="_blank">http://www.cluecon.com</a><br> <br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" \
target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br> <a \
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" \
target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
 UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" \
rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
 <a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div> \
</div></div></blockquote></div><br></div> \
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
 Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" \
target="_blank">consulting@freeswitch.org</a><br> <a \
href="http://www.freeswitchsolutions.com" rel="noreferrer" \
target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br> <br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br> <a \
href="http://confluence.freeswitch.org" rel="noreferrer" \
target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br> <a \
href="http://www.cluecon.com" rel="noreferrer" \
target="_blank">http://www.cluecon.com</a><br> <br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" \
target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br> <a \
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" \
target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
 UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" \
rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
 <a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div> \
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
 Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" \
target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br> <br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br> <a \
href="http://confluence.freeswitch.org" rel="noreferrer" \
target="_blank">http://confluence.freeswitch.<wbr>org</a><br> <a \
href="http://www.cluecon.com" rel="noreferrer" \
target="_blank">http://www.cluecon.com</a><br> <br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
 <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" \
rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
 UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" \
rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
 <a href="http://www.freeswitch.org" rel="noreferrer" \
target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>



_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic