Hi Avi,

I can set different rates on A and B fine normally but the B-leg rate needs to be different depending on which of the two endpoints picks up the call, which is what makes things difficult and why I tried the square bracket notation.



On 1 December 2013 03:48, Avi Marcus <avi@avimarcus.net> wrote:

Did you set nibble account on the b leg? Both vars are required I believe.

<variable name="nibble_rate" value="0.03"/>
<variable name="nibble_account" value="18238"/>

-Avi

On Dec 1, 2013 12:11 AM, "Andrew Cassidy" <andrew@cassidywebservices.co.uk> wrote:
So this is starting to get complicated and it looks like I might have to write some lua to do this...

So, say I want to bridge a freephone number to both a landline and a mobile in parallel. All 3 potential legs need different call rates, only 2 will be used when the call is picked up, of course, and I ideally need the CDR and cost for each leg separate. Here's an idea of what I have so far:

<action application="set" data="nibble_rate=0.01" />
<action application="bridge" data="[nibble_rate=0.01]sofia/gateway/x/landline,[nibble_rate=0.06]sofia/gateway/x/mobile" />

This doesn't work, and neither does setting the variables nolocal.

Can this be done in this way?

I can probably work around this by exporting the incoming rate as nolocal and the outgoing rate on the incoming channel. Confusing but might actually work.

--
Andrew Cassidy BSc (Hons) MBCS SSCA

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

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.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

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.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




--
Andrew Cassidy BSc (Hons) MBCS SSCA
Managing Director


T 03300 100 960  F 03300 100 961
E andrew@cassidywebservices.co.uk
W www.cassidywebservices.co.uk