VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
brian at freeswitch.org Guest
|
Posted: Sat Sep 20, 2008 10:59 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
I still need to know the output of "version" because you might be on one that has a bug in relation to this exact issue. If you can provide that or update to SVN trunk.
/b
On Sep 20, 2008, at 2:14 AM, Jon Bruel wrote:
Quote: |
Both suggestions work: If I include the effective_caller_id_number in the dialplan before bridging, or if I include {origination_caller_id_number=45161061} or [origination_caller_id_number=45161061] as a part of the first parameter after a originate command.
But skipping the “set” command in the dialplan, and trying to use:
<action application="bridge" data="[effective_caller_id_number=45161061]sofia/gateway/45161061/$1"/>
or:
<action application="bridge" data="[origination_caller_id_number=45161061]sofia/gateway/45161061/$1"/>
does not work. Same thing when using curled brackets.
I need to be able to pass parameters individually to each of the bridge destinations, not just for the A-number, but also for other stuff to be used for post processing of the call. An alternative would be to emulate the Asterisk chan_local by making some kind of loopback to the dialplan, using IAX or SIP, but this is a inelegant way of solving it.
Jon
_______________________________________________
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
http://www.freeswitch.org
|
|
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Sat Sep 20, 2008 11:13 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
On Sep 20, 2008, at 2:14 AM, Jon Bruel wrote:
Quote: |
Both suggestions work: If I include the effective_caller_id_number in the dialplan before bridging, or if I include {origination_caller_id_number=45161061} or [origination_caller_id_number=45161061] as a part of the first parameter after a originate command.
But skipping the “set” command in the dialplan, and trying to use:
<action application="bridge" data="[effective_caller_id_number=45161061]sofia/gateway/45161061/$1"/> |
This is because effective_caller_id_number has to be set on the A-Leg before you call bridge. This method won't work. You can only set origination caller id in that manner.
And this
<action application="bridge" data="[origination_caller_id_number=666666666]sofia/x.x.x.x/1001"/>
Works on the latest SVN trunk.
Quote: |
or:
<action application="bridge" data="[origination_caller_id_number=45161061]sofia/gateway/45161061/$1"/>
does not work. Same thing when using curled brackets.
I need to be able to pass parameters individually to each of the bridge destinations, not just for the A-number, but also for other stuff to be used for post processing of the call. An alternative would be to emulate the Asterisk chan_local by making some kind of loopback to the dialplan, using IAX or SIP, but this is a inelegant way of solving it. | chan_local is a hack and not needed. Once you learn how everything works you'll see why its not needed.
|
|
Back to top |
|
|
jbr at consiglia.dk Guest
|
Posted: Sun Sep 21, 2008 8:18 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
The FREESWITCH version is the 1.0.1 release version. I have updated to the snapshot from the 20th of September. But I get problems with the ./configure. The bootstrap.sh works OK after I have updated autoconf to version 2.63 and automake to version 1.10.1. The error from ./configure after half a page of lines is:
./configure: line 4693: syntax error near unexpected token `build_libtool_libs,'
./configure: line 4693: ` _LT_DECL(build_libtool_libs, enable_shared, 0,
Operating system is CentOS, uname –r = 2.6.9.-67.0.4.plus.c4.
Jon |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Sun Sep 21, 2008 11:43 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
Try automake 261
/b
On Sep 21, 2008, at 8:16 AM, Jon Bruel wrote:
|
|
Back to top |
|
|
jbr at consiglia.dk Guest
|
Posted: Tue Sep 23, 2008 2:35 pm Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
Resolved:
The problem has been solved after updating to the last trunk: 1.0.1, 9624.
The <action application="bridge" data="[origination_caller_id_number=45161061]sofia/gateway/45161061/$1"/> works, but it would be nice to be able to add more variables than this only one.
Jon |
|
Back to top |
|
|
mcollins at fcnetwork.com Guest
|
Posted: Tue Sep 23, 2008 2:53 pm Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
Jon,
Are you saying that you cannot pass a comma-separated list of variables like this?
<action application="bridge" data="[origination_caller_id_number=45161061,my_var1=blah,my_other_var=whatever]sofia/gateway/45161061/$1"/>
Note: no spaces!
-MC
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jon Bruel
Sent: Tuesday, September 23, 2008 12:32 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Possible problem in adding channel variablesto the bridge
Resolved:
The problem has been solved after updating to the last trunk: 1.0.1, 9624.
The <action application="bridge" data="[origination_caller_id_number=45161061]sofia/gateway/45161061/$1"/> works, but it would be nice to be able to add more variables than this only one.
Jon |
|
Back to top |
|
|
wasim at convergence.pk Guest
|
Posted: Tue Sep 23, 2008 2:59 pm Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
On Wed, Sep 24, 2008 at 1:50 AM, Michael Collins <mcollins@fcnetwork.com (mcollins@fcnetwork.com)> wrote:
Quote: |
Jon,
Are you saying that you cannot pass a comma-separated list of variables like this?
<action application="bridge" data="[origination_caller_id_number=45161061,my_var1=blah,my_other_var=whatever]sofia/gateway/45161061/$1"/>
Note: no spaces!
| can spaces be escaped or otherwise quoted '' or `` etc?
--
wasim h. baig | principal consultant | convergence pk | +92 300 8508070 | as you scope creep, so shall we reap ... |
|
Back to top |
|
|
jbr at consiglia.dk Guest
|
Posted: Tue Sep 23, 2008 4:56 pm Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
Well what I really should say is that adding many variables to the bridge data, such as this:
data="[origination_caller_id_number=45161061,my_var1=blah,my_other_var=w
hatever]sofia/gateway/45161061/$1"/>
would be very nice. My problem is that I cannot verify that the variables are passed by the info application in an execute_on_answer code done when the call has been answered. The variable is not defined at that stage? Is it lost? /Jon |
|
Back to top |
|
|
mcollins at fcnetwork.com Guest
|
Posted: Tue Sep 23, 2008 6:33 pm Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
Hmm… let me lab up this scenario and see if I can’t figure out what’s up.
-MC
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jon Bruel
Sent: Tuesday, September 23, 2008 2:55 PM
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Possible problem in adding channel variablesto the bridge
Well what I really should say is that adding many variables to the bridge data, such as this:
data="[origination_caller_id_number=45161061,my_var1=blah,my_other_var=w
hatever]sofia/gateway/45161061/$1"/>
would be very nice. My problem is that I cannot verify that the variables are passed by the info application in an execute_on_answer code done when the call has been answered. The variable is not defined at that stage? Is it lost? /Jon |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Tue Sep 23, 2008 6:54 pm Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
if the variables are in [foo=bar,baz=blah] they will be set on the channel that wins in a forked dial scenario
On Tue, Sep 23, 2008 at 6:30 PM, Michael Collins <mcollins@fcnetwork.com (mcollins@fcnetwork.com)> wrote:
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
jbr at consiglia.dk Guest
|
Posted: Wed Sep 24, 2008 5:54 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
For a test, I have used the following show sample dialstring:
<extension name="Local_Extension">
<condition field="destination_number" expression="(10[01][0-9])$">
<action application="set" data="custid=100001210"/>
<action application="set" data="dialed_ext=$1"/>
<action application="set" data="caller_domain=10.3.1.11"/>
<action application="export" data="execute_on_answer=execute_extension ONANSWER XML default"/>
<action application="export" data="execute_on_ring=execute_extension ONRING XML default"/>
<action application="bridge" data="[NEWVARIABLE=AAABBBCCC]user/${custid}${dialed_ext}@${caller_domain}"/>
</condition>
</extension>
<extension name="Call_Answered">
<condition field="destination_number" expression="^ONANSWER$">
<action application="set" data="On_Answer_Is_It_Then_Passed=${NEWVARIABLE}"/>
<action application="info"/>
</condition>
</extension>
<extension name="Ringing">
<condition field="destination_number" expression="^ONRING$">
<action application="set" data="Ringing_Is_It_Then_Passed=${NEWVARIABLE}"/>
</condition>
</extension>
The two extensions Call_Answered and Ringing are just test extensions to check if the variable NEWVARIABLE has been passed. If I just make normal call, it is not passed on. Using export for the execute_on_answer, the code runs twice. I have tried other “execute_on_XXX” but I can’t see the new variable. Again this may be related to my lack of understanding the fundamentals of FS. /Jon |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Wed Sep 24, 2008 8:21 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
The FS dialplan is not run like a script interpreter like it is in asterisk.
when the dialplan is parsed only variables that are already set before the call hit the dialplan are available for the regex
it makes 1 giant pass into all the extensions and for all the things that match, the actions are appended to the list of instructions
no variables are passed or actually set, all of the xml is parsed, then the call goes to the execute state where the variables are expanded.
if you need to have a subsequent action be based on variables set from the dialplan, you need to transfer or execute exten in the list of instructions so you can go back to the dialplan with the new varianbles set.
see: http://wiki.freeswitch.org/wiki/Dialplan
On Wed, Sep 24, 2008 at 5:52 AM, Jon Bruel <jbr@consiglia.dk (jbr@consiglia.dk)> wrote:
Quote: |
For a test, I have used the following show sample dialstring:
<extension name="Local_Extension">
<condition field="destination_number" expression="(10[01][0-9])$">
<action application="set" data="custid=100001210"/>
<action application="set" data="dialed_ext=$1"/>
<action application="set" data="caller_domain=10.3.1.11"/>
<action application="export" data="execute_on_answer=execute_extension ONANSWER XML default"/>
<action application="export" data="execute_on_ring=execute_extension ONRING XML default"/>
<action application="bridge" data="[NEWVARIABLE=AAABBBCCC]user/${custid}${dialed_ext}@${caller_domain}"/>
</condition>
</extension>
<extension name="Call_Answered">
<condition field="destination_number" expression="^ONANSWER$">
<action application="set" data="On_Answer_Is_It_Then_Passed=${NEWVARIABLE}"/>
<action application="info"/>
</condition>
</extension>
<extension name="Ringing">
<condition field="destination_number" expression="^ONRING$">
<action application="set" data="Ringing_Is_It_Then_Passed=${NEWVARIABLE}"/>
</condition>
</extension>
The two extensions Call_Answered and Ringing are just test extensions to check if the variable NEWVARIABLE has been passed. If I just make normal call, it is not passed on. Using export for the execute_on_answer, the code runs twice. I have tried other "execute_on_XXX" but I can't see the new variable. Again this may be related to my lack of understanding the fundamentals of FS. /Jon
_______________________________________________
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
http://www.freeswitch.org
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
jbr at consiglia.dk Guest
|
Posted: Thu Sep 25, 2008 3:42 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
Thanks Anthony. I have been confused because of the semantics: execute_on_anwer implies that the code pointed at is re-executed. Anyhow, including the application execute_extension in the ONANSWER-code, helps but not every time: In 20-30% of all the instances, the variable is passed on to the b-leg part of the ONANSWER. In other cases the variable is still undefined.
When the b-leg of the ONANSWER runs before the a-leg part, it is undefined, and vice versa. The code executed by execute_extension is:
<?xml version="1.0" encoding="utf-8"?>
<include>
<context name="onanswer">
<extension name="Call_Answered">
<condition field="destination_number" expression="^ONANSWER$">
</condition>
<condition field="${leg}" expression="^a$">
<action application="info"/>
<!-- We are in the b-leg-->
<anti-action application="set" data="On_Answer_Is_It_Then_Passed=${NEWVARIABLE}"/>
<anti-action application="info"/>
</condition>
</extension>
</context>
</include>
Jon |
|
Back to top |
|
|
jbr at consiglia.dk Guest
|
Posted: Thu Sep 25, 2008 4:56 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
I have made some further testing, and even without an “execute_on_answer” in the ONANSWER-code, the variable set in the dialstring appears now and then. And it only happens, when the ONANSWER code for the a-leg is executed first. On my system, this happens in 30-50% of the tests. If I move the ONANSWER code to another file, where this is the only condition, it does not work, but entering some dummy conditions before, makes it work now and then. So this may be a concurrency issue?
Jon |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Thu Sep 25, 2008 10:31 am Post subject: [Freeswitch-users] Possible problem in adding channel variab |
|
|
I have no idea what you are trying to do here......
Can you explain it in detail?
Please try to look at this from the angle that you are not understanding the concept of how the software works and not that the software does not work. With that mentality you will have little chance for success.
perhaps you can just explain what you want to be able to do and we can show you the correct way to do it.
On Thu, Sep 25, 2008 at 3:39 AM, Jon Bruel <jbr@consiglia.dk (jbr@consiglia.dk)> wrote:
Quote: |
Thanks Anthony. I have been confused because of the semantics: execute_on_anwer implies that the code pointed at is re-executed. Anyhow, including the application execute_extension in the ONANSWER-code, helps but not every time: In 20-30% of all the instances, the variable is passed on to the b-leg part of the ONANSWER. In other cases the variable is still undefined.
When the b-leg of the ONANSWER runs before the a-leg part, it is undefined, and vice versa. The code executed by execute_extension is:
<?xml version="1.0" encoding="utf-8"?>
<include>
<context name="onanswer">
<extension name="Call_Answered">
<condition field="destination_number" expression="^ONANSWER$">
</condition>
<condition field="${leg}" expression="^a$">
<action application="info"/>
<!-- We are in the b-leg-->
<anti-action application="set" data="On_Answer_Is_It_Then_Passed=${NEWVARIABLE}"/>
<anti-action application="info"/>
</condition>
</extension>
</context>
</include>
Jon
_______________________________________________
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
http://www.freeswitch.org
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
|
|
|
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
|