OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   22-Mar-2008 16:58:07
  Branch: HEAD                             Handle: 2008032215580600

  Modified files:
    openpkg-src/asterisk    asterisk.patch asterisk.spec asterisk.txt

  Log:
    add HTTP upload support (via gmime) to AMI and add CDR support

  Summary:
    Revision    Changes     Path
    1.35        +60 -26     openpkg-src/asterisk/asterisk.patch
    1.62        +7  -2      openpkg-src/asterisk/asterisk.spec
    1.36        +82 -9      openpkg-src/asterisk/asterisk.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/asterisk/asterisk.patch
  ============================================================================
  $ cvs diff -u -r1.34 -r1.35 asterisk.patch
  --- openpkg-src/asterisk/asterisk.patch       20 Mar 2008 19:40:26 -0000      
1.34
  +++ openpkg-src/asterisk/asterisk.patch       22 Mar 2008 15:58:06 -0000      
1.35
  @@ -1,6 +1,6 @@
   Index: Makefile
  ---- Makefile.orig    2008-02-26 21:19:03 +0100
  -+++ Makefile 2008-03-18 22:06:58 +0100
  +--- Makefile.orig    2008-03-18 16:58:50 +0100
  ++++ Makefile 2008-03-22 16:56:21 +0100
   @@ -121,42 +121,20 @@
    
    # Define standard directories for various platforms
  @@ -61,9 +61,43 @@
    ifeq ($(OSARCH),NetBSD)
      ASTCFLAGS+=-pthread -I/usr/pkg/include
    endif
  +@@ -524,8 +496,7 @@
  +     if [ -n "$(OLDHEADERS)" ]; then \
  +             rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
  +     fi
  +-    mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
  +-    mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
  ++    mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr
  +     mkdir -p $(DESTDIR)$(ASTDATADIR)/keys
  +     mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware
  +     mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax
  +Index: cdr/cdr_custom.c
  +--- cdr/cdr_custom.c.orig    2007-11-21 00:16:15 +0100
  ++++ cdr/cdr_custom.c 2008-03-22 16:56:03 +0100
  +@@ -78,7 +78,7 @@
  +                                     ast_log(LOG_WARNING, "Format string too 
long, will be truncated, at line %d\n", var->lineno);
  +                             ast_copy_string(format, var->value, 
sizeof(format) - 1);
  +                             strcat(format,"\n");
  +-                            snprintf(master, sizeof(master),"%s/%s/%s", 
ast_config_AST_LOG_DIR, name, var->name);
  ++                            snprintf(master, sizeof(master),"%s/cdr/%s", 
ast_config_AST_LOG_DIR, var->name);
  +                             if (var->next) {
  +                                     ast_log(LOG_NOTICE, "Sorry, only one 
mapping is supported at this time, mapping '%s' will be ignored at line %d.\n", 
var->next->name, var->next->lineno); 
  +                                     break;
  +Index: cdr/cdr_sqlite3_custom.c
  +--- cdr/cdr_sqlite3_custom.c.orig    2008-03-18 16:58:50 +0100
  ++++ cdr/cdr_sqlite3_custom.c 2008-03-22 16:56:03 +0100
  +@@ -317,7 +317,7 @@
  +             return AST_MODULE_LOAD_DECLINE;
  + 
  +     /* is the database there? */
  +-    snprintf(filename, sizeof(filename), "%s/master.db", 
ast_config_AST_LOG_DIR);
  ++    snprintf(filename, sizeof(filename), "%s/cdr/master.db", 
ast_config_AST_LOG_DIR);
  +     res = sqlite3_open(filename, &db);
  +     if (res != SQLITE_OK) {
  +             ast_log(LOG_ERROR, "Could not open database %s.\n", filename);
   Index: channels/console_video.h
   --- channels/console_video.h.orig    2008-01-09 19:03:40 +0100
  -+++ channels/console_video.h 2008-03-18 22:06:58 +0100
  ++++ channels/console_video.h 2008-03-22 16:56:03 +0100
   @@ -28,10 +28,7 @@
                "console {device}"
    #else
  @@ -77,9 +111,9 @@
    #define CONSOLE_VIDEO_CMDS                  \
        "console {videodevice|videocodec"       \
   Index: configure
  ---- configure.orig   2008-02-23 00:56:55 +0100
  -+++ configure        2008-03-18 22:06:58 +0100
  -@@ -4049,12 +4049,6 @@
  +--- configure.orig   2008-03-18 16:50:53 +0100
  ++++ configure        2008-03-22 16:56:03 +0100
  +@@ -4026,12 +4026,6 @@
        # note- does not work on FreeBSD
    
    case "${host_os}" in
  @@ -92,9 +126,21 @@
         *)
         ac_default_prefix=/usr
         if test ${sysconfdir} = '${prefix}/etc'; then
  +Index: include/asterisk/module.h
  +--- include/asterisk/module.h.orig   2008-02-27 09:20:15 +0100
  ++++ include/asterisk/module.h        2008-03-22 16:56:03 +0100
  +@@ -271,7 +271,7 @@
  + /* forward declare this pointer in modules, so that macro/function
  +    calls that need it can get it, since it will actually be declared
  +    and populated at the end of the module's source file... */
  +-const static __attribute__((unused)) struct ast_module_info 
*ast_module_info;
  ++static const __attribute__((unused)) struct ast_module_info 
*ast_module_info;
  + 
  + #if !defined(EMBEDDED_MODULE)
  + #define __MODULE_INFO_SECTION
   Index: main/Makefile
  ---- main/Makefile.orig       2008-02-28 01:11:31 +0100
  -+++ main/Makefile    2008-03-18 22:06:58 +0100
  +--- main/Makefile.orig       2008-03-17 23:24:46 +0100
  ++++ main/Makefile    2008-03-22 16:56:03 +0100
   @@ -82,10 +82,7 @@
    endif
    
  @@ -108,8 +154,8 @@
    
    ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   Index: main/tcptls.c
  ---- main/tcptls.c.orig       2008-02-06 00:00:15 +0100
  -+++ main/tcptls.c    2008-03-18 22:06:58 +0100
  +--- main/tcptls.c.orig       2008-03-12 23:50:14 +0100
  ++++ main/tcptls.c    2008-03-22 16:56:03 +0100
   @@ -189,6 +189,7 @@
        if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) {
                if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, 
S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0)
  @@ -120,7 +166,7 @@
        ast_verb(0, "SSL certificate ok\n");
   Index: menuselect-tree
   --- menuselect-tree.orig     2008-03-18 18:05:36 +0100
  -+++ menuselect-tree  2008-03-19 21:04:40 +0100
  ++++ menuselect-tree  2008-03-22 16:56:03 +0100
   @@ -262,7 +262,6 @@
    </member>
    <member name="chan_zap" displayname="Zapata Telephony" 
remove_on_change="channels/chan_zap.o channels/chan_zap.so">
  @@ -149,8 +195,8 @@
                <member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM 
format" >
                </member>
   Index: sounds/sounds.xml
  ---- sounds/sounds.xml.orig   2006-10-25 19:12:59 +0200
  -+++ sounds/sounds.xml        2008-03-18 22:07:44 +0100
  +--- sounds/sounds.xml.orig   2008-03-06 05:46:17 +0100
  ++++ sounds/sounds.xml        2008-03-22 16:56:03 +0100
   @@ -4,9 +4,9 @@
                <member name="CORE-SOUNDS-EN-ULAW" displayname="English, mu-Law 
format">
                </member>
  @@ -162,7 +208,7 @@
                </member>
                <member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 
format">
                </member>
  -@@ -58,6 +58,7 @@
  +@@ -64,6 +64,7 @@
                <member name="EXTRA-SOUNDS-EN-ULAW" displayname="English, 
mu-Law format">
                </member>
                <member name="EXTRA-SOUNDS-EN-ALAW" displayname="English, a-Law 
format">
  @@ -170,15 +216,3 @@
                </member>
                <member name="EXTRA-SOUNDS-EN-GSM" displayname="English, GSM 
format" >
                </member>
  -Index: include/asterisk/module.h
  ---- include/asterisk/module.h.orig   2008-02-27 09:20:15 +0100
  -+++ include/asterisk/module.h        2008-03-18 23:31:42 +0100
  -@@ -271,7 +271,7 @@
  - /* forward declare this pointer in modules, so that macro/function
  -    calls that need it can get it, since it will actually be declared
  -    and populated at the end of the module's source file... */
  --const static __attribute__((unused)) struct ast_module_info 
*ast_module_info;
  -+static const __attribute__((unused)) struct ast_module_info 
*ast_module_info;
  - 
  - #if !defined(EMBEDDED_MODULE)
  - #define __MODULE_INFO_SECTION
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/asterisk/asterisk.spec
  ============================================================================
  $ cvs diff -u -r1.61 -r1.62 asterisk.spec
  --- openpkg-src/asterisk/asterisk.spec        22 Mar 2008 13:18:18 -0000      
1.61
  +++ openpkg-src/asterisk/asterisk.spec        22 Mar 2008 15:58:06 -0000      
1.62
  @@ -71,8 +71,8 @@
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20040130, bison, gcc, make, grep
   PreReq:       OpenPKG, openpkg >= 20040130
  -BuildPreReq:  zlib, curl, openssl, ncurses, speex, popt
  -PreReq:       zlib, curl, openssl, ncurses, speex, popt
  +BuildPreReq:  zlib, curl, openssl, ncurses, speex, popt, gmime
  +PreReq:       zlib, curl, openssl, ncurses, speex, popt, gmime
   %if "%{with_ogg}" == "yes"
   BuildPreReq:  vorbis-libs
   PreReq:       vorbis-libs
  @@ -156,6 +156,7 @@
       %setup -q -n asterisk-%{V_asterisk} -D -T -a 1
       %setup -q -n asterisk-%{V_asterisk} -D -T -a 4
       %patch -p0
  +    exit 0
       cp %{SOURCE2} %{SOURCE3} sounds/
       %{l_shtool} subst \
           -e 's;\(CORE_SOUNDS_VERSION\):=.*$;\1:=%{V_asterisk_sounds_core};' \
  @@ -253,6 +254,7 @@
           --with-speex=%{l_prefix} \
           --with-speexdsp=%{l_prefix} \
           --with-ssl=%{l_prefix} \
  +        --with-gmime=%{l_prefix} \
           --with-z=%{l_prefix} \
   %if "%{with_ogg}" == "yes"
           --with-ogg=%{l_prefix} \
  @@ -409,6 +411,9 @@
   %if "%{with_capi}" == "no"
           [ ".$name" = ".capi.conf" ] && continue
   %endif
  +%if "%{with_sqlite}" == "no"
  +        [ ".$name" = ".cdr_sqlite3_custom.conf" ] && continue
  +%endif
           (echo ""; cat %{SOURCE asterisk.txt}; echo "") |\
               sed -e "1,/^<file name=\"$name\">/d" -e "/<\/file>/,\$d" >$name
           %{l_shtool} install -c -m 644 %{l_value -s -a} \
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/asterisk/asterisk.txt
  ============================================================================
  $ cvs diff -u -r1.35 -r1.36 asterisk.txt
  --- openpkg-src/asterisk/asterisk.txt 22 Mar 2008 11:25:46 -0000      1.35
  +++ openpkg-src/asterisk/asterisk.txt 22 Mar 2008 15:58:06 -0000      1.36
  @@ -75,17 +75,45 @@
   ;;
   
   [general]
  -enabled         = no
  -port            = 5038
  -bindaddr        = 10.10.0.1
  -displayconnects = yes
  +enabled            = yes
  +webenabled         = no
  +bindaddr           = 127.0.0.1
  +port               = 5038
  +sslenable          = no
  +sslbindaddr        = 127.0.0.1
  +sslbindport        = 5039
  +sslcert            = @l_prefix@/etc/asterisk/asterisk.pem
  +displayconnects    = yes
  +allowmultiplelogin = yes
  +timestampevents    = yes
   
   [asterisk]
  -secret          = asterisk
  -deny            = 0.0.0.0/0.0.0.0
  -permit          = 10.10.0.0/255.255.0.0
  -read            = system,call,log,verbose,command,agent,user
  -write           = system,call,log,verbose,command,agent,user
  +secret             = asterisk
  +deny               = 0.0.0.0/0.0.0.0
  +permit             = 127.0.0.1/255.0.0.0
  +read               = 
system,call,agent,user,config,log,verbose,dtmf,reporting,cdr,dialplan
  +write              = system,call,agent,user,config,command,reporting
  +
  +</file>
  +<file name="http.conf">
  +;;
  +;;  http.conf -- Asterisk HTTP Server Interface
  +;;
  +
  +[general]
  +enabled            = no
  +bindaddr           = 127.0.0.1
  +bindport           = 8088
  +sslenable          = no
  +slbindport         = 8089
  +sslbindaddr        = 127.0.0.1
  +sslcert            = @l_prefix@/etc/asterisk/asterisk.pem
  +enablestatic       = yes
  +prefix             = asterisk
  +redirect           = / /asterisk/static/docs/index.html
  +
  +[post_mappings]
  +uploads            = @l_prefix@/var/asterisk/spool/uploads/
   
   </file>
   <file name="sip.conf">
  @@ -424,6 +452,51 @@
   1                = 1,Example,[EMAIL PROTECTED],,|delete=yes
   
   </file>
  +<file name="cdr.conf">
  +;;
  +;;  cdr.conf -- Asterisk Call Detail Record (CDR) configuration
  +;;
  +
  +[general]
  +enable             = yes
  +unanswered         = no
  +batch              = no
  +size               = 100
  +time               = 300
  +scheduleronly      = no
  +safeshutdown       = yes
  +endbeforehexten    = yes
  +
  +</file>
  +<file name="cdr_custom.conf">
  +;;
  +;;  cdr_custom.conf -- Asterisk Call Detail Record (CDR) via Comma Separated 
Value (CSV) format configuration
  +;;
  +
  +[mappings]
  +master.csv         = "${CDR(start)}", "${CDR(answer)}", "${CDR(end)}", 
"${CDR(duration)}", "${CDR(billsec)}", "${CDR(clid)}", "${CDR(src)}", 
"${CDR(dst)}", "${CDR(dcontext)}", "${CDR(channel)}", "${CDR(dstchannel)}", 
"${CDR(lastapp)}", "${CDR(lastdata)}", "${CDR(disposition)}", 
"${CDR(amaflags)}", "${CDR(accountcode)}", "${CDR(uniqueid)}", 
"${CDR(userfield)}"
  +
  +</file>
  +<file name="cdr_sqlite3_custom.conf">
  +;;
  +;;  cdr_sqlite3_custom.conf -- Asterisk Call Detail Record (CDR) via SQLite 
RDBMS format configuration
  +;;
  +
  +[master]
  +table              = cdr
  +columns            = start, answer, end, duration, billsec, clid, src, dst, 
dcontext, channel, dstchannel, lastapp, lastdata, disposition, amaflags, 
accountcode, uniqueid, userfield
  +values             = "${CDR(start)}", "${CDR(answer)}", "${CDR(end)}", 
"${CDR(duration)}", "${CDR(billsec)}", "${CDR(clid)}", "${CDR(src)}", 
"${CDR(dst)}", "${CDR(dcontext)}", "${CDR(channel)}", "${CDR(dstchannel)}", 
"${CDR(lastapp)}", "${CDR(lastdata)}", "${CDR(disposition)}", 
"${CDR(amaflags)}", "${CDR(accountcode)}", "${CDR(uniqueid)}", 
"${CDR(userfield)}"
  +
  +</file>
  +<file name="cdr_manager.conf">
  +;;
  +;;  cdr_manager.conf -- Asterisk Call Detail Record (CDR) via Asterisk 
Manager Interface (AMI) configuration
  +;;
  +
  +[general]
  +enabled            = yes
  +
  +</file>
   <file name="meetme.conf">
   ;;
   ;;  meetme.conf -- Asterisk conference configuration
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to