{"id":22819516,"url":"https://github.com/bdfoster/fax-to-couchdb","last_synced_at":"2025-04-14T01:10:25.109Z","repository":{"id":147886283,"uuid":"11780041","full_name":"bdfoster/fax-to-couchdb","owner":"bdfoster","description":"Lua script to send incoming Freeswitch faxes to existing couchdb database.","archived":false,"fork":false,"pushed_at":"2013-07-31T06:33:24.000Z","size":124,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T15:12:14.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdfoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-31T01:57:12.000Z","updated_at":"2024-03-19T07:28:32.000Z","dependencies_parsed_at":"2023-03-26T16:33:17.443Z","dependency_job_id":null,"html_url":"https://github.com/bdfoster/fax-to-couchdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdfoster%2Ffax-to-couchdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdfoster%2Ffax-to-couchdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdfoster%2Ffax-to-couchdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdfoster%2Ffax-to-couchdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdfoster","download_url":"https://codeload.github.com/bdfoster/fax-to-couchdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804825,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T15:12:42.985Z","updated_at":"2025-04-14T01:10:25.088Z","avatar_url":"https://github.com/bdfoster.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"fax-to-couchdb\n==============\n\nLua script to insert faxes from Freeswitch into existing couchdb database.\n\nHow to use\n----------\n0. Ensure you have a proper couchdb instance running and working properly. This is your responsibility!\n1. git clone this project into a directory that freeswitch has permissions to.\n - suggestion: $${base_dir}/scripts/lua/fax-to-couchdb\n2. Install luchia, the couchdb library: https://thehunmonkgroup.github.com/luchia\n - You can (and should) use LuaRocks to install this library. On a Debian/Ubuntu system, this can be done like so:\n   sudo apt-get install luarocks\n   luarocks install luchia\n3. Use the example config file (example_config.lua) to set up your server settings. When you change it, save the file as config.lua.\n4. Create your fax extension (if you haven't already done so):\n - This is what mine looks like:\n\n```\n\u003cinclude\u003e\n  \u003cextension name=\"faxrx\"\u003e\n    \u003ccondition field=\"destination_number\" expression=\"^faxrx$|^/*11$|^3000$\"\u003e\n      \u003caction application=\"set\" data=\"fax_enable_t38=true\"/\u003e\n      \u003caction application=\"set\" data=\"fax_enable_t38_request=true\"/\u003e\n      \u003caction application=\"answer\"/\u003e\n      \u003caction application=\"playback\" data=\"silence_stream://2000\"/\u003e\n      \u003caction application=\"rxfax\" data=\"$${base_dir}/storage/fax/FAX-${uuid}.tif\"/\u003e\n    \u003c/condition\u003e\n  \u003c/extension\u003e\n\u003c/include\u003e\n```\n\n5. Just before the answer application in our extension, we're going to insert this line:\n\n```\n      \u003caction application=\"set\" data=\"execute_on_fax_result=lua $${base_dir}/lua/fax-to-couchdb/fax-to-couchdb.lua \n         \\\\\\${fax_filename} ${caller_id_name} ${caller_id_number} ${destination_number} \\\\\\${fax_document_transferred_pages} \n         \\\\\\${fax_result_code} \\\\\\${fax_result_text} \\\\\\${fax_transfer_rate} \\\\\\${fax_ecm_used} \\\\\\${fax_bad_rows} \n         ${uuid}\"/\u003e\n```\nI know, it's long. We're passing variables to the script using this so that we can store these in the database.\n\n6. Test, test, test. Should work just fine. If not, open up an issue on Github (http://github.com/bdfoster/fax-to-couchdb/issues).\n\nNotes:\n\nThe test system used in the development of this script is a Debian-based system. It should work with all linux variants. I cannot guarentee\nthat it will work with Windows anything, as I don't have a Windows-based machine available to me. If you have a suggestion that would make\nit work on Windows-based systems, open up an issue (using the URL above).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdfoster%2Ffax-to-couchdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdfoster%2Ffax-to-couchdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdfoster%2Ffax-to-couchdb/lists"}