React Native - Pitel VoIP demo
Initialize
Note rn-pitel-demo using react native 0.71.4
- Setup to wake up app: please follow guide in here to setting push notification (FCM for android), Pushkit (for IOS).
yarn install
- Installing your Firebase configuration file:
- Android: add file
google-services.json
toandroid/app/google-services.json
- IOS: open Xcode & add file
GoogleService-Info.plist
toios/GoogleService-Info.plist
(guide in here)
Usage
- In file
src/screens/home_screen/index.js
please enter the information.
const ext = `${EXTENSION}`;
const sipPass = `${EXTENSION_SIP_PASSWORD}`;
const appId = `${BUNDLE_ID}`;
const domainUrl = `${DOMAIN}`;
...
const sdkOptionsInit = {
sipDomain: `${DOMAIN}:${PORT}`,
wssServer: `${WSS_URL}`,
sipPassword: sipPass,
bundleId: appId, // Bundle id for IOS
packageId: appId, // Package id for Android
teamId: `${TEAM_ID}`, // Team id of Apple developer account
};
- In file
src/screens/home_screen/home_screen
please enter the information.
const ext = `${EXTENSION}`;
const phone = `${CALL_OUT_PHONE_NUMBER}`;
const iosAppName = `${IOS_APP_NAME}`;
Run source code
// Android
yarn android
// IOS
yarn ios
yarn ios --device="device_name" // specific device