View previous topic :: View next topic |
Author |
Message |
prashant.ruby at gmail... Guest
|
Posted: Fri Feb 29, 2008 9:10 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
Hi all,
When I try to add CURL code to file channel.c we get an error - undefined
reference to curl_easy_init.
I've added #include <curl/curl.h> so the code compiles fine.
this error is generated by the linker, even though func_curl.c is compiled
and linked with no errors
My asterisk machine have curl and curl-devel 7.12 installed.
Asterisk version i am using is 1.4.17.
Any help will be appriciated.
Thanks & Regards
Prashant Sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080229/57918e6e/attachment.htm |
|
Back to top |
|
|
tilghman at mail.jeffa... Guest
|
Posted: Fri Feb 29, 2008 9:55 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
On Friday 29 February 2008 08:10:40 Prashant Sharma wrote:
Quote: | When I try to add CURL code to file channel.c we get an error - undefined
reference to curl_easy_init.
I've added #include <curl/curl.h> so the code compiles fine.
this error is generated by the linker, even though func_curl.c is compiled
and linked with no errors
My asterisk machine have curl and curl-devel 7.12 installed.
Asterisk version i am using is 1.4.17.
|
Let's start with, why are you adding curl code to channel.c?
--
Tilghman |
|
Back to top |
|
|
prashant.ruby at gmail... Guest
|
Posted: Mon Mar 03, 2008 1:27 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
Hi Tilghman,
Thanks for taking interest in my problem.
I just want to send a http post request to my website without changing the
dial plan. So I have added slightly modified http post code and some other
code to channel.c got from <curl/curl.h>.
After adding the code I compiled the asterisk code and got the error:
channel.o(.text+0x....): channel.c:xxxx: undefined reference to
'curl_global_init'
Thanks
&
Regards,
Prashant Sharma
On Friday 29 February 2008 08:10:40 Prashant Sharma wrote:
Quote: | * When I try to add CURL code to file channel.c we get an error - undefined
| *>* reference to curl_easy_init.
*>* I've added #include <curl/curl.h> so the code compiles fine.
*>* this error is generated by the linker, even though func_curl.c is
compiled
*>* and linked with no errors
*>* My asterisk machine have curl and curl-devel 7.12 installed.
*>* Asterisk version i am using is 1.4.17.
*
Let's start with, why are you adding curl code to channel.c?
--
Tilghman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080303/ef6ae12e/attachment.htm |
|
Back to top |
|
|
greymanvoip at gmail.com Guest
|
Posted: Mon Mar 03, 2008 4:23 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
On Mon, Mar 3, 2008 at 6:27 AM, Prashant Sharma <prashant.ruby at gmail.com> wrote:
Quote: | Hi Tilghman,
Thanks for taking interest in my problem.
I just want to send a http post request to my website without changing the
dial plan. So I have added slightly modified http post code and some other
code to channel.c got from <curl/curl.h>.
After adding the code I compiled the asterisk code and got the error:
channel.o(.text+0x....): channel.c:xxxx: undefined reference to
'curl_global_init'
|
Try adding the following above the first include in channel.c. It's
what I've done in app_dial.c to get the Curl library to link properly.
/*** MODULEINFO
<depend>Curl</depend>
***/
Regards,
Greyman. |
|
Back to top |
|
|
tilghman at mail.jeffa... Guest
|
Posted: Mon Mar 03, 2008 7:53 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
On Monday 03 March 2008 00:27:32 Prashant Sharma wrote:
Quote: | I just want to send a http post request to my website without changing the
dial plan.
|
This doesn't make any sense. The dialplan is among the easiest and least
bug-prone ways of adding a curl POST call. Why would you want to code this
directly into channel.c, where it does not belong, instead of making a very
simple change to your dialplan?
Don't explain the mechanics. Explain why you're doing it.
--
Tilghman |
|
Back to top |
|
|
prashant.ruby at gmail... Guest
|
Posted: Mon Mar 03, 2008 8:02 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
Hi Greyman,
Thank you very much for reply.
But unfortunately even after adding these lines in the file 'channel.c'
didn't help me. It gives 'undefined reference' for all curl functions.
Should I check availability of any other file for these errors?
Thanks
& Regards
Prashant Sharma
On Mon, Mar 3, 2008 at 2:53 PM, Grey Man <greymanvoip at gmail.com> wrote:
Quote: | On Mon, Mar 3, 2008 at 6:27 AM, Prashant Sharma <prashant.ruby at gmail.com>
wrote:
Quote: | Hi Tilghman,
Thanks for taking interest in my problem.
I just want to send a http post request to my website without changing
| the
Quote: | dial plan. So I have added slightly modified http post code and some
| other
Quote: | code to channel.c got from <curl/curl.h>.
After adding the code I compiled the asterisk code and got the error:
channel.o(.text+0x....): channel.c:xxxx: undefined reference to
'curl_global_init'
|
Try adding the following above the first include in channel.c. It's
what I've done in app_dial.c to get the Curl library to link properly.
/*** MODULEINFO
<depend>Curl</depend>
***/
Regards,
Greyman.
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
| -------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080303/e29e405b/attachment.htm |
|
Back to top |
|
|
prashant.ruby at gmail... Guest
|
Posted: Mon Mar 03, 2008 8:18 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
Hi,
I'm trying to make asterisk detect some DTMF digits during a call and post
them (can't use WaitExten or Features.conf).
Regards,
Prashant
On Mon, Mar 3, 2008 at 6:23 PM, Tilghman Lesher <
tilghman at mail.jeffandtilghman.com> wrote:
Quote: | On Monday 03 March 2008 00:27:32 Prashant Sharma wrote:
Quote: | I just want to send a http post request to my website without changing
| the
This doesn't make any sense. The dialplan is among the easiest and least
bug-prone ways of adding a curl POST call. Why would you want to code
this
directly into channel.c, where it does not belong, instead of making a
very
simple change to your dialplan?
Don't explain the mechanics. Explain why you're doing it.
--
Tilghman
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
| -------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080303/35929359/attachment.htm |
|
Back to top |
|
|
tilghman at mail.jeffa... Guest
|
Posted: Mon Mar 03, 2008 12:13 pm Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
On Monday 03 March 2008 07:18, Prashant Sharma wrote:
Quote: | I'm trying to make asterisk detect some DTMF digits during a call and post
them (can't use WaitExten or Features.conf).
|
I would suggest that you implement that in logger.c and configure a line to
send logs to an HTTP POST (via logger.conf), with the
pbx_substitute_variables_helper function, using the ${CURL()} function
directly. You may need to "preload => func_curl.so" in modules.conf, but
that will work well.
--
Tilghman |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Mon Mar 03, 2008 12:35 pm Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
On Mon, Mar 03, 2008 at 11:13:28AM -0600, Tilghman Lesher wrote:
Quote: | On Monday 03 March 2008 07:18, Prashant Sharma wrote:
Quote: | I'm trying to make asterisk detect some DTMF digits during a call and post
them (can't use WaitExten or Features.conf).
|
I would suggest that you implement that in logger.c and configure a line to
send logs to an HTTP POST (via logger.conf), with the
pbx_substitute_variables_helper function, using the ${CURL()} function
directly. You may need to "preload => func_curl.so" in modules.conf, but
that will work well.
|
Or a simple log watcher.
tail -n0 -f /var/log/asterisk/debug | \
grep 'DTMF digit: [0-9#*]' | \
your_custum_filter
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
prashant.ruby at gmail... Guest
|
Posted: Tue Mar 04, 2008 12:05 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
Hi,
Thanks but using the logger.c approach will allow the IVR to receive the
digits in case 's' extension answers the call. That might result in the dial
plan dialing an extension or going to the 'i' extension and hanging up.
Ssorry about the confusion.
Thanks & Regards
Prashant Sharma
On Mon, Mar 3, 2008 at 10:43 PM, Tilghman Lesher <
tilghman at mail.jeffandtilghman.com> wrote:
Quote: | On Monday 03 March 2008 07:18, Prashant Sharma wrote:
Quote: | I'm trying to make asterisk detect some DTMF digits during a call and
| post
Quote: | them (can't use WaitExten or Features.conf).
|
I would suggest that you implement that in logger.c and configure a line
to
send logs to an HTTP POST (via logger.conf), with the
pbx_substitute_variables_helper function, using the ${CURL()} function
directly. You may need to "preload => func_curl.so" in modules.conf, but
that will work well.
--
Tilghman
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
| -------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080304/233841b9/attachment.htm |
|
Back to top |
|
|
nortexnetworks at gmai... Guest
|
Posted: Tue Mar 04, 2008 8:00 am Post subject: [asterisk-users] when we try to add CURL code to file channe |
|
|
I may be asking the wrong question, but if you want to capture the
input and pass it to another process why not use the read application
and store the input in a variable? Could you not pass that variable
and use the curl function or an AGI to post it?
On Mon, Mar 3, 2008 at 11:05 PM, Prashant Sharma
<prashant.ruby at gmail.com> wrote:
Quote: | Hi,
Thanks but using the logger.c approach will allow the IVR to receive the
digits in case 's' extension answers the call. That might result in the dial
plan dialing an extension or going to the 'i' extension and hanging up.
Ssorry about the confusion.
Thanks & Regards
Prashant Sharma
On Mon, Mar 3, 2008 at 10:43 PM, Tilghman Lesher
<tilghman at mail.jeffandtilghman.com> wrote:
Quote: | On Monday 03 March 2008 07:18, Prashant Sharma wrote:
Quote: | I'm trying to make asterisk detect some DTMF digits during a call and
|
| post
Quote: | Quote: | them (can't use WaitExten or Features.conf).
|
I would suggest that you implement that in logger.c and configure a line
| to
Quote: | send logs to an HTTP POST (via logger.conf), with the
pbx_substitute_variables_helper function, using the ${CURL()} function
directly. You may need to "preload => func_curl.so" in modules.conf, but
that will work well.
--
Tilghman
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
Bruce Reeves
Nortex Networks |
|
Back to top |
|
|
|