Ah - be careful. The "database" is not the entire picture. When you do show channels or show calls it pulls right from some sqlite3 tables that are frequently updated by FreeSWITCH. You have a few choices depending upon just how intense your monitoring will be:
#1 - Follow Steven's advice and monitor CHANNEL events on the event socket
#2 - Use some form of polling and "uuid_getvar <uuid> sip_gateway_name" to get the name for each channel
#3 - Modify the source code to store the sip_gateway_name in the same table that stores the rest of the show channels/show calls information. (Most people don't realize that you can do this. :)
Personally I like event socket/ESL so I would go with #1 first.
-MC
Actually my purpose is just to monitor live calls . All is going fine but if database is not storing the channel variable how its coming as in field " ip_addr" ? b_ip_addr is just getting the same value while it should be having Other leg . there is another field b_dest that is also showing correct value. Why not for b_ip_addr then ?yesterday i was searching old threads and somewhere Anthony replied to similar Question that it has to be updated in db . But how to do that nowhere mentioned .On Tue, Dec 18, 2012 at 5:16 AM, Steven Ayre <steveayre@gmail.com> wrote:On 17 December 2012 23:20, Ahmed Sboor <ahmed@netelsat.net> wrote:
Hi,i tried dump and variable_sip_to_host is the variable which tells me what i am looking for, And now question is how to get value of this variable in b_ip_addr while doing show calls as xml ?On Tue, Dec 18, 2012 at 3:43 AM, Michael Collins <msc@freeswitch.org> wrote:Get a call up and running and then do a uuid_dump of the a leg. I think you'll find that there are some channel variables that get set. I don't recall them off the top of my head but look for something like sip_gateway or sip_gateway_name.
-MCOn Mon, Dec 17, 2012 at 1:15 PM, Ahmed Sboor <ahmed@netelsat.net> wrote:
_________________________________________________________________________Hi All,i am trying to see information like show calls or show channels .only confusion is wrong/missing information in b_name and b_ip_addr .these both are taken from a leg while here i was expecting to see call is connected to which gateway.i am having like : <b_name>sofia/external/919123123334</b_name>Means there is no "gateway name mentioned in b_name.and in b_ip_addr its like :<b_ip_addr>10.10.10.1</b_ip_addr>while this is ip call is coming from and b leg i was expecting as ip of gateway call is going to.Please let me know if i am missing something.usring FreeSWITCH Version 1.2.5.3+git~20121206T171012Z~d74bef3f2f (git d74bef3 2012-12-06 17:10:12Z)Thanking youAhmed
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
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.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
_________________________________________________________________________
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