Make telephony call with NodeJS
Hi,
i develop with rainbow nodejs api.
Node is in 10.15.1 LTS version.
Rainbow SDK is in 1.52.0.
When i try to make a call with makeCallByPhoneNumber() with a number like '0123456789', i received a event 'oncallupdated' with status 'dialing' and... nothing.
On the external phone i don't receive the call.
is the sdk operational at this level ?
Other question : I try to make notifications push on my nodejs application, but i never received notifications, but when i try to make a notifications campaign on firebase, all application received notifs, why rainbow don't send notification to my firebase ? I need this for received call
-
Hello Vincent,
Thanks for your reply !
I think all is ok, i have the phone when i connect on my account on real Rainbow application and i can receive call from pbx.
When i try to make a call from my custom rainbow application, i see that on logs :
2019-03-27 14:05:10.036 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910035] - info:HTTP - (post) url https://openrainbow.com:443/api/rainbow/telephony/v1.0/calls { calleeExtNumber: '0637452148',
calleeIntNumber: '',
calleeShortNumber: '',
calleePbxId: '',
calleeDisplayName: '0637452148' }
--------- beginning of system
2019-03-27 14:05:10.439 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910439] - info:EVENTS - (publishEvent) event rainbow_onpresencechanged
2019-03-27 14:05:10.449 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910449] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:10.456 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 0, value: 'Unknown' },
id: '2353',
conversationId: null,
connectionId: '2353#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:04:50.376Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: [],
participants: [] } }
2019-03-27 14:05:10.462 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910462] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:10.465 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 0, value: 'Unknown' },
id: '2353',
conversationId: null,
connectionId: '2353#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:04:50.376Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: null,
participants: null } }
2019-03-27 14:05:10.601 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910601] - info:HTTP - (post) HTTP statusCode 200
2019-03-27 14:05:10.602 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910602] - info:REST/TEL - (makeCall) successfull
2019-03-27 14:05:10.603 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910603] - info:REST/TEL - (makeCall) REST conversation created { callId: '2354#2203' }
2019-03-27 14:05:10.607 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910607] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:10.610 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 1, value: 'dialing' },
id: '2354',
conversationId: null,
connectionId: '2354#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:05:10.604Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: [],
participants: [] } }
2019-03-27 14:05:10.610 3545-3638/com.rainbowapp I/NODEJS-MOBILE: dialing
2019-03-27 14:05:10.610 3545-3638/com.rainbowapp I/NODEJS-MOBILE: undefined
2019-03-27 14:05:10.611 3545-3638/com.rainbowapp I/NODEJS-MOBILE: undefined
2019-03-27 14:05:10.644 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:10 GMT+0100 (CET) [1553691910643] - info:EVENTS - (publishEvent) event rainbow_onpresencechanged
2019-03-27 14:05:12.465 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:12 GMT+0100 (CET) [1553691912464] - info:EVENTS - (publishEvent) event rainbow_onpresencechanged
2019-03-27 14:05:12.480 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:12 GMT+0100 (CET) [1553691912479] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:12.485 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 0, value: 'Unknown' },
id: '2354',
conversationId: null,
connectionId: '2354#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:05:10.604Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: [],
participants: [] },
errorMessage: 'outOfService' }
2019-03-27 14:05:12.489 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:12 GMT+0100 (CET) [1553691912489] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:12.493 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 0, value: 'Unknown' },
id: '2354',
conversationId: null,
connectionId: '2354#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:05:10.604Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: null,
participants: null },
errorMessage: 'outOfService' }
2019-03-27 14:05:12.507 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:12 GMT+0100 (CET) [1553691912507] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:12.511 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 0, value: 'Unknown' },
id: '2354',
conversationId: null,
connectionId: '2354#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:05:10.604Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: null,
participants: null },
errorMessage: 'outOfService' }
2019-03-27 14:05:12.515 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:12 GMT+0100 (CET) [1553691912514] - info:EVENTS - (publishEvent) event rainbow_oncallupdated
2019-03-27 14:05:12.518 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Call {
status: { key: 0, value: 'Unknown' },
id: '2354',
conversationId: null,
connectionId: '2354#2203',
type: { key: 2, value: 'Phone' },
isVm: false,
contact:
Contact {
id: '',
_displayName: '0637452148',
name: { value: '0637452148' },
displayNameMD5: '91e80d6eeae6d7bd94f0bf1c147c5d10',
companyName: '',
loginEmail: 'noEmail',
nickName: '',
title: '',
jobTitle: '',
country: '',
timezone: 'Europe/Paris',
organisationId: '',
siteId: '',
companyId: '',
jid_im: '',
jid: '',
jid_tel: '',
jidtel: '',
avatar:
{ src: '/resources/skins/rainbow/images/conversations/unknownContact.png' },
lastAvatarUpdateDate: null,
lastUpdateDate: 'Z',
adminType: 'undefined',
roles: [ 'user' ],
phoneNumbers: [],
phonePro: '',
phoneProCan: '0637452148',
phonePbx: '',
phoneInternalNumber: '',
pbxId: '',
mobilePro: '',
mobileProCan: '',
phonePerso: '',
phonePersoCan: '',
mobilePerso: '',
mobilePersoCan: '',
voicemailNumber: '',
emails: [],
emailPro: '',
emailPerso: '',
lastName: '0637452148',
firstName: '',
isTerminated: false,
language: 'en',
presence: '',
status: '',
resources: '',
nameUpdatePrio: 0,
initials: '?',
nickname: '',
roster: false,
initialized: false,
_id: '0637452148',
temp: true },
remoteMedia: 0,
localMedia: 0,
isEscalated: false,
startDate: 2019-03-27T13:05:10.604Z,
isInitiator: false,
participants: null,
isRemoteVideoMuted: false,
isConference: false,
avatars:
[ '/resources/skins/rainbow/images/conversations/unknownContact.png' ],
currentCalled:
{ contactPhoneNumber: '',
contact: null,
participantsPhoneNumbers: null,
participants: null },
errorMessage: 'outOfService' }
2019-03-27 14:05:12.520 3545-3638/com.rainbowapp I/NODEJS-MOBILE: Wed Mar 27 2019 14:05:12 GMT+0100 (CET) [1553691912520] - info:EVENTS - (publishEvent) event rainbow_onpresencechangedAfter this, i received randomly event oncallupdated with status : { key:0, value: 'unkown' }
-
in the logs there is a
errorMessage: 'outOfService'
This mean, the make call is well done by you and the SDK engine. But something goes wrong when rainbow/pbx try to deliver the call.
This can be a bad configuration on rainbow :
* Wrong configuration for the prefix
* Wrong configuration of the phonenumber linked to the user. But it looks to be ok for that part because you receives call on Rainbow client.
Please do you succeed in making an external call ?
Please sign in to leave a comment.
Comments
3 comments