[Freeswitch-users] select batchfile after call
Hi, does anybody have a tip how to start a batchfile after hanging up. After ext. 1000 calls 1001 and hang up, i need a request to call: /../../FS/batchfile 1000 if 1001 calls 1000 i need: /../../FS/batchfile 1001 and so on... Thanks for help -- View this message in context: http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html Sent from the Freeswitch-users mailing list archive at Nabble.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
Re: [Freeswitch-users] select batchfile after call
Sent from my iPhone On Sep 3, 2009, at 6:08 AM, NOx-WHV wrote: > > Hi, > > does anybody have a tip how to start a batchfile after hanging up. > > After ext. 1000 calls 1001 and hang up, i need a request to call: > > /../../FS/batchfile 1000 > > if 1001 calls 1000 i need: > > /../../FS/batchfile 1001 > > and so on... > Try something like this in your Dialplan: -MC > > Thanks for help > -- > View this message in context: > http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html > Sent from the Freeswitch-users mailing list archive at Nabble.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 ___ 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
Re: [Freeswitch-users] select batchfile after call
hangup hook api? system or system_bg ? not sure On Sep 3, 2009, at 9:08 PM, NOx-WHV wrote: > > Hi, > > does anybody have a tip how to start a batchfile after hanging up. > > After ext. 1000 calls 1001 and hang up, i need a request to call: > > /../../FS/batchfile 1000 > > if 1001 calls 1000 i need: > > /../../FS/batchfile 1001 > > and so on... > > > Thanks for help > -- > View this message in context: > http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html > Sent from the Freeswitch-users mailing list archive at Nabble.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 ___ 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
Re: [Freeswitch-users] select batchfile after call
Thanks for help! I works, but now i have a new problem. The script works with the csv file from /FS/log/cdr-csv/XXX.csv. The problem is that the action application first starts and then the FS write the entry in the csv file. Does anybody have a tipp, how to call the script after writing the csv file? Thanks NOx mercutioviz wrote: > > > > Sent from my iPhone > > On Sep 3, 2009, at 6:08 AM, NOx-WHV wrote: > >> >> Hi, >> >> does anybody have a tip how to start a batchfile after hanging up. >> >> After ext. 1000 calls 1001 and hang up, i need a request to call: >> >> /../../FS/batchfile 1000 >> >> if 1001 calls 1000 i need: >> >> /../../FS/batchfile 1001 >> >> and so on... >> > Try something like this in your Dialplan: > > > > -MC >> >> Thanks for help >> -- >> View this message in context: >> http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html >> Sent from the Freeswitch-users mailing list archive at Nabble.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 > > ___ > 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 > > -- View this message in context: http://www.nabble.com/select-batchfile-after-call-tp25275633p25327475.html Sent from the Freeswitch-users mailing list archive at Nabble.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
Re: [Freeswitch-users] select batchfile after call
I just see, that i have a second problem. If I have a call and this call is without any response on the called side, the FS doesn´t call the script. NOx-WHV wrote: > > Thanks for help! > > I works, but now i have a new problem. The script works with the csv file > from /FS/log/cdr-csv/XXX.csv. > > The problem is that the action application first starts and then the FS > write the entry in the csv file. > > Does anybody have a tipp, how to call the script after writing the csv > file? > > Thanks > > NOx > > > > mercutioviz wrote: >> >> >> >> Sent from my iPhone >> >> On Sep 3, 2009, at 6:08 AM, NOx-WHV wrote: >> >>> >>> Hi, >>> >>> does anybody have a tip how to start a batchfile after hanging up. >>> >>> After ext. 1000 calls 1001 and hang up, i need a request to call: >>> >>> /../../FS/batchfile 1000 >>> >>> if 1001 calls 1000 i need: >>> >>> /../../FS/batchfile 1001 >>> >>> and so on... >>> >> Try something like this in your Dialplan: >> >> >> >> -MC >>> >>> Thanks for help >>> -- >>> View this message in context: >>> http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html >>> Sent from the Freeswitch-users mailing list archive at Nabble.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 >> >> ___ >> 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 >> >> > > -- View this message in context: http://www.nabble.com/select-batchfile-after-call-tp25275633p25329259.html Sent from the Freeswitch-users mailing list archive at Nabble.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
Re: [Freeswitch-users] select batchfile after call
I get the feeling that you are trying to use the wrong tool for the job. If you need to launch a script after the call ends AND you need access to the CSV file then you either should switch to XML CDR or just write a Perl script that runs as a daemon that sits and waits for CSV files to appear and process them accordingly. Don't use api_hang_hook when you need to post process calls and work with CDR data. -MC Sent from my iPhone On Sep 7, 2009, at 4:47 AM, NOx-WHV wrote: > > I just see, that i have a second problem. > > If I have a call and this call is without any response on the called > side, > the FS doesn´t call the script. > > > > > > NOx-WHV wrote: >> >> Thanks for help! >> >> I works, but now i have a new problem. The script works with the >> csv file >> from /FS/log/cdr-csv/XXX.csv. >> >> The problem is that the action application first starts and then >> the FS >> write the entry in the csv file. >> >> Does anybody have a tipp, how to call the script after writing the >> csv >> file? >> >> Thanks >> >> NOx >> >> >> >> mercutioviz wrote: >>> >>> >>> >>> Sent from my iPhone >>> >>> On Sep 3, 2009, at 6:08 AM, NOx-WHV >>> wrote: >>> Hi, does anybody have a tip how to start a batchfile after hanging up. After ext. 1000 calls 1001 and hang up, i need a request to call: /../../FS/batchfile 1000 if 1001 calls 1000 i need: /../../FS/batchfile 1001 and so on... >>> Try something like this in your Dialplan: >>> >>> >>> >>> -MC Thanks for help -- View this message in context: http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html Sent from the Freeswitch-users mailing list archive at Nabble.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 >>> >>> ___ >>> 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 >>> >>> >> >> > > -- > View this message in context: > http://www.nabble.com/select-batchfile-after-call-tp25275633p25329259.html > Sent from the Freeswitch-users mailing list archive at Nabble.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 ___ 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
Re: [Freeswitch-users] select batchfile after call
I have a script that will do just that, and it's pretty simple, it's written in ruby :). http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/callcard/cdr.rb Best regards, Diego On Tue, Sep 8, 2009 at 12:18 AM, Michael S Collins wrote: > I get the feeling that you are trying to use the wrong tool for the > job. If you need to launch a script after the call ends AND you need > access to the CSV file then you either should switch to XML CDR or > just write a Perl script that runs as a daemon that sits and waits for > CSV files to appear and process them accordingly. Don't use > api_hang_hook when you need to post process calls and work with CDR > data. > > -MC > > Sent from my iPhone > > On Sep 7, 2009, at 4:47 AM, NOx-WHV wrote: > > > > > I just see, that i have a second problem. > > > > If I have a call and this call is without any response on the called > > side, > > the FS doesn´t call the script. > > > > > > > > > > > > NOx-WHV wrote: > >> > >> Thanks for help! > >> > >> I works, but now i have a new problem. The script works with the > >> csv file > >> from /FS/log/cdr-csv/XXX.csv. > >> > >> The problem is that the action application first starts and then > >> the FS > >> write the entry in the csv file. > >> > >> Does anybody have a tipp, how to call the script after writing the > >> csv > >> file? > >> > >> Thanks > >> > >> NOx > >> > >> > >> > >> mercutioviz wrote: > >>> > >>> > >>> > >>> Sent from my iPhone > >>> > >>> On Sep 3, 2009, at 6:08 AM, NOx-WHV > >>> wrote: > >>> > > Hi, > > does anybody have a tip how to start a batchfile after hanging up. > > After ext. 1000 calls 1001 and hang up, i need a request to call: > > /../../FS/batchfile 1000 > > if 1001 calls 1000 i need: > > /../../FS/batchfile 1001 > > and so on... > > >>> Try something like this in your Dialplan: > >>> > >>> > >>> > >>> -MC > > Thanks for help > -- > View this message in context: > > http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html > Sent from the Freeswitch-users mailing list archive at Nabble.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 > >>> > >>> ___ > >>> 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 > >>> > >>> > >> > >> > > > > -- > > View this message in context: > http://www.nabble.com/select-batchfile-after-call-tp25275633p25329259.html > > Sent from the Freeswitch-users mailing list archive at Nabble.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 > > ___ > 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 > ___ 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
Re: [Freeswitch-users] select batchfile after call
Hi, the script looks good. But I never use scripts directly in FS. Can you help, where and how I have to do what?!?!? My way with a linux script works. But only one option doesn´t work. If I have a call to a outside phone throuth a sip-gateway and I hang up (not the party who is called hang up) the channel is closed without any reaction. If the called party hang up, the script works. How can I call the script on NORMAL_CLEARING, session ended or CS_DESTROY? Thanks Diego Viola wrote: > > I have a script that will do just that, and it's pretty simple, it's > written > in ruby :). > > http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/callcard/cdr.rb > > Best regards, > > Diego > > On Tue, Sep 8, 2009 at 12:18 AM, Michael S Collins > wrote: > >> I get the feeling that you are trying to use the wrong tool for the >> job. If you need to launch a script after the call ends AND you need >> access to the CSV file then you either should switch to XML CDR or >> just write a Perl script that runs as a daemon that sits and waits for >> CSV files to appear and process them accordingly. Don't use >> api_hang_hook when you need to post process calls and work with CDR >> data. >> >> -MC >> >> Sent from my iPhone >> >> On Sep 7, 2009, at 4:47 AM, NOx-WHV wrote: >> >> > >> > I just see, that i have a second problem. >> > >> > If I have a call and this call is without any response on the called >> > side, >> > the FS doesn´t call the script. >> > >> > >> > >> > >> > >> > NOx-WHV wrote: >> >> >> >> Thanks for help! >> >> >> >> I works, but now i have a new problem. The script works with the >> >> csv file >> >> from /FS/log/cdr-csv/XXX.csv. >> >> >> >> The problem is that the action application first starts and then >> >> the FS >> >> write the entry in the csv file. >> >> >> >> Does anybody have a tipp, how to call the script after writing the >> >> csv >> >> file? >> >> >> >> Thanks >> >> >> >> NOx >> >> >> >> >> >> >> >> mercutioviz wrote: >> >>> >> >>> >> >>> >> >>> Sent from my iPhone >> >>> >> >>> On Sep 3, 2009, at 6:08 AM, NOx-WHV >> >>> wrote: >> >>> >> >> Hi, >> >> does anybody have a tip how to start a batchfile after hanging up. >> >> After ext. 1000 calls 1001 and hang up, i need a request to call: >> >> /../../FS/batchfile 1000 >> >> if 1001 calls 1000 i need: >> >> /../../FS/batchfile 1001 >> >> and so on... >> >> >>> Try something like this in your Dialplan: >> >>> >> >>> >> >>> >> >>> -MC >> >> Thanks for help >> -- >> View this message in context: >> >> http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.html >> Sent from the Freeswitch-users mailing list archive at Nabble.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 >> >>> >> >>> ___ >> >>> 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 >> >>> >> >>> >> >> >> >> >> > >> > -- >> > View this message in context: >> http://www.nabble.com/select-batchfile-after-call-tp25275633p25329259.html >> > Sent from the Freeswitch-users mailing list archive at Nabble.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 >> >> ___ >> 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 >> > > ___ > 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 > > -- View this message in context: http://www.nabble.com/select-batchfile-after-call-tp25275633p25343243.html Sent from the Freeswitch-users mailing list archive at Nabble.com. ___ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org
Re: [Freeswitch-users] select batchfile after call
On September 8, 2009 06:10:11 am NOx-WHV wrote: > Hi, > > the script looks good. But I never use scripts directly in FS. > > Can you help, where and how I have to do what?!?!? Use ESL (http://wiki.freeswitch.org/wiki/Event_Socket_Library) to subscribe to hangup events, as Diego suggested. OR Use XML CDR (http://wiki.freeswitch.org/wiki/Mod_xml_cdr) to receive an HTTP POST of CDR data when any call completes, as Michael suggested. > > My way with a linux script works. But only one option doesn´t work. If I > have a call to a outside phone throuth a sip-gateway and I hang up (not the > party who is called hang up) the channel is closed without any reaction. If > the called party hang up, the script works. > How can I call the script on NORMAL_CLEARING, session ended or CS_DESTROY? You can't do what you want with the hangup hook. Listen to the suggestions being given and take a new approach to your problem. > > Thanks > > Diego Viola wrote: > > I have a script that will do just that, and it's pretty simple, it's > > written > > in ruby :). > > > > http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/c > >allcard/cdr.rb > > > > Best regards, > > > > Diego > > > > On Tue, Sep 8, 2009 at 12:18 AM, Michael S Collins > > > > wrote: > >> I get the feeling that you are trying to use the wrong tool for the > >> job. If you need to launch a script after the call ends AND you need > >> access to the CSV file then you either should switch to XML CDR or > >> just write a Perl script that runs as a daemon that sits and waits for > >> CSV files to appear and process them accordingly. Don't use > >> api_hang_hook when you need to post process calls and work with CDR > >> data. > >> > >> -MC > >> > >> Sent from my iPhone > >> > >> On Sep 7, 2009, at 4:47 AM, NOx-WHV wrote: > >> > I just see, that i have a second problem. > >> > > >> > If I have a call and this call is without any response on the called > >> > side, > >> > the FS doesn´t call the script. > >> > > >> > NOx-WHV wrote: > >> >> Thanks for help! > >> >> > >> >> I works, but now i have a new problem. The script works with the > >> >> csv file > >> >> from /FS/log/cdr-csv/XXX.csv. > >> >> > >> >> The problem is that the action application first starts and then > >> >> the FS > >> >> write the entry in the csv file. > >> >> > >> >> Does anybody have a tipp, how to call the script after writing the > >> >> csv > >> >> file? > >> >> > >> >> Thanks > >> >> > >> >> NOx > >> >> > >> >> mercutioviz wrote: > >> >>> Sent from my iPhone > >> >>> > >> >>> On Sep 3, 2009, at 6:08 AM, NOx-WHV > >> >>> > >> >>> wrote: > >> Hi, > >> > >> does anybody have a tip how to start a batchfile after hanging up. > >> > >> After ext. 1000 calls 1001 and hang up, i need a request to call: > >> > >> /../../FS/batchfile 1000 > >> > >> if 1001 calls 1000 i need: > >> > >> /../../FS/batchfile 1001 > >> > >> and so on... > >> >>> > >> >>> Try something like this in your Dialplan: > >> >>> > >> >>> > >> >>> > >> >>> -MC > >> >>> > >> Thanks for help > >> -- > >> View this message in context: > >> > >> http://www.nabble.com/select-batchfile-after-call-tp25275633p25275633.ht > >>ml > >> > >> Sent from the Freeswitch-users mailing list archive at Nabble.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 > >> >>> > >> >>> ___ > >> >>> 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 > >> > > >> > -- > >> > View this message in context: > >> > >> http://www.nabble.com/select-batchfile-after-call-tp25275633p25329259.ht > >>ml > >> > >> > Sent from the Freeswitch-users mailing list archive at Nabble.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 > >> > >> ___ > >> 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 > > > > ___