gorush icon indicating copy to clipboard operation
gorush copied to clipboard

voip push

Open jason-shen opened this issue 5 years ago • 12 comments

Hi all

this lib looks really good, just a question, does this support ios voip push? push_type=voip

i couldn't find anything in the docs

any advice would be awesome

thanks advance

Jason

jason-shen avatar Nov 18 '20 07:11 jason-shen

Hi @jason-shen !

If I read PushKit and Supporting PushKit Notifications in Your App correclty you don't need any changes in your server (or in gorush in this case).

When you implement PushKit for app just send push notification to correct device token and APNs will do all work for you.

slimus avatar Nov 19 '20 03:11 slimus

Hi @jason-shen !

If I read PushKit and Supporting PushKit Notifications in Your App correclty you don't need any changes in your server (or in gorush in this case).

When you implement PushKit for app just send push notification to correct device token and APNs will do all work for you.

do you have to pass the type to apn? as i use onesignal now, they require to pass the push_type as voip to their server

thanks @slimus

jason-shen avatar Nov 19 '20 04:11 jason-shen

@jason-shen I found information about this param So gorush has this param in notification request. Can you please try it and write your result?

slimus avatar Nov 19 '20 18:11 slimus

@jason-shen I found information about this param So gorush has this param in notification request. Can you please try it and write your result?

I don't have this install yet will try it once I have it install and report the result here

Cheers

jason-shen avatar Nov 21 '20 11:11 jason-shen

@jason-shen See the PR: https://github.com/appleboy/gorush/pull/424

appleboy avatar Nov 21 '20 12:11 appleboy

@jason-shen See the PR: https://github.com/appleboy/gorush/pull/424

Thats a year ago so is the still the case

jason-shen avatar Nov 21 '20 13:11 jason-shen

@jason-shen , I am also interested in using voip push for ios. You are referring to PR #424 but that PR is merged. So I would expect that it should be possible now.

janvda avatar Mar 27 '21 10:03 janvda

I still haven't got around trying this, would be cool if you could try it out, and let us know the result

jason-shen avatar Mar 27 '21 18:03 jason-shen

@jason-shen in order to try this, I think that i need to create

  • a private key to access the ANPS service OR
  • APNs authentication token signing key

and I can only create those when having a paid apple developer account (= 99 $ /year). With the free apple developer account I don't seem to be able to create those keys.

janvda avatar Apr 02 '21 08:04 janvda

I have one, I can create a test key for you if you want one

jason-shen avatar Apr 02 '21 10:04 jason-shen

Thanks for the offer, I am wondering what you would need exactly in that case from me in case of Establishing a Certificate-Based Connection to APNs (another option is a token based connection).

  • https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns

Obtain a Provider Certificate from Apple

You obtain a provider certificate from your developer account on developer.apple.com. In the certificates section:

1. Add a new certificate.
2. Select Apple Push Notification service SSL (Sandbox & Production) for the type and click Continue.
3. Select the App ID (also known as Bundle ID) of your app and click Continue.
4. Generate a Certificate Signing Request (CSR) on your server.
5. Click Continue.
6. Upload your CSR file and click Continue.
7. Download the resulting certificate.

So the App ID (step 3) in my case is 360065638 as I am using the linphone app.

  • https://apps.apple.com/ca/app/linphone/id360065638

The instructions for step 4 to generate a CSR can be found here :

  • https://help.apple.com/developer-account/#/devbfa00fef7

janvda avatar Apr 03 '21 08:04 janvda

I would like to confirm that the current stable version support voip as push_type.

Here is the post that sends VoIP PushKit message to iOS:

curl -X "POST" "http://localhost:8088/api/push" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "notifications": [
    {
      "tokens": [
        "<VoIP PushKit token>"
      ],
      "data": {
        "has_video": "false",
        "caller_name": "Name",
        "caller_id": "+0123456789",
        "caller_id_type": "number",
        "uuid": "00000000-0000-0000-0000-000000000000"
      },
      "topic": "<App Bundle ID>.voip",
      "push_type": "voip",
      "platform": 1
    }
  ]
}'

ycherniavskyi avatar Apr 16 '22 16:04 ycherniavskyi