├── .env.example ├── .gitignore ├── .travis.yml ├── README.md ├── asterisk ├── Dockerfile ├── docker-entrypoint.sh ├── etc │ ├── asterisk │ │ ├── ari.conf.tmpl │ │ ├── cdr_adaptive_odbc.conf.tmpl │ │ ├── extensions.conf.tmpl │ │ ├── http.conf.tmpl │ │ ├── logger.conf.tmpl │ │ ├── manager.conf.tmpl │ │ ├── modules.conf.tmpl │ │ └── res_odbc.conf.tmpl │ ├── odbc.ini.tmpl │ ├── odbcinst.ini.tmpl │ └── supervisord.conf └── services │ ├── ami_broker.py │ ├── asterisk_helper.py │ ├── broker.py │ ├── local_conf.py.tmpl │ ├── mqtt_client.py │ ├── odoo_broker.py │ ├── requirements.txt │ ├── run_agent.sh │ └── stasis_apps.py ├── broker └── Dockerfile ├── deploy ├── ansible-requirements.txt ├── ansible.cfg ├── container.yml ├── meta.yml ├── requirements.yml └── roles │ └── broker │ ├── .travis.yml │ ├── README.md │ ├── defaults │ └── main.yml │ ├── meta │ ├── container.yml │ └── main.yml │ ├── tasks │ └── main.yml │ └── test │ └── test.yml ├── docker-compose.override.yml.example ├── docker-compose.yml └── odoo ├── .dockerignore ├── Dockerfile ├── VERSION ├── base_requirements.txt ├── before-migrate-entrypoint.d └── .gitkeep ├── bin ├── docker-entrypoint.sh ├── lint ├── migrate ├── runtests ├── testdb-gen ├── testdb-update └── wait_postgres.sh ├── data └── images │ └── logo.png ├── etc └── odoo.cfg.tmpl ├── external-src └── web_notify │ ├── README.rst │ ├── __init__.py │ ├── __manifest__.py │ ├── i18n │ ├── de.po │ ├── es.po │ └── hr.po │ ├── models │ ├── __init__.py │ └── res_users.py │ ├── static │ ├── description │ │ ├── icon.png │ │ └── notifications_screenshot.png │ └── src │ │ └── js │ │ └── web_client.js │ ├── tests │ ├── __init__.py │ └── test_res_users.py │ └── views │ └── web_notify.xml ├── local-src ├── asterisk_base │ ├── __init__.py │ ├── __openerp__.py │ ├── data │ │ └── .keep │ ├── models │ │ ├── __init__.py │ │ ├── channel.py │ │ ├── conf.py │ │ ├── server.py │ │ └── settings.py │ ├── static │ │ ├── lib │ │ │ ├── codemirror │ │ │ │ ├── .gitattributes │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── AUTHORS │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── addon │ │ │ │ │ ├── comment │ │ │ │ │ │ ├── comment.js │ │ │ │ │ │ └── continuecomment.js │ │ │ │ │ ├── dialog │ │ │ │ │ │ ├── dialog.css │ │ │ │ │ │ └── dialog.js │ │ │ │ │ ├── display │ │ │ │ │ │ ├── autorefresh.js │ │ │ │ │ │ ├── fullscreen.css │ │ │ │ │ │ ├── fullscreen.js │ │ │ │ │ │ ├── panel.js │ │ │ │ │ │ ├── placeholder.js │ │ │ │ │ │ └── rulers.js │ │ │ │ │ ├── edit │ │ │ │ │ │ ├── closebrackets.js │ │ │ │ │ │ ├── closetag.js │ │ │ │ │ │ ├── continuelist.js │ │ │ │ │ │ ├── matchbrackets.js │ │ │ │ │ │ ├── matchtags.js │ │ │ │ │ │ └── trailingspace.js │ │ │ │ │ ├── fold │ │ │ │ │ │ ├── brace-fold.js │ │ │ │ │ │ ├── comment-fold.js │ │ │ │ │ │ ├── foldcode.js │ │ │ │ │ │ ├── foldgutter.css │ │ │ │ │ │ ├── foldgutter.js │ │ │ │ │ │ ├── indent-fold.js │ │ │ │ │ │ ├── markdown-fold.js │ │ │ │ │ │ └── xml-fold.js │ │ │ │ │ ├── hint │ │ │ │ │ │ ├── anyword-hint.js │ │ │ │ │ │ ├── css-hint.js │ │ │ │ │ │ ├── html-hint.js │ │ │ │ │ │ ├── javascript-hint.js │ │ │ │ │ │ ├── show-hint.css │ │ │ │ │ │ ├── show-hint.js │ │ │ │ │ │ ├── sql-hint.js │ │ │ │ │ │ └── xml-hint.js │ │ │ │ │ ├── lint │ │ │ │ │ │ ├── coffeescript-lint.js │ │ │ │ │ │ ├── css-lint.js │ │ │ │ │ │ ├── html-lint.js │ │ │ │ │ │ ├── javascript-lint.js │ │ │ │ │ │ ├── json-lint.js │ │ │ │ │ │ ├── lint.css │ │ │ │ │ │ ├── lint.js │ │ │ │ │ │ └── yaml-lint.js │ │ │ │ │ ├── merge │ │ │ │ │ │ ├── merge.css │ │ │ │ │ │ └── merge.js │ │ │ │ │ ├── mode │ │ │ │ │ │ ├── loadmode.js │ │ │ │ │ │ ├── multiplex.js │ │ │ │ │ │ ├── multiplex_test.js │ │ │ │ │ │ ├── overlay.js │ │ │ │ │ │ └── simple.js │ │ │ │ │ ├── runmode │ │ │ │ │ │ ├── colorize.js │ │ │ │ │ │ ├── runmode-standalone.js │ │ │ │ │ │ ├── runmode.js │ │ │ │ │ │ └── runmode.node.js │ │ │ │ │ ├── scroll │ │ │ │ │ │ ├── annotatescrollbar.js │ │ │ │ │ │ ├── scrollpastend.js │ │ │ │ │ │ ├── simplescrollbars.css │ │ │ │ │ │ └── simplescrollbars.js │ │ │ │ │ ├── search │ │ │ │ │ │ ├── jump-to-line.js │ │ │ │ │ │ ├── match-highlighter.js │ │ │ │ │ │ ├── matchesonscrollbar.css │ │ │ │ │ │ ├── matchesonscrollbar.js │ │ │ │ │ │ ├── search.js │ │ │ │ │ │ └── searchcursor.js │ │ │ │ │ ├── selection │ │ │ │ │ │ ├── active-line.js │ │ │ │ │ │ ├── mark-selection.js │ │ │ │ │ │ └── selection-pointer.js │ │ │ │ │ ├── tern │ │ │ │ │ │ ├── tern.css │ │ │ │ │ │ ├── tern.js │ │ │ │ │ │ └── worker.js │ │ │ │ │ └── wrap │ │ │ │ │ │ └── hardwrap.js │ │ │ │ ├── bin │ │ │ │ │ ├── authors.sh │ │ │ │ │ ├── compress │ │ │ │ │ ├── lint │ │ │ │ │ ├── release │ │ │ │ │ ├── source-highlight │ │ │ │ │ └── upload-release.js │ │ │ │ ├── demo │ │ │ │ │ ├── activeline.html │ │ │ │ │ ├── anywordhint.html │ │ │ │ │ ├── bidi.html │ │ │ │ │ ├── btree.html │ │ │ │ │ ├── buffers.html │ │ │ │ │ ├── changemode.html │ │ │ │ │ ├── closebrackets.html │ │ │ │ │ ├── closetag.html │ │ │ │ │ ├── complete.html │ │ │ │ │ ├── emacs.html │ │ │ │ │ ├── folding.html │ │ │ │ │ ├── fullscreen.html │ │ │ │ │ ├── hardwrap.html │ │ │ │ │ ├── html5complete.html │ │ │ │ │ ├── indentwrap.html │ │ │ │ │ ├── lint.html │ │ │ │ │ ├── loadmode.html │ │ │ │ │ ├── marker.html │ │ │ │ │ ├── markselection.html │ │ │ │ │ ├── matchhighlighter.html │ │ │ │ │ ├── matchtags.html │ │ │ │ │ ├── merge.html │ │ │ │ │ ├── multiplex.html │ │ │ │ │ ├── mustache.html │ │ │ │ │ ├── panel.html │ │ │ │ │ ├── placeholder.html │ │ │ │ │ ├── preview.html │ │ │ │ │ ├── requirejs.html │ │ │ │ │ ├── resize.html │ │ │ │ │ ├── rulers.html │ │ │ │ │ ├── runmode.html │ │ │ │ │ ├── search.html │ │ │ │ │ ├── simplemode.html │ │ │ │ │ ├── simplescrollbars.html │ │ │ │ │ ├── spanaffectswrapping_shim.html │ │ │ │ │ ├── sublime.html │ │ │ │ │ ├── tern.html │ │ │ │ │ ├── theme.html │ │ │ │ │ ├── trailingspace.html │ │ │ │ │ ├── variableheight.html │ │ │ │ │ ├── vim.html │ │ │ │ │ ├── visibletabs.html │ │ │ │ │ ├── widget.html │ │ │ │ │ └── xmlcomplete.html │ │ │ │ ├── doc │ │ │ │ │ ├── activebookmark.js │ │ │ │ │ ├── docs.css │ │ │ │ │ ├── internals.html │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── logo.svg │ │ │ │ │ ├── manual.html │ │ │ │ │ ├── realworld.html │ │ │ │ │ ├── releases.html │ │ │ │ │ ├── reporting.html │ │ │ │ │ ├── upgrade_v2.2.html │ │ │ │ │ ├── upgrade_v3.html │ │ │ │ │ ├── upgrade_v4.html │ │ │ │ │ └── yinyang.png │ │ │ │ ├── index.html │ │ │ │ ├── keymap │ │ │ │ │ ├── emacs.js │ │ │ │ │ ├── sublime.js │ │ │ │ │ └── vim.js │ │ │ │ ├── lib │ │ │ │ │ ├── codemirror.css │ │ │ │ │ └── codemirror.js │ │ │ │ ├── mode │ │ │ │ │ ├── apl │ │ │ │ │ │ ├── apl.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── asciiarmor │ │ │ │ │ │ ├── asciiarmor.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── asn.1 │ │ │ │ │ │ ├── asn.1.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── asterisk │ │ │ │ │ │ ├── asterisk.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── brainfuck │ │ │ │ │ │ ├── brainfuck.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── clike │ │ │ │ │ │ ├── clike.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── scala.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── clojure │ │ │ │ │ │ ├── clojure.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── cmake │ │ │ │ │ │ ├── cmake.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── cobol │ │ │ │ │ │ ├── cobol.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── coffeescript │ │ │ │ │ │ ├── coffeescript.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── commonlisp │ │ │ │ │ │ ├── commonlisp.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── crystal │ │ │ │ │ │ ├── crystal.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── css │ │ │ │ │ │ ├── css.js │ │ │ │ │ │ ├── gss.html │ │ │ │ │ │ ├── gss_test.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── less.html │ │ │ │ │ │ ├── less_test.js │ │ │ │ │ │ ├── scss.html │ │ │ │ │ │ ├── scss_test.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── cypher │ │ │ │ │ │ ├── cypher.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── d │ │ │ │ │ │ ├── d.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── dart │ │ │ │ │ │ ├── dart.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── diff │ │ │ │ │ │ ├── diff.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── django │ │ │ │ │ │ ├── django.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── dockerfile │ │ │ │ │ │ ├── dockerfile.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── dtd │ │ │ │ │ │ ├── dtd.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── dylan │ │ │ │ │ │ ├── dylan.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── ebnf │ │ │ │ │ │ ├── ebnf.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── ecl │ │ │ │ │ │ ├── ecl.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── eiffel │ │ │ │ │ │ ├── eiffel.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── elm │ │ │ │ │ │ ├── elm.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── erlang │ │ │ │ │ │ ├── erlang.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── factor │ │ │ │ │ │ ├── factor.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── fcl │ │ │ │ │ │ ├── fcl.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── forth │ │ │ │ │ │ ├── forth.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── fortran │ │ │ │ │ │ ├── fortran.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── gas │ │ │ │ │ │ ├── gas.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── gfm │ │ │ │ │ │ ├── gfm.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── gherkin │ │ │ │ │ │ ├── gherkin.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── go │ │ │ │ │ │ ├── go.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── groovy │ │ │ │ │ │ ├── groovy.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── haml │ │ │ │ │ │ ├── haml.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── handlebars │ │ │ │ │ │ ├── handlebars.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── haskell-literate │ │ │ │ │ │ ├── haskell-literate.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── haskell │ │ │ │ │ │ ├── haskell.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── haxe │ │ │ │ │ │ ├── haxe.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── htmlembedded │ │ │ │ │ │ ├── htmlembedded.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── htmlmixed │ │ │ │ │ │ ├── htmlmixed.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── http │ │ │ │ │ │ ├── http.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── idl │ │ │ │ │ │ ├── idl.js │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── index.html │ │ │ │ │ ├── javascript │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── javascript.js │ │ │ │ │ │ ├── json-ld.html │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ └── typescript.html │ │ │ │ │ ├── jinja2 │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── jinja2.js │ │ │ │ │ ├── jsx │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── jsx.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── julia │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── julia.js │ │ │ │ │ ├── livescript │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── livescript.js │ │ │ │ │ ├── lua │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── lua.js │ │ │ │ │ ├── markdown │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── markdown.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── mathematica │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── mathematica.js │ │ │ │ │ ├── mbox │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── mbox.js │ │ │ │ │ ├── meta.js │ │ │ │ │ ├── mirc │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── mirc.js │ │ │ │ │ ├── mllike │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── mllike.js │ │ │ │ │ ├── modelica │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── modelica.js │ │ │ │ │ ├── mscgen │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── mscgen.js │ │ │ │ │ │ ├── mscgen_test.js │ │ │ │ │ │ ├── msgenny_test.js │ │ │ │ │ │ └── xu_test.js │ │ │ │ │ ├── mumps │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── mumps.js │ │ │ │ │ ├── nginx │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── nginx.js │ │ │ │ │ ├── nsis │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── nsis.js │ │ │ │ │ ├── ntriples │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── ntriples.js │ │ │ │ │ ├── octave │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── octave.js │ │ │ │ │ ├── oz │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── oz.js │ │ │ │ │ ├── pascal │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── pascal.js │ │ │ │ │ ├── pegjs │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── pegjs.js │ │ │ │ │ ├── perl │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── perl.js │ │ │ │ │ ├── php │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── php.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── pig │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── pig.js │ │ │ │ │ ├── powershell │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── powershell.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── properties │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── properties.js │ │ │ │ │ ├── protobuf │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── protobuf.js │ │ │ │ │ ├── pug │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── pug.js │ │ │ │ │ ├── puppet │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── puppet.js │ │ │ │ │ ├── python │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── python.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── q │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── q.js │ │ │ │ │ ├── r │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── r.js │ │ │ │ │ ├── rpm │ │ │ │ │ │ ├── changes │ │ │ │ │ │ │ └── index.html │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── rpm.js │ │ │ │ │ ├── rst │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── rst.js │ │ │ │ │ ├── ruby │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── ruby.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── rust │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── rust.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── sas │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── sas.js │ │ │ │ │ ├── sass │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── sass.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── scheme │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── scheme.js │ │ │ │ │ ├── shell │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── shell.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── sieve │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── sieve.js │ │ │ │ │ ├── slim │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── slim.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── smalltalk │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── smalltalk.js │ │ │ │ │ ├── smarty │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── smarty.js │ │ │ │ │ ├── solr │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── solr.js │ │ │ │ │ ├── soy │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── soy.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── sparql │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── sparql.js │ │ │ │ │ ├── spreadsheet │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── spreadsheet.js │ │ │ │ │ ├── sql │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── sql.js │ │ │ │ │ ├── stex │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── stex.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── stylus │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── stylus.js │ │ │ │ │ ├── swift │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── swift.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── tcl │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── tcl.js │ │ │ │ │ ├── textile │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ └── textile.js │ │ │ │ │ ├── tiddlywiki │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── tiddlywiki.css │ │ │ │ │ │ └── tiddlywiki.js │ │ │ │ │ ├── tiki │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── tiki.css │ │ │ │ │ │ └── tiki.js │ │ │ │ │ ├── toml │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── toml.js │ │ │ │ │ ├── tornado │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── tornado.js │ │ │ │ │ ├── troff │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── troff.js │ │ │ │ │ ├── ttcn-cfg │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── ttcn-cfg.js │ │ │ │ │ ├── ttcn │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── ttcn.js │ │ │ │ │ ├── turtle │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── turtle.js │ │ │ │ │ ├── twig │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── twig.js │ │ │ │ │ ├── vb │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── vb.js │ │ │ │ │ ├── vbscript │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── vbscript.js │ │ │ │ │ ├── velocity │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── velocity.js │ │ │ │ │ ├── verilog │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ └── verilog.js │ │ │ │ │ ├── vhdl │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── vhdl.js │ │ │ │ │ ├── vue │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── vue.js │ │ │ │ │ ├── webidl │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── webidl.js │ │ │ │ │ ├── xml │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ └── xml.js │ │ │ │ │ ├── xquery │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── test.js │ │ │ │ │ │ └── xquery.js │ │ │ │ │ ├── yacas │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── yacas.js │ │ │ │ │ ├── yaml-frontmatter │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── yaml-frontmatter.js │ │ │ │ │ ├── yaml │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── yaml.js │ │ │ │ │ └── z80 │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── z80.js │ │ │ │ ├── package.json │ │ │ │ ├── rollup.config.js │ │ │ │ ├── src │ │ │ │ │ ├── codemirror.js │ │ │ │ │ ├── display │ │ │ │ │ │ ├── Display.js │ │ │ │ │ │ ├── focus.js │ │ │ │ │ │ ├── gutters.js │ │ │ │ │ │ ├── highlight_worker.js │ │ │ │ │ │ ├── line_numbers.js │ │ │ │ │ │ ├── mode_state.js │ │ │ │ │ │ ├── operations.js │ │ │ │ │ │ ├── scroll_events.js │ │ │ │ │ │ ├── scrollbars.js │ │ │ │ │ │ ├── scrolling.js │ │ │ │ │ │ ├── selection.js │ │ │ │ │ │ ├── update_display.js │ │ │ │ │ │ ├── update_line.js │ │ │ │ │ │ ├── update_lines.js │ │ │ │ │ │ └── view_tracking.js │ │ │ │ │ ├── edit │ │ │ │ │ │ ├── CodeMirror.js │ │ │ │ │ │ ├── commands.js │ │ │ │ │ │ ├── deleteNearSelection.js │ │ │ │ │ │ ├── drop_events.js │ │ │ │ │ │ ├── fromTextArea.js │ │ │ │ │ │ ├── global_events.js │ │ │ │ │ │ ├── key_events.js │ │ │ │ │ │ ├── legacy.js │ │ │ │ │ │ ├── main.js │ │ │ │ │ │ ├── methods.js │ │ │ │ │ │ ├── mouse_events.js │ │ │ │ │ │ ├── options.js │ │ │ │ │ │ └── utils.js │ │ │ │ │ ├── input │ │ │ │ │ │ ├── ContentEditableInput.js │ │ │ │ │ │ ├── TextareaInput.js │ │ │ │ │ │ ├── indent.js │ │ │ │ │ │ ├── input.js │ │ │ │ │ │ ├── keymap.js │ │ │ │ │ │ ├── keynames.js │ │ │ │ │ │ └── movement.js │ │ │ │ │ ├── line │ │ │ │ │ │ ├── highlight.js │ │ │ │ │ │ ├── line_data.js │ │ │ │ │ │ ├── pos.js │ │ │ │ │ │ ├── saw_special_spans.js │ │ │ │ │ │ ├── spans.js │ │ │ │ │ │ └── utils_line.js │ │ │ │ │ ├── measurement │ │ │ │ │ │ ├── position_measurement.js │ │ │ │ │ │ └── widgets.js │ │ │ │ │ ├── model │ │ │ │ │ │ ├── Doc.js │ │ │ │ │ │ ├── change_measurement.js │ │ │ │ │ │ ├── changes.js │ │ │ │ │ │ ├── chunk.js │ │ │ │ │ │ ├── document_data.js │ │ │ │ │ │ ├── history.js │ │ │ │ │ │ ├── line_widget.js │ │ │ │ │ │ ├── mark_text.js │ │ │ │ │ │ ├── selection.js │ │ │ │ │ │ └── selection_updates.js │ │ │ │ │ ├── modes.js │ │ │ │ │ └── util │ │ │ │ │ │ ├── StringStream.js │ │ │ │ │ │ ├── bidi.js │ │ │ │ │ │ ├── browser.js │ │ │ │ │ │ ├── dom.js │ │ │ │ │ │ ├── event.js │ │ │ │ │ │ ├── feature_detection.js │ │ │ │ │ │ ├── misc.js │ │ │ │ │ │ └── operation_group.js │ │ │ │ ├── test │ │ │ │ │ ├── comment_test.js │ │ │ │ │ ├── contenteditable_test.js │ │ │ │ │ ├── doc_test.js │ │ │ │ │ ├── driver.js │ │ │ │ │ ├── emacs_test.js │ │ │ │ │ ├── index.html │ │ │ │ │ ├── lint.js │ │ │ │ │ ├── mode_test.css │ │ │ │ │ ├── mode_test.js │ │ │ │ │ ├── multi_test.js │ │ │ │ │ ├── phantom_driver.js │ │ │ │ │ ├── run.js │ │ │ │ │ ├── scroll_test.js │ │ │ │ │ ├── search_test.js │ │ │ │ │ ├── sql-hint-test.js │ │ │ │ │ ├── sublime_test.js │ │ │ │ │ ├── test.js │ │ │ │ │ └── vim_test.js │ │ │ │ └── theme │ │ │ │ │ ├── 3024-day.css │ │ │ │ │ ├── 3024-night.css │ │ │ │ │ ├── abcdef.css │ │ │ │ │ ├── ambiance-mobile.css │ │ │ │ │ ├── ambiance.css │ │ │ │ │ ├── base16-dark.css │ │ │ │ │ ├── base16-light.css │ │ │ │ │ ├── bespin.css │ │ │ │ │ ├── blackboard.css │ │ │ │ │ ├── cobalt.css │ │ │ │ │ ├── colorforth.css │ │ │ │ │ ├── dracula.css │ │ │ │ │ ├── duotone-dark.css │ │ │ │ │ ├── duotone-light.css │ │ │ │ │ ├── eclipse.css │ │ │ │ │ ├── elegant.css │ │ │ │ │ ├── erlang-dark.css │ │ │ │ │ ├── hopscotch.css │ │ │ │ │ ├── icecoder.css │ │ │ │ │ ├── isotope.css │ │ │ │ │ ├── lesser-dark.css │ │ │ │ │ ├── liquibyte.css │ │ │ │ │ ├── material.css │ │ │ │ │ ├── mbo.css │ │ │ │ │ ├── mdn-like.css │ │ │ │ │ ├── midnight.css │ │ │ │ │ ├── monokai.css │ │ │ │ │ ├── neat.css │ │ │ │ │ ├── neo.css │ │ │ │ │ ├── night.css │ │ │ │ │ ├── panda-syntax.css │ │ │ │ │ ├── paraiso-dark.css │ │ │ │ │ ├── paraiso-light.css │ │ │ │ │ ├── pastel-on-dark.css │ │ │ │ │ ├── railscasts.css │ │ │ │ │ ├── rubyblue.css │ │ │ │ │ ├── seti.css │ │ │ │ │ ├── solarized.css │ │ │ │ │ ├── the-matrix.css │ │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ │ ├── ttcn.css │ │ │ │ │ ├── twilight.css │ │ │ │ │ ├── vibrant-ink.css │ │ │ │ │ ├── xq-dark.css │ │ │ │ │ ├── xq-light.css │ │ │ │ │ ├── yeti.css │ │ │ │ │ └── zenburn.css │ │ │ └── xterm │ │ │ │ └── dist │ │ │ │ ├── addons │ │ │ │ ├── attach │ │ │ │ │ ├── attach.js │ │ │ │ │ └── package.json │ │ │ │ ├── fit │ │ │ │ │ ├── fit.js │ │ │ │ │ └── package.json │ │ │ │ ├── fullscreen │ │ │ │ │ ├── fullscreen.css │ │ │ │ │ ├── fullscreen.js │ │ │ │ │ └── package.json │ │ │ │ ├── linkify │ │ │ │ │ └── linkify.js │ │ │ │ └── terminado │ │ │ │ │ ├── package.json │ │ │ │ │ └── terminado.js │ │ │ │ ├── xterm.css │ │ │ │ ├── xterm.js │ │ │ │ └── xterm.js.map │ │ └── src │ │ │ ├── js │ │ │ ├── asterisk_conf.js │ │ │ ├── channels.js │ │ │ └── server_cli.js │ │ │ └── xml │ │ │ └── resource.xml │ └── views │ │ ├── channel.xml │ │ ├── channels_js_disabled.xml │ │ ├── conf.xml │ │ ├── server.xml │ │ ├── settings.xml │ │ ├── templates.xml │ │ └── views.xml ├── asterisk_cdr │ ├── __init__.py │ ├── __openerp__.py │ ├── models │ │ ├── __init__.py │ │ ├── cdr.py │ │ └── cel.py │ └── views │ │ ├── cdr.xml │ │ └── cel.xml ├── asterisk_conference │ ├── __init__.py.disabled │ ├── __openerp__.py.disabled │ ├── asterisk.py │ ├── controllers.py │ ├── models.py │ ├── requirements.txt │ ├── security │ │ └── ir.model.access.csv │ ├── static │ │ └── src │ │ │ ├── js │ │ │ └── participants.js │ │ │ └── xml │ │ │ └── participants.xml │ └── views │ │ └── conference.xml ├── asterisk_extensions │ ├── __init__.py │ ├── __openerp__.py.disabled │ ├── extensions.py │ └── views.xml ├── asterisk_queues │ ├── __openerp__.py.disabled │ ├── queue.py │ └── queue.xml └── asterisk_sip │ ├── __init__.py │ ├── __openerp__.py │ ├── models │ ├── __init__.py │ ├── peer.py │ ├── peer_status.py │ ├── res_partner.py │ └── res_users.py │ ├── static │ └── src │ │ ├── js │ │ └── originate_call.js │ │ └── xml │ │ └── templates.xml │ └── views │ ├── common_views.xml │ ├── peer_status.xml │ ├── res_partner.xml │ ├── res_users.xml │ ├── resources.xml │ ├── trunk.xml │ └── user.xml ├── migration.yml ├── requirements.txt ├── setup.py ├── songs ├── __init__.py └── install │ ├── __init__.py │ ├── base.py │ └── demo.py └── start-entrypoint.d └── 000_set_base_url /.env.example: -------------------------------------------------------------------------------- 1 | SUBNET=10.18.0.0/24 2 | BRIDGE_IP=10.18.0.1 3 | ODOO_IP=10.18.0.2 4 | DB_IP=10.18.0.3 5 | NGINX_IP=10.18.0.4 6 | BROKER_IP=10.18.0.5 7 | ASTERISK_IP=10.18.0.6 8 | #MARABUNTA_FORCE_VERSION=1.0.0 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.idea 2 | *.pyc 3 | .*.swp 4 | env/ 5 | .env 6 | local_conf.py 7 | pymakr.conf 8 | docker-compose.override.yml 9 | deploy/ansible-deployment 10 | odoo/src/odoo 11 | # Ignore .conf files from local bound conainer folder 12 | asterisk/etc/asterisk/*.conf 13 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | sudo: false 3 | cache: 4 | apt: true 5 | directories: 6 | - $HOME/.cache/pip 7 | 8 | python: 9 | - "2.7" 10 | 11 | addons: 12 | apt: 13 | packages: 14 | - expect-dev # provides unbuffer utility 15 | - python-lxml # because pip installation is slow 16 | - python-simplejson 17 | - python-serial 18 | - python-yaml 19 | 20 | env: 21 | global: 22 | - VERSION="10.0" TESTS="0" LINT_CHECK="0" 23 | - TRAVIS_BUILD_DIR="/home/odoo/build/ygol/odoo_asterisk/odoo-addons" 24 | 25 | matrix: 26 | - LINT_CHECK="1" 27 | - TESTS="1" ODOO_REPO="odoo/odoo" 28 | - TESTS="1" ODOO_REPO="OCA/OCB" 29 | 30 | virtualenv: 31 | system_site_packages: true 32 | 33 | install: 34 | - git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools 35 | - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} 36 | - travis_install_nightly 37 | - pip install humanize git+https://github.com/litnimax/PyAjam.git requests 38 | - pip install gevent git+https://github.com/digium/swagger-py.git ari odoorpc py-Asterisk requests setproctitle 39 | 40 | before_script: 41 | - python ${HOME}/../services/stasis_app.py 42 | - python ${HOME}/../services/ami_broker.py 43 | 44 | script: 45 | - travis_run_tests 46 | 47 | after_success: 48 | - travis_after_tests_success 49 | -------------------------------------------------------------------------------- /asterisk/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | 3 | RUN apk update && apk upgrade && \ 4 | apk add supervisor git python psqlodbc \ 5 | py2-pip py2-tornado py2-setproctitle py2-gevent py2-requests py2-paho-mqtt \ 6 | asterisk asterisk-odbc asterisk-sample-config asterisk-sounds-en asterisk-sounds-moh asterisk-srtp 7 | 8 | #Install optional tools 9 | RUN apk add tcpdump ethtool vlan iftop ngrep bash vim screen tmux mosquitto-clients curl 10 | 11 | # grab dockerize for generation of the configuration file and wait on postgres 12 | RUN curl https://github.com/jwilder/dockerize/releases/download/v0.6.0/dockerize-alpine-linux-amd64-v0.6.0.tar.gz -L | tar xz -C /usr/local/bin 13 | 14 | RUN mkdir /var/log/supervisor 15 | 16 | # Asterisk conf templates 17 | COPY ./etc/ /etc/ 18 | COPY ./services /services/ 19 | 20 | RUN pip install -r /services/requirements.txt 21 | 22 | COPY ./docker-entrypoint.sh / 23 | 24 | EXPOSE 5060/udp 5038 8088 8010 25 | 26 | ENTRYPOINT ["/docker-entrypoint.sh"] 27 | -------------------------------------------------------------------------------- /asterisk/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # dockerize templates 4 | for i in `find /etc -name '*.tmpl'`; do 5 | dockerize -template "$i":"${i%%.tmpl}" && rm "$i" 6 | done 7 | 8 | if [ "$1" = "" ]; then 9 | # This works if CMD is empty or not specified in Dockerfile 10 | exec /usr/bin/supervisord -c /etc/supervisord.conf 11 | else 12 | exec "$@" 13 | fi 14 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/ari.conf.tmpl: -------------------------------------------------------------------------------- 1 | [general] 2 | enabled = yes 3 | allowed_origins = * 4 | 5 | [{{ default .Env.MANAGER_LOGIN "manager" }}] 6 | type=user 7 | password={{ default .Env.MANAGER_PASSWORD "secret" }} 8 | password_format = plain 9 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/cdr_adaptive_odbc.conf.tmpl: -------------------------------------------------------------------------------- 1 | [odoo] 2 | connection=odoo 3 | loguniqueid=yes 4 | table=asterisk_cdr 5 | alias start => started 6 | alias answer => answered 7 | alias end => ended 8 | usegmtime=yes 9 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/extensions.conf.tmpl: -------------------------------------------------------------------------------- 1 | [general] 2 | 3 | [default] 4 | 5 | ;[clean-recording] 6 | ;exten => s,1,System(sleep 5 && rm "/var/spool/asterisk/monitor/${UNIQUEID}.wav") 7 | 8 | [macro-monitor] 9 | exten => s,1,MixMonitor(${UNIQUEID}.wav) 10 | ;same => n,Set(CHANNEL(hangup_handler_push)=clean-recording,s,1(${UNIQUEID})) 11 | same => n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes) 12 | 13 | [stasis-error] 14 | ; Here we come on stasis errors 15 | exten => stasis-error,1,Answer 16 | exten => stasis-error,n,Playback(error-has-occured) 17 | exten => stasis-error,n,Hangup 18 | 19 | 20 | [users] 21 | include => stasis-error 22 | exten => 100,1,Wait(1) 23 | exten => 100,n,Ringing 24 | exten => 100,n,Answer 25 | exten => 100,n,Wait(1) 26 | exten => 100,n,Stasis(odoo,set_callerid) 27 | exten => 100,n,Macro(monitor) 28 | exten => 100,n,Dial(SIP/test2) 29 | exten => 100,n,Playback(demo-thanks) 30 | exten => 100,n,Hangup 31 | 32 | 33 | #tryinclude extensions_custom.conf 34 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/http.conf.tmpl: -------------------------------------------------------------------------------- 1 | [general] 2 | 3 | servername=Asteriska 4 | enabled={{ default .Env.HTTP_ENABLED "no" }} 5 | bindaddr={{ default .Env.HTTP_LISTEN_ADDRESS "127.0.0.1" }} 6 | bindport={{ default .Env.HTTP_PORT "8088" }} 7 | enablestatic=yes 8 | 9 | [post_mappings] 10 | uploads = /var/lib/asterisk/uploads/ 11 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/logger.conf.tmpl: -------------------------------------------------------------------------------- 1 | [general] 2 | 3 | [logfiles] 4 | console => notice,warning,error,debug,verbose,dtmf,fax 5 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/manager.conf.tmpl: -------------------------------------------------------------------------------- 1 | [general] 2 | enabled = {{ default .Env.MANAGER_ENABLED "no" }} 3 | webenabled = {{ default .Env.MANAGER_WEB_ENABLED "no" }} 4 | port = 5038 5 | bindaddr = {{ default .Env.MANAGER_LISTEN_ADDRESS "127.0.0.1" }} 6 | 7 | [{{ default .Env.MANAGER_LOGIN "manager" }}] 8 | secret={{ default .Env.MANAGER_PASSWORD "secret" }} 9 | displayconnects = yes 10 | read=all 11 | write=all 12 | -------------------------------------------------------------------------------- /asterisk/etc/asterisk/res_odbc.conf.tmpl: -------------------------------------------------------------------------------- 1 | [odoo] 2 | enabled => yes 3 | dsn => PostgreSQL-odoo 4 | username => {{ default .Env.DB_USER "odoo" }} 5 | password => {{ default .Env.DB_PASSWORD "odoo" }} 6 | pre-connect => yes 7 | -------------------------------------------------------------------------------- /asterisk/etc/odbc.ini.tmpl: -------------------------------------------------------------------------------- 1 | [PostgreSQL-odoo] 2 | Description = PostgreSQL connection to asterisk database 3 | Driver = PostgreSQL 4 | Database = {{ default .Env.DB_NAME "defaultdb" }} 5 | Servername = {{ default .Env.DB_HOST "defaultsrv" }} 6 | UserName = {{ default .Env.DB_USER "defaultuser" }} 7 | Password = {{ default .Env.DB_PASSWORD "defaultpassword" }} 8 | Port = {{ default .Env.DB_PORT "5432" }} 9 | Protocol = {{ default .Env.DB_VERSION "9.6" }} 10 | ReadOnly = No 11 | RowVersioning = No 12 | ShowSystemTables = No 13 | ShowOidColumn = No 14 | FakeOidIndex = No 15 | ConnSettings = 16 | -------------------------------------------------------------------------------- /asterisk/etc/odbcinst.ini.tmpl: -------------------------------------------------------------------------------- 1 | [PostgreSQL] 2 | Description = ODBC for PostgreSQL 3 | Driver = /usr/lib/psqlodbcw.so 4 | FileUsage = 1 5 | -------------------------------------------------------------------------------- /asterisk/etc/supervisord.conf: -------------------------------------------------------------------------------- 1 | [unix_http_server] 2 | file=/run/supervisord.sock 3 | 4 | [supervisorctl] 5 | serverurl=unix:///run/supervisord.sock 6 | 7 | [rpcinterface:supervisor] 8 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 9 | 10 | [supervisord] 11 | logfile=/var/log/supervisord.log 12 | logfile_maxbytes=50MB 13 | logfile_backups=10 14 | loglevel=debug 15 | nodaemon=true 16 | childlogdir=/var/log/supervisor 17 | 18 | [program:asterisk] 19 | command=asterisk -fpq 20 | redirect_stderr=true 21 | 22 | [program:mqtt_client] 23 | directory=/services 24 | command=python mqtt_client.py 25 | redirect_stderr=true 26 | 27 | [program:agent] 28 | directory=/services 29 | command=python asterisk_helper.py 30 | redirect_stderr=true 31 | 32 | [program:ami_broker] 33 | directory=/services 34 | command=python ami_broker.py 35 | redirect_stderr=true 36 | 37 | [program:stasis_apps] 38 | directory=/services 39 | command=python stasis_apps.py 40 | redirect_stderr=true 41 | -------------------------------------------------------------------------------- /asterisk/services/asterisk_helper.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | import ssl 4 | import tornado.web 5 | from tornado.ioloop import IOLoop 6 | from terminado import TermSocket, SingleTermManager 7 | from tornado.httpserver import HTTPServer 8 | 9 | logging.basicConfig(level=logging.DEBUG) 10 | _logger = logging.getLogger(__name__) 11 | 12 | ASTERISK = os.environ.get('ASTERISK_BINARY', '/usr/sbin/asterisk') 13 | ASTERISK_ARGS = '-cr' 14 | SSL_ENABLED = False 15 | LISTEN_ADDRESS = os.environ.get('CONSOLE_LISTEN_ADDRESS', '0.0.0.0') 16 | LISTEN_PORT = int(os.environ.get('CONSOLE_LISTEN_PORT', '8010')) 17 | 18 | 19 | class MyTermSocket(TermSocket): 20 | 21 | def check_origin(self, origin): 22 | return True 23 | 24 | 25 | if __name__ == '__main__': 26 | term_manager = SingleTermManager(shell_command=[ASTERISK, ASTERISK_ARGS]) 27 | handlers = [ 28 | (r'/websocket', MyTermSocket, {'term_manager': term_manager}), 29 | ] 30 | 31 | # Create SSL context 32 | if SSL_ENABLED: 33 | ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) 34 | ssl_ctx.load_cert_chain(SSL_CERT, SSL_KEY) 35 | else: 36 | ssl_ctx = None 37 | 38 | # Start server 39 | app = tornado.web.Application(handlers) 40 | server = HTTPServer(app, ssl_options=ssl_ctx) 41 | server.listen(LISTEN_PORT, address=LISTEN_ADDRESS) 42 | IOLoop.current().start() 43 | -------------------------------------------------------------------------------- /asterisk/services/broker.py: -------------------------------------------------------------------------------- 1 | #!/root/venv/odoo/bin/python 2 | from gevent import monkey; monkey.patch_all() 3 | import gevent 4 | import logging 5 | from Asterisk.Manager import Manager 6 | from flask import Flask, jsonify 7 | from gevent.wsgi import WSGIServer 8 | 9 | logger = logging.getLogger('broker.py') 10 | app = Flask(__name__) 11 | http_server = WSGIServer(('localhost', 5000), app) 12 | pbx = Manager(('localhost', 5038), 'user', '12341234') 13 | 14 | @app.route('/reload') 15 | def asterisk_reload(): 16 | logger.info('running AMI command reload') 17 | result = pbx.Command('reload') 18 | return jsonify(result) 19 | 20 | if __name__ == '__main__': 21 | logger.info('Broker started') 22 | flask_instance = gevent.spawn(http_server.serve_forever) 23 | gevent.joinall([flask_instance]) 24 | -------------------------------------------------------------------------------- /asterisk/services/local_conf.py.tmpl: -------------------------------------------------------------------------------- 1 | ODOO_HOST = '{{ default .Env.ODOO_IP "odoo" }}' 2 | ODOO_PORT = 8069 3 | ODOO_POLLING_PORT = 8072 4 | ODOO_DB = '{{ .Env.ODOO_DB }}' 5 | ODOO_USER = '{{ .Env.ODOO_USER }}' 6 | ODOO_PASSWORD = '{{ .Env.ODOO_PASSWORD }}' 7 | 8 | ASTERISK_HELPER_URL = 'http://localhost:8010' 9 | 10 | UPDATE_CDR_DELAY = 5 # Delay X sec before updating cdr to make sure it's in DB. 11 | UPDATE_CHANNEL_DELAY = 1 # Delay X sec before updating cdr to make sure it's in DB. 12 | RECORDING_DOWNLOAD_DELAY = 1 # Delay to let Asterisk close recorded file. 13 | 14 | LOG_CONSOLE = True 15 | LOG_FILE = '/tmp/services.log' 16 | LOG_LEVEL = 'DEBUG' 17 | -------------------------------------------------------------------------------- /asterisk/services/requirements.txt: -------------------------------------------------------------------------------- 1 | git+https://github.com/digium/swagger-py.git 2 | ari 3 | odoorpc 4 | pyst2 5 | terminado 6 | 7 | # Next dependencies are installed with aline's apk but left here for reference 8 | # gevent 9 | # requests 10 | # setproctitle 11 | -------------------------------------------------------------------------------- /asterisk/services/run_agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd /opt/agent 4 | exec python asterisk_helper.py 5 | -------------------------------------------------------------------------------- /broker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | 3 | ENV maintainer litnialex@gmail.com 4 | 5 | RUN apk add --no-cache bash mosquitto mosquitto-clients 6 | 7 | EXPOSE 1883 8 | 9 | CMD ["/usr/sbin/mosquitto", "-v"] 10 | -------------------------------------------------------------------------------- /deploy/ansible-requirements.txt: -------------------------------------------------------------------------------- 1 | # These are the python requirements for your Ansible Container builder. 2 | # You do not need to include Ansible itself in this file. 3 | -------------------------------------------------------------------------------- /deploy/ansible.cfg: -------------------------------------------------------------------------------- 1 | # Set any ansible.cfg overrides in this file. 2 | # See: https://docs.ansible.com/ansible/intro_configuration.html#explanation-of-values-by-section 3 | -------------------------------------------------------------------------------- /deploy/meta.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Your name 3 | description: Describe your awesome application here. 4 | company: Your company 5 | 6 | # If the issue tracker for your role is not on GitHub, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: license (GPLv2, CC-BY, etc) 18 | 19 | min_ansible_container_version: 0.9.2 20 | 21 | # Optionally specify the branch Galaxy will use when accessing the GitHub 22 | # repo for this role. During role install, if no tags are available, 23 | # Galaxy will use this branch. During import Galaxy will access files on 24 | # this branch. If travis integration is cofigured, only notification for this 25 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 26 | # (usually master) will be used. 27 | #github_branch: 28 | 29 | tags: [] 30 | # List tags for your app here, one per line. A tag is a keyword that describes and categorizes the app. 31 | # Users will find your app by searching for tags. Be sure to remove the '[]' above. 32 | # 33 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. Maximum 20 tags. 34 | -------------------------------------------------------------------------------- /deploy/requirements.yml: -------------------------------------------------------------------------------- 1 | # Install Ansible Roles 2 | # --------------------- 3 | # When making the Conductor image `ansible-galaxy install -r requirements.yml` is executed 4 | # using this file. Follow the instructions at http://docs.ansible.com/ansible/galaxy.html 5 | # to include any roles you want installed prior to running main.yml. 6 | -------------------------------------------------------------------------------- /deploy/roles/broker/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: python 3 | python: "2.7" 4 | 5 | # Use the new container infrastructure 6 | sudo: false 7 | 8 | # Install ansible 9 | addons: 10 | apt: 11 | packages: 12 | - python-pip 13 | 14 | install: 15 | # Install ansible 16 | - pip install ansible 17 | 18 | # Check ansible version 19 | - ansible --version 20 | 21 | # Create ansible.cfg with correct roles_path 22 | - printf '[defaults]\nroles_path=../' >ansible.cfg 23 | 24 | script: 25 | # Basic role syntax check 26 | - ansible-playbook tests/test.yml -i tests/inventory --syntax-check 27 | 28 | notifications: 29 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ -------------------------------------------------------------------------------- /deploy/roles/broker/README.md: -------------------------------------------------------------------------------- 1 | Broker 2 | === 3 | 4 | 5 | 6 | 7 | Requirements 8 | ------------ 9 | 10 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 11 | 12 | Role Variables 13 | -------------- 14 | 15 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 16 | 17 | Dependencies 18 | ------------ 19 | 20 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 21 | 22 | Example Playbook 23 | ---------------- 24 | 25 | Running broker is easy! Here's a sample playbook: 26 | 27 | - hosts: localhost 28 | gather_facts: no 29 | connection: local 30 | roles: 31 | - { role: broker } 32 | 33 | License 34 | ------- 35 | 36 | BSD 37 | 38 | Author Information 39 | ------------------ 40 | 41 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). -------------------------------------------------------------------------------- /deploy/roles/broker/defaults/main.yml: -------------------------------------------------------------------------------- 1 | playbook_debug: false 2 | -------------------------------------------------------------------------------- /deploy/roles/broker/meta/container.yml: -------------------------------------------------------------------------------- 1 | from: alpine:edge 2 | environment: 3 | maintainer: litnialex@gmail.com 4 | ports: 5 | - '1883' 6 | command: 7 | - /usr/sbin/mosquitto 8 | - -v 9 | -------------------------------------------------------------------------------- /deploy/roles/broker/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - shell: apk add --no-cache bash mosquitto 2 | -------------------------------------------------------------------------------- /deploy/roles/broker/test/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - role: broker -------------------------------------------------------------------------------- /docker-compose.override.yml.example: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | services: 3 | nginx: 4 | ports: 5 | - 8080:80 6 | 7 | odoo: 8 | volumes: 9 | - "./odoo/local-src:/opt/odoo/local-src" 10 | - "./odoo/external-src:/opt/odoo/external-src" 11 | - "./odoo/songs:/opt/odoo/songs" 12 | - "./odoo/migration.yml:/opt/odoo/migration.yml" 13 | - "./odoo/data:/opt/odoo/data" 14 | 15 | #odoo_mqtt_broker: 16 | # volumes: 17 | # - "./odoo_mqtt_broker/odoo_mqtt_broker.py:/odoo_mqtt_broker.py" 18 | 19 | asterisk: 20 | ports: 21 | - 5060:5060/udp 22 | - 8010:8010 23 | environment: 24 | - UID=test 25 | volumes: 26 | # DONT DO THIS AS YOU LOOSE ALL /etc system files :-) - "./asterisk/etc/:/etc/" 27 | - "./asterisk/services/:/services/" 28 | -------------------------------------------------------------------------------- /odoo/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.git/**/* 2 | **/.git 3 | **/.gitignore 4 | **/.travis.yml 5 | **/LICENSE 6 | **/*.pyc 7 | **/README.md 8 | -------------------------------------------------------------------------------- /odoo/VERSION: -------------------------------------------------------------------------------- 1 | 1.0.0 2 | -------------------------------------------------------------------------------- /odoo/base_requirements.txt: -------------------------------------------------------------------------------- 1 | # Migration tools 2 | marabunta==0.7.3 3 | anthem==0.10.0 4 | 5 | # test / lint 6 | flake8 7 | pytest 8 | pytest-odoo 9 | pytest-cov 10 | watchdog 11 | -------------------------------------------------------------------------------- /odoo/before-migrate-entrypoint.d/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/litnimax/odoo_asterisk/cce5758a2fcf3591a6cfbb53cbe57025b70ae7ff/odoo/before-migrate-entrypoint.d/.gitkeep -------------------------------------------------------------------------------- /odoo/bin/lint: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | BINDIR=$(dirname $0) 5 | BASEDIR=$(readlink -f $BINDIR/..) 6 | 7 | flake8 $BASEDIR/local-src --exclude=__init__.py 8 | -------------------------------------------------------------------------------- /odoo/bin/migrate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if ! PGPASSWORD=$DB_PASSWORD psql -lqtA -h $DB_HOST -U $DB_USER | grep -q "^$DB_NAME|"; then 5 | PGPASSWORD=$DB_PASSWORD createdb -h $DB_HOST -U $DB_USER -O $DB_USER $DB_NAME 6 | fi 7 | 8 | BASEDIR=$(dirname $0) 9 | CONFIGFILE=$(dirname $0)/../migration.yml 10 | MARABUNTA_DB_HOST=$DB_HOST \ 11 | MARABUNTA_DATABASE=$DB_NAME \ 12 | MARABUNTA_DB_USER=$DB_USER \ 13 | MARABUNTA_DB_PASSWORD=$DB_PASSWORD \ 14 | MARABUNTA_DB_PORT=$DB_PORT \ 15 | unbuffer marabunta --migration-file $CONFIGFILE 16 | -------------------------------------------------------------------------------- /odoo/bin/runtests: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # mainly used from Travis, it creates a database, runs tests on it and drops it. 4 | # 5 | # Arguments: 6 | # optional: name of the addons to test, separated by , 7 | # 8 | set -e 9 | 10 | # TODO: if we are not in TRAVIS, make a template then run tests on a copy 11 | 12 | BASEDIR=$(dirname $0) 13 | $BASEDIR/wait_postgres.sh 14 | ROOT_DIR=$BASEDIR/.. 15 | LOCAL_SRC_DIR=${ROOT_DIR}/local-src 16 | 17 | if [ -z $1 ] 18 | then 19 | LOCAL_ADDONS=$(find ${LOCAL_SRC_DIR}/* -maxdepth 0 -type d -and -not -name server_environment_files -printf "%f\n"\ 20 | | awk -vORS=, '{print $1}'\ 21 | | sed 's/,$/\n/') 22 | else 23 | LOCAL_ADDONS=$1 24 | fi 25 | 26 | DB_NAME_TEST=${DB_NAME}_test 27 | 28 | PGPASSWORD=$DB_PASSWORD createdb -h $DB_HOST -U $DB_USER -O $DB_USER ${DB_NAME_TEST} 29 | odoo --stop-after-init --workers=0 --database $DB_NAME_TEST --log-level=warn --without-demo="" -i ${LOCAL_ADDONS} 30 | odoo --stop-after-init --workers=0 --database $DB_NAME_TEST --test-enable --log-level=test --log-handler=":INFO" -u ${LOCAL_ADDONS} 31 | PGPASSWORD=$DB_PASSWORD dropdb -h $DB_HOST -U $DB_USER ${DB_NAME_TEST} 32 | -------------------------------------------------------------------------------- /odoo/bin/testdb-gen: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Generate a test database 4 | # 5 | # Usage: 6 | # 7 | # testdb-gen -i my_addon_to_install 8 | # 9 | 10 | set -e 11 | 12 | if psql -lqtA -h ${DB_HOST} | grep -q "^$DB_NAME|"; then 13 | echo "database ${DB_NAME} already exists" 14 | exit 1 15 | fi 16 | 17 | echo "creating database ${DB_NAME}" 18 | createdb -h ${DB_HOST} -O ${DB_USER} ${DB_NAME} 19 | gosu odoo odoo --stop-after-init --workers=0 --log-level=warn --without-demo="" "$@" 20 | echo "done" 21 | -------------------------------------------------------------------------------- /odoo/bin/testdb-update: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run updates of addons on an existing test database 4 | # 5 | # Usage: 6 | # 7 | # testdb-update -u my_addon 8 | # 9 | 10 | set -e 11 | 12 | if ! psql -lqtA -h ${DB_HOST} | grep -q "^$DB_NAME|"; then 13 | echo "database ${DB_NAME} does not exist" 14 | exit 1 15 | fi 16 | 17 | echo "updating database ${DB_NAME}" 18 | gosu odoo odoo --stop-after-init --workers=0 --log-level=warn --without-demo="" "$@" 19 | echo "done" 20 | -------------------------------------------------------------------------------- /odoo/bin/wait_postgres.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Wait until postgresql is running. 4 | # 5 | set -e 6 | 7 | BASEDIR=$(dirname $0) 8 | CONFIGDIR=$BASEDIR/../etc 9 | 10 | dockerize -timeout 30s -wait tcp://${DB_HOST}:${DB_PORT} 11 | 12 | # now the port is up but sometimes postgres is not totally ready yet: 13 | # 'createdb: could not connect to database template1: FATAL: the database system is starting up' 14 | # we retry if we get this error 15 | 16 | while [ "$(PGPASSWORD=$DB_PASSWORD psql -h ${DB_HOST} -U $DB_USER -c '' postgres 2>&1)" = "psql: FATAL: the database system is starting up" ] 17 | do 18 | echo "Waiting for the database system to start up" 19 | sleep 0.1 20 | done 21 | -------------------------------------------------------------------------------- /odoo/data/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/litnimax/odoo_asterisk/cce5758a2fcf3591a6cfbb53cbe57025b70ae7ff/odoo/data/images/logo.png -------------------------------------------------------------------------------- /odoo/etc/odoo.cfg.tmpl: -------------------------------------------------------------------------------- 1 | [options] 2 | addons_path = {{ .Env.ADDONS_PATH }} 3 | data_dir = /data/odoo 4 | auto_reload = False 5 | db_host = {{ .Env.DB_HOST }} 6 | db_name = {{ .Env.DB_NAME }} 7 | db_user = {{ .Env.DB_USER }} 8 | db_password = {{ .Env.DB_PASSWORD }} 9 | dbfilter = ^{{ default .Env.DB_NAME "odoodb" }}$ 10 | list_db = {{ default .Env.LIST_DB "False" }} 11 | admin_passwd = {{ default .Env.ADMIN_PASSWD "" }} 12 | db_maxconn = {{ default .Env.DB_MAXCONN "64" }} 13 | limit_memory_soft = {{ default .Env.LIMIT_MEMORY_SOFT "2147483648" }} 14 | limit_memory_hard = {{ default .Env.LIMIT_MEMORY_HARD "2684354560" }} 15 | limit_request = {{ default .Env.LIMIT_REQUEST "8192" }} 16 | limit_time_cpu = {{ default .Env.LIMIT_TIME_CPU "60" }} 17 | limit_time_real = {{ default .Env.LIMIT_TIME_REAL "120" }} 18 | log_handler = {{ default .Env.LOG_HANDLER "':INFO'" }} 19 | log_level = {{ default .Env.LOG_LEVEL "info" }} 20 | max_cron_threads = {{ default .Env.MAX_CRON_THREADS "2" }} 21 | workers = {{ default .Env.WORKERS "4" }} 22 | logfile = {{ default .Env.LOGFILE "None" }} 23 | log_db = {{ default .Env.LOG_DB "False" }} 24 | logrotate = True 25 | syslog = {{ default .Env.SYSLOG "False" }} 26 | running_env = {{ default .Env.RUNNING_ENV "dev" }} 27 | without_demo = {{ default .Env.WITHOUT_DEMO "True" }} 28 | server_wide_modules = {{ default .Env.SERVER_WIDE_MODULES "" }} 29 | ; We can activate proxy_mode even if we are not behind a proxy, because 30 | ; it is used only if HTTP_X_FORWARDED_HOST is set in environ 31 | proxy_mode = True 32 | ; csv_internal_sep = , 33 | ; db_template = template1 34 | ; debug_mode = False 35 | ; email_from = False 36 | ; longpolling_port = 8072 37 | ; osv_memory_age_limit = 1.0 38 | ; osv_memory_count_limit = False 39 | ; smtp_password = False 40 | ; smtp_port = 25 41 | ; smtp_server = localhost 42 | ; smtp_ssl = False 43 | ; smtp_user = False 44 | ; xmlrpc = True 45 | ; xmlrpc_interface = 46 | ; xmlrpc_port = 8069 47 | ; xmlrpcs = True 48 | ; xmlrpcs_interface = 49 | ; xmlrpcs_port = 8071 50 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/__manifest__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright 2016 ACSONE SA/NV 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 4 | 5 | { 6 | 'name': 'Web Notify', 7 | 'summary': """ 8 | Send notification messages to user""", 9 | 'version': '10.0.1.0.0', 10 | 'description': 'Web Notify', 11 | 'license': 'AGPL-3', 12 | 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 13 | 'website': 'https://acsone.eu/', 14 | 'depends': [ 15 | 'web', 16 | 'bus', 17 | ], 18 | 'data': [ 19 | 'views/web_notify.xml' 20 | ], 21 | 'demo': [ 22 | ], 23 | 'installable': True, 24 | } 25 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/i18n/de.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * web_notify 4 | # 5 | # Translators: 6 | # Niki Waibel , 2017 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Odoo Server 10.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-02-03 01:37+0000\n" 12 | "PO-Revision-Date: 2017-02-03 01:37+0000\n" 13 | "Last-Translator: Niki Waibel , 2017\n" 14 | "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: \n" 18 | "Language: de\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #. module: web_notify 22 | #: code:addons/web_notify/models/res_users.py:27 23 | #, python-format 24 | msgid "Information" 25 | msgstr "Information" 26 | 27 | #. module: web_notify 28 | #: model:ir.model.fields,field_description:web_notify.field_res_users_notify_info_channel_name 29 | msgid "Notify info channel name" 30 | msgstr "Name des Informationen-Kanals" 31 | 32 | #. module: web_notify 33 | #: model:ir.model.fields,field_description:web_notify.field_res_users_notify_warning_channel_name 34 | msgid "Notify warning channel name" 35 | msgstr "Name des Warnungen-Kanals" 36 | 37 | #. module: web_notify 38 | #: model:ir.model,name:web_notify.model_res_users 39 | msgid "Users" 40 | msgstr "Benutzer" 41 | 42 | #. module: web_notify 43 | #: code:addons/web_notify/models/res_users.py:33 44 | #, python-format 45 | msgid "Warning" 46 | msgstr "Warnung" 47 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/i18n/es.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * web_notify 4 | # 5 | # Translators: 6 | # Pedro M. Baeza , 2016 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Odoo Server 10.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2016-12-23 02:13+0000\n" 12 | "PO-Revision-Date: 2016-12-23 02:13+0000\n" 13 | "Last-Translator: Pedro M. Baeza , 2016\n" 14 | "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: \n" 18 | "Language: es\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #. module: web_notify 22 | #: code:addons/web_notify/models/res_users.py:27 23 | #, python-format 24 | msgid "Information" 25 | msgstr "Información" 26 | 27 | #. module: web_notify 28 | #: model:ir.model.fields,field_description:web_notify.field_res_users_notify_info_channel_name 29 | msgid "Notify info channel name" 30 | msgstr "Nombre del canal de información notificada" 31 | 32 | #. module: web_notify 33 | #: model:ir.model.fields,field_description:web_notify.field_res_users_notify_warning_channel_name 34 | msgid "Notify warning channel name" 35 | msgstr "Nombre del canal de avisos notificados" 36 | 37 | #. module: web_notify 38 | #: model:ir.model,name:web_notify.model_res_users 39 | msgid "Users" 40 | msgstr "Usuarios" 41 | 42 | #. module: web_notify 43 | #: code:addons/web_notify/models/res_users.py:33 44 | #, python-format 45 | msgid "Warning" 46 | msgstr "Aviso" 47 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/i18n/hr.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * web_notify 4 | # 5 | # Translators: 6 | # Bole , 2017 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Odoo Server 10.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-04-28 18:03+0000\n" 12 | "PO-Revision-Date: 2017-04-28 18:03+0000\n" 13 | "Last-Translator: Bole , 2017\n" 14 | "Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: \n" 18 | "Language: hr\n" 19 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 20 | 21 | #. module: web_notify 22 | #: code:addons/web_notify/models/res_users.py:27 23 | #, python-format 24 | msgid "Information" 25 | msgstr "Informacija" 26 | 27 | #. module: web_notify 28 | #: model:ir.model.fields,field_description:web_notify.field_res_users_notify_info_channel_name 29 | msgid "Notify info channel name" 30 | msgstr "Naziv kanala informacija" 31 | 32 | #. module: web_notify 33 | #: model:ir.model.fields,field_description:web_notify.field_res_users_notify_warning_channel_name 34 | msgid "Notify warning channel name" 35 | msgstr "Naziv kanala upozorenja" 36 | 37 | #. module: web_notify 38 | #: model:ir.model,name:web_notify.model_res_users 39 | msgid "Users" 40 | msgstr "Korisnici" 41 | 42 | #. module: web_notify 43 | #: code:addons/web_notify/models/res_users.py:33 44 | #, python-format 45 | msgid "Warning" 46 | msgstr "Upozorenje" 47 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import res_users 2 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/models/res_users.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright 2016 ACSONE SA/NV 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). 4 | 5 | from odoo import api, fields, models, _ 6 | 7 | 8 | class ResUsers(models.Model): 9 | 10 | _inherit = 'res.users' 11 | 12 | @api.multi 13 | @api.depends('create_date') 14 | def _compute_channel_names(self): 15 | for record in self: 16 | res_id = record.id 17 | record.notify_info_channel_name = 'notify_info_%s' % res_id 18 | record.notify_warning_channel_name = 'notify_warning_%s' % res_id 19 | 20 | notify_info_channel_name = fields.Char( 21 | compute='_compute_channel_names') 22 | notify_warning_channel_name = fields.Char( 23 | compute='_compute_channel_names') 24 | 25 | @api.multi 26 | def notify_info(self, message, title=None, sticky=False): 27 | title = title or _('Information') 28 | self._notify_channel( 29 | 'notify_info_channel_name', message, title, sticky) 30 | return True 31 | 32 | @api.multi 33 | def notify_warning(self, message, title=None, sticky=False): 34 | title = title or _('Warning') 35 | self._notify_channel( 36 | 'notify_warning_channel_name', message, title, sticky) 37 | return True 38 | 39 | @api.multi 40 | def _notify_channel(self, channel_name_field, message, title, sticky): 41 | bus_message = { 42 | 'message': message, 43 | 'title': title, 44 | 'sticky': sticky 45 | } 46 | notifications = [(getattr(record, channel_name_field), bus_message) 47 | for record in self] 48 | self.env['bus.bus'].sendmany(notifications) 49 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/static/description/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/litnimax/odoo_asterisk/cce5758a2fcf3591a6cfbb53cbe57025b70ae7ff/odoo/external-src/web_notify/static/description/icon.png -------------------------------------------------------------------------------- /odoo/external-src/web_notify/static/description/notifications_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/litnimax/odoo_asterisk/cce5758a2fcf3591a6cfbb53cbe57025b70ae7ff/odoo/external-src/web_notify/static/description/notifications_screenshot.png -------------------------------------------------------------------------------- /odoo/external-src/web_notify/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from . import test_res_users 2 | -------------------------------------------------------------------------------- /odoo/external-src/web_notify/views/web_notify.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |