Discussion:
[Freeswitch-users] trying to get mod_xml_cdr working
deniro
2011-05-23 00:27:24 UTC
Permalink
Hi All
I am trying to get mod_xml_cdr working

My webserver is like www.xxx.com at port 80
the test web site is working fine with perl
http://www.xxx.com/PERL/test3.pl

I have mod_xml_cdr and mod_xml_curl modules loaded.

several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl

2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server [
http://www.xxx.com/PERL/cdr.pl]

3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>

4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80 <http://www.xxx.com/>"
bindings="dialplan"/>

again my webserver www.xxx.com at port 80

Thx
deiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110522/aeed3a2a/attachment.html
Gabriel Gunderson
2011-05-23 06:38:27 UTC
Permalink
Post by deniro
several questions;
1-- do I really need to? load mod_xml_curl for?mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
?<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
Looks good to me, but check it with the wiki:
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80"
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
be the best place to reference:
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring



Good luck,
Gabe
Steven Ayre
2011-05-23 07:50:09 UTC
Permalink
Post by Gabriel Gunderson
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It sounds
like the cgi-bin/perl handler hasn't been configured correctly, the script
isn't executable, or it's not returning some headers. Try visiting the URL
in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs without
an (unexpected) error.
Post by Gabriel Gunderson
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80"
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
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/20110523/937d8604/attachment.html
deniro
2011-05-25 05:12:57 UTC
Permalink
Thanks for the replies
I made some research and run series of tests.
I am using perl+FCGI (fastcgi) and my http server is working fine as
tested with multiple perl scripts.
I think the problem is handling the CGI within the cdr.pl file(obtained
from freeswitch wiki)

so, how can I change below script to use with FCGI instead of CGI::Simple

use XML::Simple; # Get from CPAN
use CGI::Simple; # Get from CPAN
use Data::Dumper;
# dump into a place for further review
open(FILEOUT,">",'/tmp/fs-xml-cdr2.log');
print FILEOUT "Test successful..\n";
cloe(FILEOUT);
# dump into a place for further review
open(FILEOUT,">>",'/tmp/fs-xml-cdr.log');
# $cgi object has handy methods
my $cgi = new CGI::Simple;


Thx
deniro
Post by Steven Ayre
Post by deniro
2-- when dialing into conference, getting following from fs_cli
Post by deniro
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It sounds
like the cgi-bin/perl handler hasn't been configured correctly, the script
isn't executable, or it's not returning some headers. Try visiting the URL
in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs
without an (unexpected) error.
Post by deniro
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80<http://www.xxx.com/>
"
Post by deniro
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110525/4cf9382c/attachment.html
Michael Collins
2011-05-25 21:33:07 UTC
Permalink
http://search.cpan.org/~markstos/CGI.pm-3.54/lib/CGI/Fast.pm

That module looks like it is built on top of FCGI and gives you a CGI-like
interface.

-MC
Post by deniro
Thanks for the replies
I made some research and run series of tests.
I am using perl+FCGI (fastcgi) and my http server is working fine as
tested with multiple perl scripts.
I think the problem is handling the CGI within the cdr.pl file(obtained
from freeswitch wiki)
so, how can I change below script to use with FCGI instead of CGI::Simple
use XML::Simple; # Get from CPAN
use CGI::Simple; # Get from CPAN
use Data::Dumper;
# dump into a place for further review
open(FILEOUT,">",'/tmp/fs-xml-cdr2.log');
print FILEOUT "Test successful..\n";
cloe(FILEOUT);
# dump into a place for further review
open(FILEOUT,">>",'/tmp/fs-xml-cdr.log');
# $cgi object has handy methods
my $cgi = new CGI::Simple;
Thx
deniro
Post by Steven Ayre
Post by deniro
2-- when dialing into conference, getting following from fs_cli
Post by deniro
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It sounds
like the cgi-bin/perl handler hasn't been configured correctly, the script
isn't executable, or it's not returning some headers. Try visiting the URL
in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs
without an (unexpected) error.
Post by deniro
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80<http://www.xxx.com/>
"
Post by deniro
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
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
_______________________________________________
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/20110525/2ca01bac/attachment.html
deniro
2011-05-26 05:22:22 UTC
Permalink
Thanks a lot. The link was a good help.
we tested with sample code in the link and no more 502 errors with the
sample code in the link.

We tried to make changes in our cdr.pl perl (using mod_xml_cdr) program
accordingly
we made good progres in generatng xml file, however we are still getting
502 errors from cdr.pl.
Probably something else in our cdr.pl giving us that, we are still trying
to figure out what piece is that.

In the mean time, in generated xml we see a line like this
* <^[7]\d{4}\$>77555</^[7]\d{4}\$>*
and looks like this coming from
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');*
and because of above xml line I am unable to parse xml.
(above tested with changes and changes reflect on xml line)

why do you think
above $session->playAndGetDigits is producing xml line like
"<^[7]\d{4}\$>77555</^[7]\d{4}\$>"

any ideas appreciated.
why and how to fix it.

thx again
deniro--
Post by Michael Collins
http://search.cpan.org/~markstos/CGI.pm-3.54/lib/CGI/Fast.pm
That module looks like it is built on top of FCGI and gives you a CGI-like
interface.
-MC
Post by deniro
Thanks for the replies
I made some research and run series of tests.
I am using perl+FCGI (fastcgi) and my http server is working fine as
tested with multiple perl scripts.
I think the problem is handling the CGI within the cdr.pl file(obtained
from freeswitch wiki)
so, how can I change below script to use with FCGI instead of CGI::Simple
use XML::Simple; # Get from CPAN
use CGI::Simple; # Get from CPAN
use Data::Dumper;
# dump into a place for further review
open(FILEOUT,">",'/tmp/fs-xml-cdr2.log');
print FILEOUT "Test successful..\n";
cloe(FILEOUT);
# dump into a place for further review
open(FILEOUT,">>",'/tmp/fs-xml-cdr.log');
# $cgi object has handy methods
my $cgi = new CGI::Simple;
Thx
deniro
Post by Steven Ayre
Post by deniro
2-- when dialing into conference, getting following from fs_cli
Post by deniro
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It sounds
like the cgi-bin/perl handler hasn't been configured correctly, the script
isn't executable, or it's not returning some headers. Try visiting the URL
in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs
without an (unexpected) error.
Post by deniro
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80<http://www.xxx.com/>
"
Post by deniro
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110526/11201550/attachment.html
Steven Ayre
2011-05-26 06:34:52 UTC
Permalink
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');

*It looks like this usage is wrong. You're giving 9 parameters but the Wiki
seems to say it's only 8. It looks like it's using the 9th as a channel
variable name to store the result in.

Try this:
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav",
'^[7]\d{4}\$');*

-Steve
Post by deniro
Thanks a lot. The link was a good help.
we tested with sample code in the link and no more 502 errors with the
sample code in the link.
We tried to make changes in our cdr.pl perl (using mod_xml_cdr) program
accordingly
we made good progres in generatng xml file, however we are still getting
502 errors from cdr.pl.
Probably something else in our cdr.pl giving us that, we are still trying
to figure out what piece is that.
In the mean time, in generated xml we see a line like this
* <^[7]\d{4}\$>77555</^[7]\d{4}\$>
*
and looks like this coming from
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');*
and because of above xml line I am unable to parse xml.
(above tested with changes and changes reflect on xml line)
why do you think
above $session->playAndGetDigits is producing xml line like
"<^[7]\d{4}\$>77555</^[7]\d{4}\$>"
any ideas appreciated.
why and how to fix it.
thx again
deniro--
Post by Michael Collins
http://search.cpan.org/~markstos/CGI.pm-3.54/lib/CGI/Fast.pm
That module looks like it is built on top of FCGI and gives you a CGI-like
interface.
-MC
Post by deniro
Thanks for the replies
I made some research and run series of tests.
I am using perl+FCGI (fastcgi) and my http server is working fine as
tested with multiple perl scripts.
I think the problem is handling the CGI within the cdr.pl file(obtained
from freeswitch wiki)
so, how can I change below script to use with FCGI instead of CGI::Simple
use XML::Simple; # Get from CPAN
use CGI::Simple; # Get from CPAN
use Data::Dumper;
# dump into a place for further review
open(FILEOUT,">",'/tmp/fs-xml-cdr2.log');
print FILEOUT "Test successful..\n";
cloe(FILEOUT);
# dump into a place for further review
open(FILEOUT,">>",'/tmp/fs-xml-cdr.log');
# $cgi object has handy methods
my $cgi = new CGI::Simple;
Thx
deniro
Post by Steven Ayre
Post by deniro
2-- when dialing into conference, getting following from fs_cli
Post by deniro
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It sounds
like the cgi-bin/perl handler hasn't been configured correctly, the script
isn't executable, or it's not returning some headers. Try visiting the URL
in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs
without an (unexpected) error.
Post by deniro
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80<http://www.xxx.com/>
"
Post by deniro
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
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
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110526/b5cb3aed/attachment-0001.html
deniro
2011-05-26 23:50:24 UTC
Permalink
tried it and looks like that XML line is gone.
but now I am unable to join to conference by making suggested change.
played around it, no luck to join conference....
it doesnt get DTMF as I check from fs_cli
*switch_cpp.cpp:1177 Got dtmf: -- ..*
* *
I also checked usage and it seems with 8 parameters.
I can't remember how I got it with 9 parameters before.
Anyway, It works(joins conference) with 9 parametes only.
I am using freeswitch 1.0.6 with ubuntu 10.04
can that usage be different from version to version?
thx
Post by deniro
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');
*
It looks like this usage is wrong. You're giving 9 parameters but the Wiki
seems to say it's only 8. It looks like it's using the 9th as a channel
variable name to store the result in.
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav",
'^[7]\d{4}\$');*
-Steve
Post by deniro
Thanks a lot. The link was a good help.
we tested with sample code in the link and no more 502 errors with the
sample code in the link.
We tried to make changes in our cdr.pl perl (using mod_xml_cdr) program
accordingly
we made good progres in generatng xml file, however we are still getting
502 errors from cdr.pl.
Probably something else in our cdr.pl giving us that, we are still
trying to figure out what piece is that.
In the mean time, in generated xml we see a line like this
* <^[7]\d{4}\$>77555</^[7]\d{4}\$>
*
and looks like this coming from
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');*
and because of above xml line I am unable to parse xml.
(above tested with changes and changes reflect on xml line)
why do you think
above $session->playAndGetDigits is producing xml line like
"<^[7]\d{4}\$>77555</^[7]\d{4}\$>"
any ideas appreciated.
why and how to fix it.
thx again
deniro--
Post by Michael Collins
http://search.cpan.org/~markstos/CGI.pm-3.54/lib/CGI/Fast.pm
That module looks like it is built on top of FCGI and gives you a
CGI-like interface.
-MC
Post by deniro
Thanks for the replies
I made some research and run series of tests.
I am using perl+FCGI (fastcgi) and my http server is working fine as
tested with multiple perl scripts.
I think the problem is handling the CGI within the cdr.plfile(obtained from freeswitch wiki)
so, how can I change below script to use with FCGI instead of CGI::Simple
use XML::Simple; # Get from CPAN
use CGI::Simple; # Get from CPAN
use Data::Dumper;
# dump into a place for further review
open(FILEOUT,">",'/tmp/fs-xml-cdr2.log');
print FILEOUT "Test successful..\n";
cloe(FILEOUT);
# dump into a place for further review
open(FILEOUT,">>",'/tmp/fs-xml-cdr.log');
# $cgi object has handy methods
my $cgi = new CGI::Simple;
Thx
deniro
Post by Steven Ayre
Post by deniro
2-- when dialing into conference, getting following from fs_cli
Post by deniro
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It
sounds like the cgi-bin/perl handler hasn't been configured correctly, the
script isn't executable, or it's not returning some headers. Try visiting
the URL in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs
without an (unexpected) error.
Post by deniro
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in xml_cdr.conf.xml
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80<http://www.xxx.com/>
"
Post by deniro
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
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
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
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110526/58ae8d33/attachment-0001.html
Michael Collins
2011-05-27 01:28:30 UTC
Permalink
1.0.6 is ancient. Get on the latest git - it is more stable and has more
features and fewer bugs than 1.0.6.
-MC
Post by deniro
tried it and looks like that XML line is gone.
but now I am unable to join to conference by making suggested change.
played around it, no luck to join conference....
it doesnt get DTMF as I check from fs_cli
*switch_cpp.cpp:1177 Got dtmf: -- ..*
* *
I also checked usage and it seems with 8 parameters.
I can't remember how I got it with 9 parameters before.
Anyway, It works(joins conference) with 9 parametes only.
I am using freeswitch 1.0.6 with ubuntu 10.04
can that usage be different from version to version?
thx
Post by deniro
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');
*
It looks like this usage is wrong. You're giving 9 parameters but the Wiki
seems to say it's only 8. It looks like it's using the 9th as a channel
variable name to store the result in.
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav",
'^[7]\d{4}\$');*
-Steve
Post by deniro
Thanks a lot. The link was a good help.
we tested with sample code in the link and no more 502 errors with the
sample code in the link.
We tried to make changes in our cdr.pl perl (using mod_xml_cdr) program
accordingly
we made good progres in generatng xml file, however we are still
getting 502 errors from cdr.pl.
Probably something else in our cdr.pl giving us that, we are still
trying to figure out what piece is that.
In the mean time, in generated xml we see a line like this
* <^[7]\d{4}\$>77555</^[7]\d{4}\$>
*
and looks like this coming from
*$PIN_temp=$session->playAndGetDigits(1, 5, 1, 8000, "#",
"conference/conf-pin.wav", "ivr/ivr-that_was_an_invalid_entry.wav", "",
'^[7]\d{4}\$');*
and because of above xml line I am unable to parse xml.
(above tested with changes and changes reflect on xml line)
why do you think
above $session->playAndGetDigits is producing xml line like
"<^[7]\d{4}\$>77555</^[7]\d{4}\$>"
any ideas appreciated.
why and how to fix it.
thx again
deniro--
Post by Michael Collins
http://search.cpan.org/~markstos/CGI.pm-3.54/lib/CGI/Fast.pm
That module looks like it is built on top of FCGI and gives you a
CGI-like interface.
-MC
Post by deniro
Thanks for the replies
I made some research and run series of tests.
I am using perl+FCGI (fastcgi) and my http server is working fine as
tested with multiple perl scripts.
I think the problem is handling the CGI within the cdr.plfile(obtained from freeswitch wiki)
so, how can I change below script to use with FCGI instead of CGI::Simple
use XML::Simple; # Get from CPAN
use CGI::Simple; # Get from CPAN
use Data::Dumper;
# dump into a place for further review
open(FILEOUT,">",'/tmp/fs-xml-cdr2.log');
print FILEOUT "Test successful..\n";
cloe(FILEOUT);
# dump into a place for further review
open(FILEOUT,">>",'/tmp/fs-xml-cdr.log');
# $cgi object has handy methods
my $cgi = new CGI::Simple;
Thx
deniro
Post by Steven Ayre
Post by deniro
2-- when dialing into conference, getting following from fs_cli
Post by deniro
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Check your web server logs - there may be some useful message. It
sounds like the cgi-bin/perl handler hasn't been configured correctly, the
script isn't executable, or it's not returning some headers. Try visiting
the URL in your webbrowser (you
won't be submitting a CDR but you can at least check the script runs
without an (unexpected) error.
Post by deniro
Post by deniro
several questions;
1-- do I really need to load mod_xml_curl for mod_xml_cdr?
trying to figure out if my problem is with cdr or with curl
No, they are not functionally related... easy to get mixed up because
they both use HTTP and XML. One does not depend on the other. However,
you *can* configure mod_xml_cdr (or any other module) with
mod_xml_curl.
Post by deniro
2-- when dialing into conference, getting following from fs_cli
[ERR] mod_xml_cdr.c:365 Got error [502] posting to web server
[http://www.xxx.com/PERL/cdr.pl]
There isn't a lot of info to work on here, but I'd look at your web
setup and not FS for the mix-up (particularly true as "HTTP Error 502"
means you have a bad gateway).
Post by deniro
3-- I am not quiete sure if this line is correct in
xml_cdr.conf.xml
Post by deniro
<param name="url" value="http://www.xxx.com/PERL/cdr.pl"/>
http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Sample_Configuration
Post by deniro
4-- if I need mod_xml_curl (question 1)
what should this line be like in xml_curl.conf.xml?
<param name="gateway-url" value="http://www.xxx.com:80<http://www.xxx.com/>
"
Post by deniro
bindings="dialplan"/>
This one is a little tricker to get right. Again, the wiki is might
http://wiki.freeswitch.org/wiki/Mod_xml_curl#Configuring
Good luck,
Gabe
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
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
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
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
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
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110526/3027468f/attachment-0001.html
Loading...