BelledonneCommunications / linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)
http://linphone.org
GNU General Public License v3.0
581 stars 344 forks source link

Push! #768

Open arm-computech opened 3 years ago

arm-computech commented 3 years ago

Good afternoon! I am working on implementing PUSH Notifications. Create a bunch of Firebase and APNS, downloaded the GoogleService-Info.plist file from Firebase. I wanted to know what needs to be done next for push notifications to work? How can I get the identifier, device token in my Asterisk? I am working with xcode 12 in simulator mode.

mhisham commented 3 years ago

I'm working on the same thing, But I think linphone v5 does not give us to control the header of push notification in the packet which is fixed in the liblinphone

alex-eri commented 3 years ago

@arm-computech if using pjsip you can get it with AMI

Python code works with android version

import panoramisk

m = panoramisk.Manager(
        host=cfg['host'],
        username=cfg['username'],
        secret=cfg['secret'])

await m.connect()

def on_uri(uri):
    return dict((p.split('=') for p in uri.split(';')[1:]))

def register_cb(manager, message):
    ep = message['EndpointName']
    params = on_uri(message['URI'])
    logging.info(pformat(params))

m.register_event('ContactStatus', register_cb)

you need to fork and rebuild linphone to use it.

arm-computech commented 3 years ago

Thanks, but initially I'm still interested in implementing Firebase into a project. That is, where to drop the GoogleService-Info.plist file in the project. Whether it is necessary, somewhere to register, what exactly I use Firebase.