I need an introduction to how Jami connects (i.e. turn, dht)

I am trying to use Jami to allow my desktop to notify me on my android phone. A python script writes into Jami and hits ‘send’. It should arrive at my phone, but it usually fails. If I start a conversation, it starts working both ways, but after I leave it for a while and it’s time for my desktop to notify me, it’s not working again. It’s rather like something has timed out, or gone to sleep. It’s ironic because it seems to be working when I don’t need it, but when I do need it, it fails!

I think I have failed to set up something about discovery, because I don’t understand it. After searching the forum I did turn on something to do with ‘local network discovery’ but that didn’t make it start working. Is there documentation, or a youtube video, or a wiki that describes the different ways Jami can connect? Perhaps if I studied one, I would realise what I was doing wrong. Any help would be appreciated.

P.S. Sometimes, if I send my desktop a message, I will get the last 30 ~ 40 notifications all in a row and my phone goes ballistic! It would be funny actually, except it isn’t really because I want the notification when it’s relevant.