Top

Make telephony call with NodeJS

Comments

3 comments

  • Vincent BERDER

    Hello Quentin,

     

    Yes the makecall API is running. But it is remote call control of a phoneset connected to a PBX. This pbx must also be connected to rainbow.

    So you have to take care about licences/rights of the company/users.

     

    If all that is ok, i will need some logs.

     

     

    Vincent.

    0
    Comment actions Permalink
  • Quentin

    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_onpresencechanged


     

    After this, i received randomly event oncallupdated with status : { key:0, value: 'unkown' }

    0
    Comment actions Permalink
  • Vincent BERDER

    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 ?

    0
    Comment actions Permalink

Please sign in to leave a comment.

Still can't find what you need?

  • Contact Us

    Do you have any question about Rainbow? Leave us a message to get more information.

    Contact
  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message