Legacy Dev Forum Posts

 View Only

Sign Up

Receive an incoming call on WebRTC phone using API

  • 1.  Receive an incoming call on WebRTC phone using API

    Posted 06-05-2025 18:23

    ayush | 2022-07-28 04:53:22 UTC | #1

    I am trying to accept a call that is coming to agent's webRTC using this API# api/v2/conversations/calls/{conversationId}/participants/{participantId} but not able is there any limitation with this API with webRTC because for disconnected its is working fine but when passing state as connected its not working.


    FredericVanLoock | 2022-07-29 18:28:35 UTC | #2

    I had this problem also.

    To answer to a call via the api, you need to make a Dummy call before. see also Answering inbound calls via JS SDK with WebRTC Station

    What I did for that?

    1. Create in Architect an In-Queue Call Flow with only a Disconnect block : named by example DummyCallFlow.
    2. Create a Queue and set the In-Queue Flow to the previous created flow (DummyCallFlow),

    by example : named Dummy_Call and the generated id is 12345678-90ab-cdef-fedc-ba9876543210.

    1. Via the api post a call to the previous Queue:
    POST /api/v2/conversations/calls
    Body: { "callQueueId": "12345678-90ab-cdef-fedc-ba9876543210"}

    After you can answer to a call

    PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId} 
    Body {"state": "connected"}

    The webrtc phone has a persistent connection timeout (by default 600 seconds) and you need to repeat this action after an inactivity period. see https://help.mypurecloud.com/articles/configure-the-genesys-cloud-webrtc-phone/


    system | 2022-08-28 11:11:24 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 15715