saycel / webph.one

The SayCel Webph.one - An App for Community Cell Networks
GNU Affero General Public License v3.0
11 stars 6 forks source link

Receive offline messages #127

Closed rodrigomonelos closed 6 years ago

sanchi commented 6 years ago

When a text is sent for a user that is not registered (SIP registered), that message is stored in the DB by kamailio (table 'silo'). Once the user is coming online (sends SIP REGISTER), the server looks up all messages from that user in the DB and tries to send them to the user.

The messages come with a prefix "[Offline message - Date ]". It looks like they are not displayed by the App for whatever reason.

gmarcos87 commented 6 years ago

At this moment I am filtering them. But they arrive. Do you have any regExp that allows me to separate the data from the messages? I am not very good with regular expressions but I know that in this step it would be useful.

sanchi commented 6 years ago

it seems to me that text "[Offline message - ]" is hardcoded, but i actually do have to look into the code to verify that.

rodrigomonelos commented 6 years ago

Worked fine from laptop to app but failed from app to laptop. See screenshot App version: send-sms - 4df84ff

By the way, which is the link to see the commit history for the sms-app?

image

gmarcos87 commented 6 years ago

El error que estás recibiendo es indistinto de si es en mobile o escritorio, se debe a que cuando cerras una app el backend tarda un minuto en ponerte como offline (ya habíamos observado ese comportamiento en las llamadas). Seguramente para probar cerraste la ventana del navegador e inmediatamente trataste de enviar un mensaje desde el celular. Si esperas uno o dos minutos antes de enviar vas a notar que funciona. Este error o comportamiento tiene que ser revisado en el backend.

rodrigomonelos commented 6 years ago

Testeado ok. El errore reportado está en #131