how to play voice when making call using call control api

Discussion in 'CRM / Helpdesk / App Integration' started by VITS 3CX, Mar 15, 2018.

Thread Status:
Not open for further replies.
  1. VITS 3CX

    Joined:
    Mar 12, 2018
    Messages:
    17
    Likes Received:
    0
    I am using call control api in dot net application.can i play the voice as place of ringing in making call and how
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,355
    Likes Received:
    108
    Hello @VITS 3CX,

    The MakeCall method from the Call Control API needs 2 endpoints. Then 3CX will make the call to the first endpoint, and when connected it will call the second. If you need that the first endpoint listens to a prompt, then you can specify the second endpoint to be a Digital Receptionist, or a CFD app...

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. VITS 3CX

    Joined:
    Mar 12, 2018
    Messages:
    17
    Likes Received:
    0
    sir can you send the sample code because i am very tired...
     
  4. VITS 3CX

    Joined:
    Mar 12, 2018
    Messages:
    17
    Likes Received:
    0
    but sir how to create Digital Receptionist and set the specific audio
     
  5. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,355
    Likes Received:
    108
    In order to create a Digital Receptionist, check this page from the manual:
    https://www.3cx.com/docs/manual/ivr-digital-receptionist/

    This Digital Receptionist will have an extension number. When you make your call, you specify that extension number as the "Destination" endpoint.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. VITS 3CX

    Joined:
    Mar 12, 2018
    Messages:
    17
    Likes Received:
    0
    Hi Ernesto:

    Thank you for your assistance. Let me reiterate what we are trying to do:

    Scenario: We need to play pre-recorded messages (.wav ) through 3CX on Paging Group. Because 3CX API restricts access to API locally from 3CX server only from IP address: 127.0.0.1. There is no way for our external web service to interact directly with 3CX therefore we are developing a dot service (for now) but will need to run as .Net Web service so that out external APP can communicate with 3CX via Local .Net service/web service.

    In nutshell show to pragmatically play a pre-recorded .wav file on a paging group.

    Please advise,

    VITS DEV Team
     
  7. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,355
    Likes Received:
    108
    Hello @VITS 3CX,

    It's absolutely clear to me what you're trying to do, let me explain again the solution. The 3CX Call Control API does NOT give you control on the audio stream. So there is NO way to play that wav file directly using the API. You need to use a Digital Receptionist or a CFD app to play the file.

    Using the Call Control API you have the method "PhoneSystem.MakeCall(origin, destination)". Using this method you can request 3CX to make a call. Then, 3CX will make a call to the number specified in "origin", and once connected it will call the number specified in "destination" and bind both legs together. So, what you need to do is invoking PhoneSystem.MakeCall(pagerExtension, ivrExtension). For the ivrExtension, you can specify the extension of a Digital Receptionist, which will play the wav file you need. Or you can also specify the extension of a CFD app, which will also play that file.

    If the wav file you need to play changes all the time, you can use the Call Control API to dynamically create Digital Receptionists configuring the file you need, make the call, and remove the Digital Receptionist later. Digital Receptionists are represented by the IVR class in the Call Control API.

    I hope I have shed some light on this.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. VITS 3CX

    Joined:
    Mar 12, 2018
    Messages:
    17
    Likes Received:
    0
    Thank you Ernesto for detailed response ! Can you point us in right direction for enhancing our understanding regarding Call Control API and CFD? We are not able to find resources for deeper understanding. Thx
     
  9. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,355
    Likes Received:
    108
    Those are 2 different things, although you can use them together.

    The Call Control API is a .NET Core API, you use it from C# code.

    The Call Flow Designer is a graphical tool to create callflows and voice apps. You can use it to create callflows or dialer:
    - Callflows: these are visual flows to handle inbound calls. You deploy the callflow to a queue extension, and then you route inbound calls to this extension, so the callflow can handle it. This callflow can be used to perform intelligent routing, to play wav files to the caller, to present menus where the user needs to enter a DTMF option, etc.
    - Dialers: these are visual flows to trigger new calls. You usually use them to make calls between an internal extension and an external party.

    The CFD has many standard building blocks out of the box, which let you access databases, execute web services, etc. without programming. It also lets you execute C# code, and there you can invoke methods from the Call Control API...

    Here you have useful links for the CFD:
    https://www.3cx.com/docs/manual/call-flow-designer-manual/
    https://www.3cx.com/docs/call-flow-designer-examples/

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. craigreilly

    craigreilly Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    3,313
    Likes Received:
    249
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    voiptoys likes this.
  11. VITS 3CX

    Joined:
    Mar 12, 2018
    Messages:
    17
    Likes Received:
    0
    how to use of announcement on any extension using call control api
     
  12. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,355
    Likes Received:
    108
    Hello @VITS 3CX,

    I don't understand what you're trying to do. Can you elaborate a bit?

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.