Okay, I found why it doesn't find the b_contact. It's because it isn't there yet when the query is done. My test sends a `200 OK` and then immediately a `NOTIFY`. Apparently the handling of the `NOTIFY` goes faster than the `200 OK`, so the dialog table gets updated after handling the `NOTIFY`.