Most efficient way to send an HTTP GET from the dialplan with asterisk 1.8 and above) ?

Home » Asterisk Users » Most efficient way to send an HTTP GET from the dialplan with asterisk 1.8 and above) ?
Asterisk Users 4 Comments

Hi,

I’ve seen that function CURL is missing from 1.8 but back in with 10
(see wiki.asterisk.org).

With asterisk 1.8 and above, for a custom CID Name lookup application,
which is the most efficient way to send an HTTP GET from the dialplan
and parse its response (code and content) ?

Regards

4 thoughts on - Most efficient way to send an HTTP GET from the dialplan with asterisk 1.8 and above) ?

  • I think the wiki may have just missed func_curl. I have a couple 1.8.x machines with working func_curl. Have you tried to compile it anyway?

    Thanks!!

  • Yes, you’re right, I can read this menuselect.makeopts :
    MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_curl

    I should investigate why res_curl was not built.

    1. But, on your own 1.8.7 system, do you have something related to
    CURL when typing core show functions (or core show applications) ?
    I’m asking because func_CURL is missing from
    https://wiki.asterisk.org/wiki/display/AST/Dialplan+Functions
    (asterisk 1.8 version) which is misleading.

    2. How would you rate CURL function performance ? Would you recommend
    it (for CID Lookup, for instance) ?

    2012/1/11, Benny Amorsen :

  • Olivier writes:

    == 8< ==
    ursa*CLI> core show version
    Asterisk 1.8.7.1 built by mockbuild @ x86-02.phx2.fedoraproject.org on a x86_64 running Linux on 2011-10-17 21:15:10 UTC
    ursa*CLI> core show function CURL

    -= Info about function ‘CURL’ =-

    [Synopsis]
    Retrieves the contents of a URL
    == 8< == The Wiki documentation is sadly not perfect yet.
    /Benny

  • Yes, thanks to Jim’s help, I added a missing library, recompiled and
    then I could also see CURL function presence in my system.

    Forgetting this library made me discover the missing entry in
    wiki.asterisk.org 1.8 section.
    I opended a ticket for it.

    Cheers

    2012/1/11, Benny Amorsen :