[SIP Beyond VoIP] sylkpushserver configuration help
Tijmen de Mes
tijmen at ag-projects.com
Tue Nov 15 10:21:23 CET 2022
Hi,
I looks like your app id send here is wrong:
> Push notification command: /usr/local/bin/sylk-pushclient --url "http://127.0.0.1:8400/push <http://127.0.0.1:8400/push>" --platform="firebase" --appid="linphone" --from_name="" --mediatype="audio" --event="incoming_session" --token="fwz3tSEwSgKNxkaAs4FMPD:xxxxxxxxxxxxxxxxxxx" --deviceid="<urn:uuid:3c57301d-888c-000a-97d5-03ec12a78ada>" --callid="B2B.281.1406675.1667755015" --from="+3021070xxxxx at voiceland.dev <mailto:3021070xxxxx at voiceland.dev>" --to="+3021070xxxxx at voiceland.dev <mailto:3021070xxxxx at voiceland.dev>”
It needs to be com.voiceland.voiceland, as it needs to match the one in the push server.
Best regards,
Tijmen de Mes
—
AG Projects
> Op 6 nov. 2022, om 18:27 heeft Vasilios Tzanoudakis <vtzanoudakis at gmail.com> het volgende geschreven:
>
> Dear AG-Project Team,
>
> I am new to the push notification world and wanted to try out your sylkpushserver
> to send notifications from OpenSIPS to linphone app and then to my custom mobile app which is using exact same contact params like the linphone.
>
> So I downloaded latest code from https://github.com/AGProjects/sylk-pushserver <https://github.com/AGProjects/sylk-pushserver> and installed manually using:
> ------------------------------------------------------------------------------------------------------------------------------------------------------
> pip3 install -r requirements.txt
> python3 setup.py install
>
> Firstly I wanted to try with linphone just to be sure that it's not any fault with my custom mobile app but I think the problem is that I have misconfigured sylkpushserver :-(
>
> so here is my config:
>
> applications.ini
> ----------------------------------------------
> [voiceland-dev] ;this is firebase project id
> app_id = com.voiceland.voiceland ;yes this is correct
> app_type = linphone
> app_platform = firebase
> firebase_authorization_file = key.json
> firebase_push_url = https://fcm.googleapis.com/v1/projects/voiceland-dev/messages:send <https://fcm.googleapis.com/v1/projects/voiceland-dev/messages:send>
>
> server is started like this:
> -----------------------------
> root at ip-10-100-0-114:/etc/sylk-pushserver# /usr/local/bin/sylk-pushserver --no-fork --debug --config_dir /etc/sylk-pushserver/
> 2022-11-06 15:20:53 INFO Starting Sylk Pushserver 2.0.0
> 2022-11-06 15:20:53 INFO Reading configuration from /etc/sylk-pushserver/
> 2022-11-06 15:20:53 INFO Reading: /etc/sylk-pushserver//general.ini
> 2022-11-06 15:20:53 INFO Reading: /etc/sylk-pushserver//applications.ini
> 2022-11-06 15:20:53 INFO Reading storage configuration from /etc/sylk-pushserver/general.ini
> 2022-11-06 15:20:53 INFO Using pickle file for token storage
> 2022-11-06 15:20:53 INFO Loaded 1 applications from /etc/sylk-pushserver//applications.ini:
> 2022-11-06 15:20:53 INFO Loaded Firebase Linphone app com.voiceland.voiceland
> 2022-11-06 15:20:53 DEBUG Linphone app com.voiceland.voiceland classes: FirebaseLinphoneHeaders, FirebaseLinphonePayload
> 2022-11-06 15:20:53 DEBUG Loaded 1 Push notification services: FirebasePNS
> 2022-11-06 15:20:53 DEBUG Firebase Push Notification Service - FirebasePNS class
> 2022-11-06 15:20:53 DEBUG Server is now ready to answer requests
> 2022-11-06 15:20:53 INFO Sylk Pushserver listening on http://0.0.0.0:8400 <http://0.0.0.0:8400/>
>
>
> here is sql data from push_tokens table:
> ------------------------------------------------------
> >select * from push_tokens;
> +----+---------------+---------------+----------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+---------------------+--------+
> | id | username | domain | platform | app | token | sip_instance | user_agent | last_modified | silent |
> +----+---------------+---------------+----------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+---------------------+--------+
> | 1 | +3021070xxxxx | xxxxx.dev <http://xxxxx.dev/> | firebase | linphone | fwz3tSEwSgKNxkaAs4FMPD:xxxxxxxxxxxxxxxxxxx | <urn:uuid:3c57301d-888c-000a-97d5-03ec12a78ada> | LinphoneAndroid/4.6.14 (Το S21 Ultra του/της Vasilios) LinphoneSDK/5.1.62 (tags/5.1.62^0) | 2022-11-05 16:31:47 | 1 |
> | 2 | +3021070xxxxx | xxxxx.dev <http://xxxxx.dev/> | firebase | linphone | cZdVSMtZRZ-fwz3tSEwSgKNxkaAs4FMPD:xxxxxxxxxxxxxxxxxxx | <urn:uuid:efa8bb0e-70a1-457d-ae63-997837951838> | Dart SIP Client v1.0.0 | 2022-11-05 16:38:37 | 0 |
> +----+---------------+---------------+----------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+---------------------+--------+
>
> OpenSIPS logs when there is an incoming call for the linphone app:
> ---------------------------------------------------------------------------------------------
> Route:ci:B2B.281.1406675.1667755015:wakeup_mobile_devices [CONFIG] SELECT token, app, platform, sip_instance from push_tokens WHERE username='+302107001394' AND domain='voiceland.dev <http://voiceland.dev/>'
> Route:ci:B2B.281.1406675.1667755015:wakeup_mobile_devices [CONFIG] Push notification command: /usr/local/bin/sylk-pushclient --url "http://127.0.0.1:8400/push <http://127.0.0.1:8400/push>" --platform="firebase" --appid="linphone" --from_name="" --mediatype="audio" --event="incoming_session" --token="fwz3tSEwSgKNxkaAs4FMPD:xxxxxxxxxxxxxxxxxxx" --deviceid="<urn:uuid:3c57301d-888c-000a-97d5-03ec12a78ada>" --callid="B2B.281.1406675.1667755015" --from="+3021070xxxxx at voiceland.dev <mailto:3021070xxxxx at voiceland.dev>" --to="+3021070xxxxx at voiceland.dev <mailto:3021070xxxxx at voiceland.dev>"
>
> and now the problem I am facing is this error here from sylkpushserver:
> -----------------------------------------------------------------------------------------------
> 2022-11-06 17:10:10 INFO incoming Firebase request incoming_session - linphone-B2B.281.3234209.1667673375: from 127.0.0.1 <http://127.0.0.1/>: {'platform': 'firebase', 'app-id': 'linphone', 'token': 'fwz3tSEwSgKNxkaAs4FMPD:xxxxxxxxxxxxx', 'media-type': 'audio', 'event': 'incoming_session', 'from': '+3021070xxxxx at xxxxx.dev <mailto:3021070xxxxx at xxxxx.dev>', 'from-display-name': '+3021070xxxxx at xxxxx.dev <mailto:3021070xxxxx at xxxxx.dev>', 'to': '+3021070xxxxx at xxxxx.dev <mailto:3021070xxxxx at xxxxx.dev>', 'device-id': '<urn:uuid:3c57301d-888c-000a-97d5-03ec12a78ada>', 'call-id': 'B2B.281.3234209.1667673375', 'silent': '1'}
> 2022-11-06 17:10:10 ERROR incoming Firebase from 127.0.0.1 response for incoming_session - linphone-B2B.281.3234209.1667673375, push rejected: Firebase linphone app is not configured
>
> Could you please help me out with what I am missing? Do I have to configure something more in the applications/ directory, I think for linphone this should work out of the box right?
> Error says linphone is not configured, so how to configure the linphone app? is this a firebase error or a sylkpushserver error?
>
> Thank you in advance for your help and also thank you for sharing this great project to the community.
>
> Best Regards
>
> Vasilios Tzanoudakis
>
>
>
>
>
>
> _______________________________________________
> SIPBeyondVoIP mailing list
> SIPBeyondVoIP at lists.ag-projects.com
> https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20221115/7e5ea9dc/attachment.htm>
More information about the SIPBeyondVoIP
mailing list