Open uchepercynnoch opened 5 years ago
Please somebody help. Anybody please
this works for me
let options = {
headers: {
"P-Assserted-Identity": "Header example",
"X-UA": "CCP Mobile"
}
}
await endpoint.makeCall(account, "8189", options)
Thanks Yousefjb, have not tried this. Trying now...
Hello Yousefjb, my App still crashes when I try to make call. Please I have ran out of ideas, my account registers fine on asterisk, but the response from pjsip still says this: proto: Object _registration: AccountRegistration _active: false _reason: undefined _status: "PJSIP_SC_TRYING" _statusText: "In Progress" I have a hunch, this is where my problem lies. Any ideas please?
Hi Yousefjb I was able to solve my problem. Silly me totally goofed on android permission for SDK 28. Thanks for your helping.
@uchepercynnoch Which permission you added to resolve this issue on SDK 28?
@Raul, audio recording.
On Fri, Apr 12, 2019, 8:11 AM raul notifications@github.com wrote:
@uchepercynnoch https://github.com/uchepercynnoch Which permission you added to resolve this issue on SDK 28?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datso/react-native-pjsip/issues/176#issuecomment-482464390, or mute the thread https://github.com/notifications/unsubscribe-auth/AuxHSKME2VkykMROK8TWWL3QGLm3On4Hks5vgDGLgaJpZM4cX6C1 .
@uchepercynnoch Which permission you added to resolve this issue on SDK 28? Please help us, we are also stuck in same situation.
@sonalip2 have you find out the solution ?? Thanks in advance!
Hi Datso,
Please I need your help. I can initialize pjsip and register a SIP peer with the createAccount method. However, when I try to make call, my App crashes. Here is some part of my code:
ACTION: export const initSip = () => async dispatch => { try { const endpoint = new Endpoint(); const state = await endpoint.start({ service: { ua: Platform.select({ios: "RN iOS", android: "RN Android"}) }, network: { useWifi: true, useOtherNetworks: true } }); dispatch(initialized(endpoint)); } catch (e) { dispatch(initError(e)) } };
export const createSipAccount = configuration => async (dispatch, getState) => { dispatch(creatingAccount()); try { const {endpoint} = getState().sipReducer; const contactUriParams = Platform.select({ ios: [ ";app-id=com.carusto.mobile.app", ], android:
;im-type=sip
, });};
REDUCER const initialState = { endpoint: null, account: null, };
const sipReducer = (state = initialState, action) => { switch (action.type) { case INIT: return { ...state, endpoint: action.payload }; case ACCOUNT_CREATED: return { ...state, account: action.payload }; default: return state; } };
COMPONENT state = { endpoint: null, account: null };
}
const mapStateToProps = getState => ({ endpoint: getState.sipReducer.endpoint, account: getState.sipReducer.account, });
When I logged 'account' object i got this:
Account {_data: {…}, _registration: AccountRegistration} _data: contactUriParams: ";im-type=sip" domain: "192.168.0.110" id: 0 name: "102" password: "102" regOnAdd: false regServer: "asterisk" regTimeout: "300" registration: {active: false, statusText: "In Progress", status: "PJSIP_SC_TRYING"} transport: "UDP" uri: "102 sip:102@192.168.0.110" username: "102" proto: Object _registration: AccountRegistration _active: false _reason: undefined _status: "PJSIP_SC_TRYING" _statusText: "In Progress" proto: Object proto: Object
I use the following versions for my app development: REACT NATIVE VERSION: 0.59.2 REACT: 16.8.3 ANDROID SDK: 28 JAVA VERSION:1.8 PJSIP VERSION:2.8.0