[asterisk-dev] Problem developing asterisk module with libcurl

Joshua Colp jcolp at digium.com
Mon Dec 15 08:05:31 CST 2014


David wrote:
> Hello
>
> I've created an Asterisk module following this tutorial-->
> http://blog.russellbryant.net/2008/06/19/how-to-write-an-asterisk-module-part-1/
> Following this part and parts 2
> <http://blog.russellbryant.net/2008/06/20/how-to-write-an-asterisk-module-part-2/>
> and 3
> <http://blog.russellbryant.net/2008/06/30/how-to-write-an-asterisk-module-part-3/>
> I have developed an asterisk module with a CLI command.

<snip>

>
> The problems are:
> If I don't include the option -lcurl in the 3rd gcc command I can not
> load the module because of an error: undefined symbol: curl_easy_perform

This is correct. Since you are using the curl library your module has to 
be linked against it.

> If I include the option -lcurl asterisk crashes and exits when I try to
> load the module.

You need to load up Asterisk using gdb and provide a backtrace.

Additionally: There is already curl functionality in Asterisk - does it 
not fit your needs?

Cheers,

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list