I need to hang up his phone or I will be charged if he leaves the phone off the hook. Eventually, after about 50 seconds, if the caller hasn't hung up he hears ringing. This continues until the blocked caller hangs up. Users can use it to store arbitrary data. Various modules use it for this purpose automatically. Executing Hangup("SIP/sipProvider_did9-0000073a", "") in new stack The database really has two purposes: Asterisk uses it to store information that needs to persist between reloads/restarts. Executing GotoIf("SIP/sipProvider_did9-0000073a", "1?hangup") in new stack Executing Hangup("SIP/sipProvider_did10-00000739", "") in new stack Executing GotoIf("SIP/sipProvider_did10-00000739", "1?hangup") in new stack Executing Hangup("SIP/sipProvider_did9-00000738", "") in new stack Executing GotoIf("SIP/sipProvider_did9-00000738", "1?hangup") in new stack Incoming context in nf: exten => 12225551234,1,Zapateller(nocallerid)Īdd a number to blacklist: CLI> database put blacklist +14445554321 "Blacklisted for testing"Ĭall 12225551234 from blacklisted 14445554321.Īs seen via CLI interface: = Using SIP RTP CoS mark 5 The problem I am having is that my phone is no longer ringing when a blacklister calls(this part is good), but the blacklisted phone doesn't hang up (this is the problem). (The command can fail if the database is already locked).I have implemented a simple blacklist for my incoming calls. If you don’t see this respnose, repeat the command every 10 seconds until “wal” is returned. You can also issue this command from any bash prompt and you should see the response “wal”. This will enable the “WAL” feature of SQLite3 – which effectively prevents reader and writer processes from locking each other out of the database. Sqlite3 /var/lib/asterisk/astdb.sqlite3 “PRAGMA journal_mode=wal” So until the developer in question fixes their code, we do offer a workaround.Ĭreate an Asterisk pre-start event handler ( /usr/local/haast/events/) in HAAst containing the following code: We have seen this error before with FreePBX and a couple of open source Asterisk add ons.Īlthough the proper solution involves asking the app developer to correct their code, we realize that some developers have no interest in doing so (or become hostile if you suggest anything is wrong with their code). An overly simplistic application might not check for a lock, and simply report an error (“database is locked”) following an attempt to write. It should be well within my capabilities to make a text file, say import.txt, that contains the lines: database put cidname 01234567890 'A Caller' database put cidname 01234567891 'A N Other' etc Then just start up the asterisk console with: asterisk -r < import.txt I’m new to linux, so it’s best to keep things as simple as possible. Most properly designed apps respect concurrency by checking for the lock, then either blocking or retrying for a period of time, to acquire the lock. When synchronizing the AstDB HAAst will briefly lock the database (with a SQL lock), at which point apps should queue their commands until the lock is released. The error you are seeing in the Asterisk CLI is due to an app not properly handling concurrent use of the AstDB (SQLite 3 database).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |