Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Dialplan not matching


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
david.villasmil.work a...
Guest





PostPosted: Tue Sep 21, 2021 2:34 pm    Post subject: [Freeswitch-users] Dialplan not matching Reply with quote

Hello all,

I have the following condition:


<action application="log" data="ERR UUID: ${uuid} = ${conference_name}"/>
<condition field="${cond(${uuid} == ${conference_name} ? YES : NO)}" expression="^YES$">



The log properly prints both variables:


mod_dptools.c:1879 UUID: 7d736b08-212b-4ac2-abb3-a5e738306fb5 = 7d736b08-212b-4ac2-abb3-a5e738306fb5



they're exactly the same, and still condition function fails:


Regex (FAIL) [conf_destination_recur_1] ${cond(${uuid} == ${conference_name} ? YES : NO)}(-ERR) =~ /^YES$/ break=on-false



I also tried a simple condition like


<condition field="${uuid}" expression="${conference_name}">



and still no match...
Ideas?


Thanks guys


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
Back to top
krice at freeswitch.org
Guest





PostPosted: Tue Sep 21, 2021 4:14 pm    Post subject: [Freeswitch-users] Dialplan not matching Reply with quote

David,
Don’t forget variables are expanded before the dialplan processing beings.

So for example

<action application=”set” data=”somevar=foo”/>
<action application=”bridge” data=”${somevar}”/>

This will fail as ${somevar} wasn’t set yet to be expanded. You can kinda shortcut this with setting inline=”true” where the vars are set or after all your vars are set  <action application=”transfer” data=”extension_number XML context”/> to make things reset and re-expand all the vars.

Not sure if that’s whats happening here, but the lack of a complete dialplan or extension makes me wonder.

K

From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> On Behalf Of David Villasmil
Sent: Tuesday, September 21, 2021 1:51 PM
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Subject: [Freeswitch-users] Dialplan not matching


Hello all,


I have the following condition:



<action application="log" data="ERR UUID: ${uuid} = ${conference_name}"/>
<condition field="${cond(${uuid} == ${conference_name} ? YES : NO)}" expression="^YES$">



The log properly prints both variables:



mod_dptools.c:1879 UUID: 7d736b08-212b-4ac2-abb3-a5e738306fb5 = 7d736b08-212b-4ac2-abb3-a5e738306fb5



they're exactly the same, and still condition function fails:



Regex (FAIL) [conf_destination_recur_1] ${cond(${uuid} == ${conference_name} ? YES : NO)}(-ERR) =~ /^YES$/ break=on-false



I also tried a simple condition like



<condition field="${uuid}" expression="${conference_name}">



and still no match...


Ideas?



Thanks guys



David Villasmil
email: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)

phone: +34669448337
Back to top
david.villasmil.work a...
Guest





PostPosted: Tue Sep 21, 2021 7:43 pm    Post subject: [Freeswitch-users] Dialplan not matching Reply with quote

Thanks Ken;


I already tried inline’ning it, but I’ve tried so many different thing I might’ve done it wrong somehow, will try that again.
That’s a good trick transferring it to the same extension after all the cars are set, I’ve never thought of that, will also see what that does.


Thanks!


David

On Tue, 21 Sep 2021 at 22:12, <krice@freeswitch.org (krice@freeswitch.org)> wrote:

Quote:

David,
Don’t forget variables are expanded before the dialplan processing beings.
 
So for example
 
<action application=”set” data=”somevar=foo”/>
<action application=”bridge” data=”${somevar}”/>
 
This will fail as ${somevar} wasn’t set yet to be expanded. You can kinda shortcut this with setting inline=”true” where the vars are set or after all your vars are set  <action application=”transfer” data=”extension_number XML context”/> to make things reset and re-expand all the vars.
 
Not sure if that’s whats happening here, but the lack of a complete dialplan or extension makes me wonder.
 
K


 
From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)> On Behalf Of David Villasmil
Sent: Tuesday, September 21, 2021 1:51 PM
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: [Freeswitch-users] Dialplan not matching

 
Hello all,
 

I have the following condition:

 

<action application="log" data="ERR UUID: ${uuid} = ${conference_name}"/>
<condition field="${cond(${uuid} == ${conference_name} ? YES : NO)}" expression="^YES$">

 

The log properly prints both variables:

 

mod_dptools.c:1879 UUID: 7d736b08-212b-4ac2-abb3-a5e738306fb5 = 7d736b08-212b-4ac2-abb3-a5e738306fb5

 

they're exactly the same, and still condition function fails:

 

Regex (FAIL) [conf_destination_recur_1] ${cond(${uuid} == ${conference_name} ? YES : NO)}(-ERR) =~ /^YES$/ break=on-false

 

I also tried a simple condition like

 

<condition field="${uuid}" expression="${conference_name}">

 

and still no match...


Ideas?

 

Thanks guys

 

David Villasmil
email: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)

phone: +34669448337









_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
Back to top
brian at freeswitch.com
Guest





PostPosted: Tue Sep 21, 2021 9:02 pm    Post subject: [Freeswitch-users] Dialplan not matching Reply with quote

Your cond usage is wrong, notice -ERR, try it at fs_cli till it works.. you're going to have to quote those responses at the end If I recall correctly.

/b

On Tue, Sep 21, 2021 at 7:45 PM David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)> wrote:

Quote:
Thanks Ken;


I already tried inline’ning it, but I’ve tried so many different thing I might’ve done it wrong somehow, will try that again.
That’s a good trick transferring it to the same extension after all the cars are set, I’ve never thought of that, will also see what that does.


Thanks!


David

On Tue, 21 Sep 2021 at 22:12, <krice@freeswitch.org (krice@freeswitch.org)> wrote:

Quote:

David,
Don’t forget variables are expanded before the dialplan processing beings.
 
So for example
 
<action application=”set” data=”somevar=foo”/>
<action application=”bridge” data=”${somevar}”/>
 
This will fail as ${somevar} wasn’t set yet to be expanded. You can kinda shortcut this with setting inline=”true” where the vars are set or after all your vars are set  <action application=”transfer” data=”extension_number XML context”/> to make things reset and re-expand all the vars.
 
Not sure if that’s whats happening here, but the lack of a complete dialplan or extension makes me wonder.
 
K


 
From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)> On Behalf Of David Villasmil
Sent: Tuesday, September 21, 2021 1:51 PM
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: [Freeswitch-users] Dialplan not matching

 
Hello all,
 

I have the following condition:

 

<action application="log" data="ERR UUID: ${uuid} = ${conference_name}"/>
<condition field="${cond(${uuid} == ${conference_name} ? YES : NO)}" expression="^YES$">

 

The log properly prints both variables:

 

mod_dptools.c:1879 UUID: 7d736b08-212b-4ac2-abb3-a5e738306fb5 = 7d736b08-212b-4ac2-abb3-a5e738306fb5

 

they're exactly the same, and still condition function fails:

 

Regex (FAIL) [conf_destination_recur_1] ${cond(${uuid} == ${conference_name} ? YES : NO)}(-ERR) =~ /^YES$/ break=on-false

 

I also tried a simple condition like

 

<condition field="${uuid}" expression="${conference_name}">

 

and still no match...


Ideas?

 

Thanks guys

 

David Villasmil
email: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)

phone: +34669448337









_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com



--



Brian West | Co-founder and Developer
Need Commercial support? email sales@freeswitch.com (sales@freeswitch.com)
FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
Email: brian@freeswitch.com (brian@freeswitch.com)
Mobile: 918-424-9378
Website: https://www.FreeSWITCH.com
[/url] [url=https://twitter.com/freeswitch]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services