Merge pull request #74 from wdoekes/wjd-timeout_avp_and_publish

Set the dialog lifetime before running the callbacks.
(cherry picked from commit 4df8a64db2d4d017a73c6f131b0925a0a82c488c)