On Fri, Sep 10, 2010 at 5:27 AM, Nigel Kent <ktngl@yahoo.co.uk> wrote:
Hi

I am not clear when you say api version because I am calling lcr through the esl @con.execute method, do you mean when used from event socket. 

API version is the version that is used via event socket and is what you get when called from the fs_cli or console.  
 
 
If that is the case then I think I would need to look into the as xml option because I am doing everthing from event socket.

Right.
 
What is does 'default' set and which module is needed to handle xml because I have not used xml for any other part of my code

lcr 15555551212 default as xml

the "default" is the lcr profile you are using.  If you don't specify one then default is the profile used.  However, in order to specify "as xml" a profile name must be specified.  In this case I suggested default.

As for module to process the xml, that depends on what language you are using on the client side, no?
 


--- On Thu, 9/9/10, Rupa Schomaker <rupa@rupa.com> wrote:

From: Rupa Schomaker <rupa@rupa.com>
Subject: Re: [Freeswitch-users] get lcr channel variable from esl
To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org>
Date: Thursday, 9 September, 2010, 23:21


The api version of mod_lcr doesn't give you lcr_auto_route.  You can do

lcr 15555551212 default as xml

and get the lcr info as xml which can then be parsed on the client side.  To build the equivalent of lcr_auto_route you can concatenate all the dialstrings separated by "|".

I'd suggest transfering to the lcr/ endpoint instead.

lcr/15555551212

The only way to get the channel var set is to use the application version of lcr.  

On Thu, Sep 9, 2010 at 2:49 PM, Nigel Kent <ktngl@yahoo.co.uk> wrote:
I have used mod_lcr application in my esl script, digits are passed to mod_lcr and a dial string is found successfully as seen on the debug log.

My question is how do I acces the variable  ${lcr_auto_route} from esl.

Previously in my script I have used this method to get variables which was set earlier in the script

@con.api("uuid_getvar", "#{@uuid} myvarible").getBody

However this is not working for lcr_auto_route. If I do@con.api("uuid_getvar", "#{@uuid} lcr_auto_route").getBody I get a _undef_ error


--
-Rupa