[Freeswitch-users] Custom Columns into MySQL Channels table

Luis Daniel Lucio Quiroz luis.daniel.lucio at gmail.com
Mon Jan 19 17:11:43 MSK 2015


Ken, I dont suggest in all my answers to install FUsion. But when it
is useful i do.

Jack. Download the fusion and review the file named:
v_xml_cdr_import.php  you will find there is a code that use the
variables lcr_*

those variables are pushed with an export using dialplans.  You will
figure out how to do your own code.

LD
Luis Daniel Lucio Quiroz
CISSP, CISM, CISA
Linux, VoIP and much more fun
www.okay.com.mx

Need LCR? Check out LCR for FusionPBX with FreeSWITCH
Need Billing? Check out Billing for FusionPBX with FreeSWITCH


2015-01-18 14:43 GMT-05:00 Ken Rice <krice at freeswitch.org>:
> Do not overwrite anything in there, its likely there for a reason... But adding a second table with the uuid is fine also keep in mind that if you use the channels table at master source you can clean our everything left over in the custom table every 5 minutes to reduce load on the db
>
> Sent from my iPhone
>
>> On Jan 18, 2015, at 1:28 PM, Jack Cortez <mvar78 at gmail.com> wrote:
>>
>> Hi Ken!
>> I'm making some tests and it could be a good idea to create my personal channel table.
>>
>> However, in my tests I'm using a lua script to insert a new record in my table when call start with uuid as key, and delete the record at the end of the call, but I was thinking that is should be better to use the native channel table (that is better managed by FS itself) as I have to use a lua script for this task.
>> Instead I can even use some custom variables that could be set into the XML dialplan, right?
>>
>> So, do you believe it's possible to overwrite for example context or dialplan columns with my custom values?
>> I am suggesting context and dialplan as I found that on channels table they contain same value dialplan=XML and context=router and in my opinion they can be replaced with some more interested value
>>
>>
>> Otherwise the only way it's really use a script and insert/update/delete calls into my new custom channels table.
>>
>> Thank you!
>>
>>
>>
>>
>>
>>> Il giorno 18/gen/2015, alle ore 18:18, Ken Rice ha scritto:
>>>
>>> You could possibly do that and not cause problems, but better would be create another table that has your custome datat in it and you can key with the channel's uuid
>>>
>>> Sent from my iPhone
>>>
>>>> On Jan 18, 2015, at 4:59 AM, Jack Cortez <mvar78 at gmail.com> wrote:
>>>>
>>>> Hi,
>>>> I would like to add a column to channel table (created by FS automatically using ODBC) and populate this new columns with my own custom value.
>>>> Is this possible?
>>>>
>>>> In particular, as I'm creating a simple PHP page to show active calls, what I would like to add is a column with the gateway_name to identify the Outbound Provider Name. So, in my PHP page I can show where the call is going out.
>>>>
>>>> And also, I found that the application_data columns is showing the sofia dialstring (for ie. sofia/gateway/my_gateway/44798797978) but this columns is overwritten by last action I can't rely on this field.
>>>> I'm looking for days into the wiki but I didn't found anything interesting.
>>>>
>>>> Thank you so much!
>>>>
>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> 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
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> 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
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> 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
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> 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



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list