Asterisk mit CURL

Juscho

Neuer User
Mitglied seit
29 Apr 2007
Beiträge
163
Punkte für Reaktionen
0
Punkte
0
Hab grad versucht Asterisk mit CURL zu kompilieren, aber klappt nicht. Hier meine vorgehensweise:

- CURL von http://curl.haxx.se gezogen, entpackt, ./configure, make, make install.

- Asterisk 1.4 und die Addons von asterisk.org gezogen, entpackt. und mit ./configure --with-curl, make, make install, make samples ausgeführt.

- Asterisk Addons mit ./configure, make, make install, make samples ausgeführt.

Wenn ich asterisk -r aufrufe und dann ein core show functions ausführe finde ich CURL nicht unter den Funktionen. Jemand einen Tipp? Hab Debian 4. Asterisk läuft, nur ohne CURL.
 
Ein Blick in config.log sollte Aufschluss geben. --with-curl ist übrigens nicht nötig. Wenn Configure curl findet wird asterisk auch mit curl gebaut.

Code:
Configure:31453: checking for curl-config
configure:31471: found /usr/bin/curl-config
configure:31483: result: /usr/bin/curl-config
configure:31515: checking for curl_version() in curl/curl.h
 
Hi, hab in das File geschaut, finde auch den Abschnitt, aber da steht auch nix von Fehler. Das ganze Dokument hab ich nach "curl" durchsuchen lassen, auch da steht nix von einem Fehler.

Code:
configure:31471: found /usr/local/bin/curl-config
configure:31483: result: /usr/local/bin/curl-config
configure:31515: checking for curl_version() in curl/curl.h
configure:31541: gcc -c -g -O2  -I/usr/local/include conftest.c >&5
configure:31547: $? = 0
configure:31553: result: yes
configure:31685: creating ./config.status

Code:
## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_c_inline=inline
ac_cv_c_volatile=yes
ac_cv_curl_h=yes

Code:
ac_cv_path_ac_pt_CURL_CONFIG=/usr/local/bin/curl-config
 
Und wenn Du nach erfolgreichem Configure "make menuselect" unter Dialplan Funtions nachsiehst? Ist da curl aktiviert?
 
Ja da ist curl aktiviert.

Auf der Konsole erhalte ich folgende Meldung
Code:
[Feb 20 09:49:56] WARNING[9724]: pbx.c:1833 pbx_extension_helper: No application 'curl' for extension (voicemenu-custom-1, s, 2)
 
Code:
core show function CURL
gibt nichts aus?
 
Mein make menuselect gibt aus
Code:
[*] 6.  func_curl

und core show functions

Code:
No function by that name registered.
 
Gibts in /usr/lib/asterisk/modules/ func_curl.so?
 
Ja die ist drin.
 
Was bewirkt preload => func_curl.so in modules.conf?
 
Danke für den Tipp.

Hab preload => func_curl.so in die modules.conf geschrieben, asterisk neu gestartet.

Code:
root@vs163227:/etc/asterisk# asterisk -rx "stop now"
root@vs163227:/etc/asterisk# asterisk   
root@vs163227:/etc/asterisk# asterisk -r
Asterisk 1.4.23.1, Copyright (C) 1999 - 2008 Digium, Inc. and others.

und erhalte immer noch die Meldung
Code:
[Feb 20 12:25:52] WARNING[28447]: pbx.c:1833 pbx_extension_helper: No application 'Curl' for extension (voicemenu-custom-1, s, 2)
 
core set debug 5 setzen und extensions.conf zeigen.
 
extensions.conf
Code:
[sipout]
exten => _X.,1,Answer()
exten => _X.,n,Set(CALLERID(num)=2301879)
exten => _X.,n,Curl(http://www.web.de)
exten => _X.,n,Dial(SIP/${EXTEN}@sipgate-out,30,trg)
exten => _X.,n,Hangup()

[from-sipgate]
exten => _X.,1,Answer()
exten => _X.,n,Hangup()

[lokal]
exten => _X.,1,Answer()
exten => _X.,n,Playback(demo-thanks)
exten => _X.,n,Conference(200/S)
exten => _X.,n,Hangup()

[error]

[general]
static = yes
writeprotect = no
clearglobalvars = no

[globals]
CONSOLE = Console/dsp  ; Console interface for demo
IAXINFO = guest  ; IAXtel username/password
TRUNK = Zap/G2  ; Trunk interface
TRUNKMSD = 1  ; MSD digits to strip (usually 1 or 0)
FEATURES = 
DIALOPTIONS = 
RINGTIME = 20
FOLLOWMEOPTIONS = 
PAGING_HEADER = Intercom
PAGING_TIMEOUT = 60
2301879 = SIP/2301879
GLOBAL_OUTBOUNDCID = 
GLOBAL_OUTBOUNDCIDNAME = 
CID_6000 = 6000

[dundi-e164-canonical]

[dundi-e164-customers]

[dundi-e164-via-pstn]

[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn

[dundi-e164-switch]
switch => DUNDi/e164

[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch

[macro-dundi-e164]
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup

[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)

[iaxprovider]
[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunklocal]
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[international]
ignorepat => 9
include => longdistance
include => trunkint

[longdistance]
ignorepat => 9
include => local
include => trunkld

[local]
ignorepat => 9
include => default
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
include => parkedcalls

[macro-trunkdial]
exten => s,1,Dial(${ARG1})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Hangup
exten => _s-.,1,NoOp

[macro-stdPrivacyexten];
exten => s,1,Dial(${ARG2},20|p)  ; Ring the interface, 20 seconds maximum, call screening 
exten => s,2,Goto(s-${DIALSTATUS},1)  ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(${ARG1},u)  ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1)  ; If they press #, return to start
exten => s-BUSY,1,Voicemail(${ARG1},b)  ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1)  ; If they press #, return to start
exten => s-DONTCALL,1,Goto(${ARG3},s,1)  ; Callee chose to send this call to a polite "Don't call again" script.
exten => s-TORTURE,1,Goto(${ARG4},s,1)  ; Callee chose to send this call to a telemarketer torture script.
exten => _s-.,1,Goto(s-NOANSWER,1)  ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1})  ; If they press *, send the user into VoicemailMain

[macro-page];
exten => s,1,ChanIsAvail(${ARG1}|js)  ; j is for Jump and s is for ANY call
exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
exten => s,n(autoanswer),Set(_ALERT_INFO="RA")  ; This is for the PolyComs
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0)  ; This is for the Grandstream, Snoms, and Others
exten => s,n,NoOp()  ; Add others here and Post on the Wiki!!!!
exten => s,n,Dial(${ARG1}||)
exten => s,n(fail),Hangup

[page]
exten => _X.,1,Macro(page,SIP/${EXTEN})

[default]
exten = 2301879,1,SayDigits(3)
exten = s,1,SayDigits(3)

[macro-stdexten]
exten = s,1,Set(__DYNAMIC_FEATURES=${FEATURES})
exten = s,2,GotoIf($[${FOLLOWME_${ARG1}} = 1]?5:3)
exten = s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,4,Goto(s-${DIALSTATUS},1)
exten = s,5,Macro(stdexten-followme,${ARG1},${ARG2})
exten = s-NOANSWER,1,Voicemail(${ARG1},u)
exten = s-NOANSWER,2,Goto(default,s,1)
exten = s-BUSY,1,Voicemail(${ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ARG1})

[macro-stdexten-followme]
exten = s,1,Answer
exten = s,2,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,3,Set(__FMCIDNUM=${CALLERID(num)})
exten = s,4,Set(__FMCIDNAME=${CALLERID(name)})
exten = s,5,Followme(${ARG1},${FOLLOWMEOPTIONS})
exten = s,6,Voicemail(${ARG1},u)
exten = s-NOANSWER,1,Voicemail(${ARG1},u)
exten = s-BUSY,1,Voicemail(${ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ARG1})

[macro-pagingintercom]
exten = s,1,SIPAddHeader(Alert-Info: ${PAGING_HEADER})
exten = s,2,Set(TIMEOUT(absolute)=${PAGING_TIMEOUT})
exten = s,3,Page(${ARG1}|${ARG2})
exten = s,4,Hangup

[conferences]

[ringgroups]

[queues]

[voicemenus]
exten = 7000,1,Goto(voicemenu-custom-1|s|1)

[voicemailgroups]

[directory]

[page_an_extension]

[pagegroups]

[asterisk_guitools]
exten = executecommand,1,System(${command})
exten = executecommand,n,Hangup()
exten = record_vmenu,1,Answer
exten = record_vmenu,n,Playback(vm-intro)
exten = record_vmenu,n,Record(${var1})
exten = record_vmenu,n,Playback(vm-saved)
exten = record_vmenu,n,Playback(vm-goodbye)
exten = record_vmenu,n,Hangup
exten = play_file,1,Answer
exten = play_file,n,Playback(${var1})
exten = play_file,n,Hangup

[macro-trunkdial-failover-0.3]
exten = s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)
exten = s,2,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1)
exten = s,3,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})
exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
exten = s,n,Goto(1-dial,1)
exten = 1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})
exten = 1-setgbobname,n,Goto(s,3)
exten = 1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})
exten = 1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})
exten = 1-fmsetcid,n,Goto(1-dial,1)
exten = 1-dial,1,Dial(${ARG1})
exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
exten = 1-CHANUNAVAIL,n,Hangup()
exten = 1-CONGESTION,1,Dial(${ARG2})
exten = 1-CONGESTION,n,Hangup()
exten = 1-out,1,Hangup()

[DID_2301879]
include = DID_2301879_default

[DID_2301879_default]
exten = _X.,1,Goto(voicemenu-custom-1|s|1)

[DLPN_DialPlan1]
include = default
include = parkedcalls
include = conferences
include = ringgroups
include = voicemenus
include = queues
include = voicemailgroups
include = directory
include = pagegroups
include = page_an_extension

[voicemenu-custom-1]
include = default
exten = s,1,NoOp(Willkommen)
exten = s,n,Answer()
exten = s,n,Wait(5)
exten = s,n,SayDigits(007)
;exten = s,n,Macro(trunkdial-failover-0.3,${2301879}/3948380964,,2301879,)
exten => _X.,1,dial(${2301879},02218380964)
exten = s,n,Wait(10)
exten = s,n,Hangup()
 
Reden wir jetzt eigentlich über app_curl oder über func_curl?
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.