Fixed deadlock when replicating dialog which has pinging enabled.
Remove pinging entirely for replicated dialogs, since it might cause issues when running in active-backup mode
Properly set the dialog timeout for update bin requests
(cherry picked from commit 837032b63b092b45cae64668fd56e6e7cb3d7184)
Do not replicate dialog termination if dialog creation was not done ( failed calls )
Do not crash on replicated update if replicated create has failed
Free dlg memory in case replicated create fails
statistics: fixed MI get_statistics command to cope with mi_json
dialog: fix possible hash id conflict on restart

When restarting the proxy, the auto-generated next_id of each
hash entry is not properly incremented if a loaded dialog happens to
have this same next_id as hash id. This will soon lead to duplicate hash ids.

Reported by miko95 on GitHub.
(cherry picked from commit b7c3686c176e7c15b806e50f9743ab91656a8da3)
dialplan: fix shm leak when parsing invalid regex

Upon (re)load, if the subst or repl columns contain expressions which
fail to compile, OpenSIPS will leak shared memory.

Reported by miko95 on GitHub
Closes issue #307
(cherry picked from commit 72028d26bef361b6c99f6ad3653f0e1dbb07c767)
dialog: fix primary key when updating dialogs in REALTIME db mode

When updating rows in the dialog table in REALTIME db mode, the dlg_id
update key is not properly initialized (actually contains random data).

Reported by miko95 on GitHub
Closes issue #306
(cherry picked from commit 0ad3e4f949e1d669d53cd584e48b7d2eff740a22)
core: fix mem statistics when DBG_QM_MALLOC is on
(cherry picked from commit ffb0cb6d2c3a224ce37b575a7f956cfa881bf63b)
Better generation of random names for reply FIFO.

Related to issue #257
(backport from trunk 7078c0f)
Fix missing "p" state to MI ds_set_state command.

Closes #312
Reported by @gergelypeli
Fixed simplified callid parser
(cherry picked from commit 3316a2a518a2ac27401408369e4bd3adc70b4e48)
db_text: fix issues when database file is missing an ending newline

* do not crash if file contains columns only and is missing the ending newline
* do not skip the last row of a database file if it lacks an ending newline

Reported by gergelypeli on GitHub
Closes issue #308
(cherry picked from commit a2172b256fd19aa56b352665a9d598d6a91b36a3)
Fix sending PRACK for multiple provisional replies.

Reported by Giuseppe Cardone.

(cherry picked from commit 3cd6db2be3728e14343697b886cdcfabd4353d51)
Avoid useless from header parsing in case the dr group was passed from script
Backported from trunk
Fixed CDR writing for replicated dialogs
Fixed the dialog timeout that gets replicated via BIN for updates
redis: fix crash when using FQDN in URL

(cherry picked from commit 4cf5a169f27a452187a69c0ca1bda993962491df)
Fix setting transaction timeout from CPL script.

Using AVPs in obsolete; we need to do it now via the TM API.

(cherry picked from commit 307c1730bd205b96ba9ea22d51d998956a26d773)
Removed useless "ping_interval" parameter.

Closes  #320, reported by @hydrosine .
cachedb_memcached: extend the host+port printing buffer
(cherry picked from commit 32f2c2434e99802e90e6166de18ad7523f19a603)