[Freeswitch-users] get lcr channel variable from esl

Nigel Kent ktngl at yahoo.co.uk
Fri Sep 10 15:54:18 PDT 2010


My code is set to receiving events as type plain. Changing the event type to xml makes the existing code not work . Is there a way  I can use lcr with is scenario?

--- On Fri, 10/9/10, Rupa Schomaker <rupa at rupa.com> wrote:

From: Rupa Schomaker <rupa at rupa.com>
Subject: Re: [Freeswitch-users] get lcr channel variable from esl
To: "FreeSWITCH Users Help" <freeswitch-users at lists.freeswitch.org>
Date: Friday, 10 September, 2010, 13:13

It is streamed to you over ESL.

On Fri, Sep 10, 2010 at 6:54 AM, Nigel Kent <ktngl at yahoo.co.uk> wrote:

thanks
I meant how does Freeswitch save "as xml" data and what is the way to access it


--- On Fri, 10/9/10, Rupa Schomaker <rupa at rupa.com> wrote:


From: Rupa Schomaker <rupa at rupa.com>
Subject: Re: [Freeswitch-users] get lcr channel variable from esl
To: "FreeSWITCH Users Help" <freeswitch-users at lists.freeswitch.org>

Date: Friday, 10 September, 2010, 11:19



On Fri, Sep 10, 2010 at 5:27 AM, Nigel Kent <ktngl at 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 at rupa.com> wrote:



From: Rupa Schomaker <rupa at rupa.com>

Subject: Re:
 [Freeswitch-users] get lcr channel variable from esl
To: "FreeSWITCH Users Help" <freeswitch-users at 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 at 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 at con.api("uuid_getvar", "#{@uuid} lcr_auto_route").getBody I get a _undef_ error




-- 
-Rupa


-----Inline Attachment Follows-----

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org

http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users

http://www.freeswitch.org





      
_______________________________________________

FreeSWITCH-users mailing list

FreeSWITCH-users at lists.freeswitch.org

http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users

http://www.freeswitch.org





-- 
-Rupa


-----Inline Attachment Follows-----

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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100910/d6430ac2/attachment.html 


More information about the FreeSWITCH-users mailing list