react-native-voice-x
v1.0.4
Published
```bash yarn add react-native-voice-x cd ios && pod install ```
Readme
Install
yarn add react-native-voice-x
cd ios && pod installCần phải cài thêm các thư viện
- react-native-callkeep
- react-native-device-info
- react-native-incall-manager
- react-native-notifications
- react-native-permissions
- react-native-webrtc
- mobx
- mobx-reactUsage
Trong file MainStack, thêm 2 màn hình
import { CallScreen, IncomingCallInappScreen } from 'react-native-voice-x';
<Stack.Navigator>
...
<Stack.Screen name="CallScreen" component={CallScreen} />
<Stack.Screen name="IncomingCallInappScreen" component={IncomingCallInappScreen} />
</Stack.Navigator>
Tiếp theo, kết nối tới SIP
import CallSdk from 'react-native-voice-x';
CallSdk.connect({
user: 'user',
pass: 'xxxx',
domain: 'mydomain.vn',
navigation,
});
Để thực hiện cuộc gọi
import CallSdk from 'react-native-voice-x';
const userSIP = ''
const pass = ''
const domain = 'mydomain.vn'
const navigation = useNavigation()
CallSdk.call(userSip, pass, domain, navigation);
