[SIP Beyond VoIP] sylkpush-server google fcm failed with error 400
Vasilios Tzanoudakis
vtzanoudakis at gmail.com
Tue Jan 10 18:36:57 CET 2023
Dear Tijmen,
Thank you for your quick response on this issue.
I am sending you the logs on your private email because of the sensitive
data.
Thank you in advance
Best regards
Vasilios Tzanoudakis
On Mon, 9 Jan 2023 at 14:08, Vasilios Tzanoudakis <vtzanoudakis at gmail.com>
wrote:
> Dear Team,
>
> Happy new year to you all!!!
>
> I have a question regarding sylkpush-server.
> I have manged to run the sylkpush-server successfully
>
> --------------------------------------------------------------------------------
> root at ip-10-100-0-202:~# /usr/bin/sylk-pushserver --debug
> INFO:root:2023-01-09 10:33:04.029253 Starting Sylk Pushserver...
> INFO:to_file:2023-01-09 10:33:04.615029 Loaded 1 applications from
> /etc/sylk-pushserver/applications.ini:
> INFO:to_file:2023-01-09 10:33:04.615682 Loaded Firebase Linphone app
> com.voiceland.voiceland
> DEBUG:to_file:2023-01-09 10:33:04.616451 Linphone app
> com.voiceland.voiceland classes: FirebaseLinphoneHeaders,
> FirebaseLinphonePayload
> DEBUG:to_file:2023-01-09 10:33:04.616731 Loaded 1 Push notification
> services: FirebasePNS
> DEBUG:to_file:2023-01-09 10:33:04.616935 Firebase Push Notification
> Service - FirebasePNS class
> DEBUG:to_file:2023-01-09 10:33:04.617140 Server is now ready to answer
> requests
> INFO:to_file:2023-01-09 10:33:04.618109 Sylk Pushserver listening on
> http://0.0.0.0:8400
>
> --------------------------------------------------------------------------------
>
> and I am trying to wake up my device using this opensips script which is
> take from the opensips.cfg example.
>
> -------------------------------------------------------------------------------------------
> $var(push_command) = "/usr/bin/sylk-pushclient --url \"
> http://127.0.0.1:8400/push\" --platform=\"" + $var(pn_platform) +
> "\" --appid=\"" + $var(pn_app) + "\" --from_name=\"" +
> $(fn{s.escape.common}) + "\" --mediatype=\"" + $var(sip_application_type) +
> "\" --event=\"" + $var(pn_event) + "\" --token=\"" + $var(pn_token) + "\"
> --deviceid=\"" + $var(sip_instance) +"\" --callid=\"" +
> $ci + "\" --from=\"" + $var(from) + "\" --to=\"" + $var(to) + "\"";
> xlog("L_NOTICE", "Route:ci:$ci:wakeup_mobile_devices [CONFIG]
> Push notification command: $var(push_command)\n");
> launch(exec("$var(push_command)",,, $var(rc)), "PN_RESULT");
> ---------------------------------------------------------
>
> I am receiving an error from FCM side, could you please help me out
> because I don't see time_to_live, priority to the sylk-pushclient and also
> it gives me an error on "to" header also also that cannot find field. In
> the opensips.cfg example I see pusher.py script which I cannot find
> anywhere in repo. So could you please clarify what I am doing wrong?
>
> root at ip-10-100-0-202:~# /usr/bin/sylk-pushclient --url "
> http://127.0.0.1:8400/push" --platform="firebase" --appid="myappid"
> --from_name="" --mediatype="audio" --event="incoming_session"
> --token="cZdVSMtZRZ-qhGDAkX3vCj:token"
> --deviceid="<urn:uuid:4cf4f194-0215-433b-86e1-8aecc8cde1ce>"
> --callid="B2B.281.4947472.1673264089" --from="+30210XXXXXXX at domain"
> --to="+30210XXXXXXX at domain"
>
> error:
> ========================================================================
> incoming_session push for B2B.281.4947472.1673264089 to
> http://127.0.0.1:8400/push failed: 400: {"code":400,"description":"push
> notification
> response","data":{"body":{"_content":{"error":{"code":400,"message":"Invalid
> JSON payload received. Unknown name \"to\": Cannot find field.\nInvalid
> JSON payload received. Unknown name \"time_to_live\": Cannot find
> field.\nInvalid JSON payload received. Unknown name \"priority\": Cannot
> find field.\nInvalid JSON payload received. Unknown name \"data\": Cannot
> find field.","status":"INVALID_ARGUMENT","details":[{"@type":"
> type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"description":"Invalid
> JSON payload received. Unknown name \"to\": Cannot find
> field."},{"description":"Invalid JSON payload received. Unknown name
> \"time_to_live\": Cannot find field."},{"description":"Invalid JSON payload
> received. Unknown name \"priority\": Cannot find
> field."},{"description":"Invalid JSON payload received. Unknown name
> \"data\": Cannot find
> field."}]}]}},"_content_consumed":true,"status_code":400,"url":"
> https://fcm.googleapis.com/v1/projects/voiceland-dev/messages:send","encoding":"UTF-8","reason":"Bad
> Request"},"code":400,"reason":"Bad Request","url":"
> https://fcm.googleapis.com/v1/projects/voiceland-dev/messages:send
> ","call_id":"B2B.281.4947472.1673264089","token":"cZdVSMtZRZ-qhGDAkX3vCj:token"}}
> ========================================================================
> thank you very much in advance for your support.
>
> Kind Regards
>
> --
> Vasilios Tzanoudakis
>
--
Βασίλης Τζανουδάκης
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20230110/d5a0d046/attachment.htm>
More information about the SIPBeyondVoIP
mailing list