How to create an API in Fusion that will communicate the incoming call to the other party

Status
Not open for further replies.

Incred

Member
Jun 25, 2023
53
0
6
51
Hello. I'm working on setting an API where the originating caller ID is communicated to the other party however, I am unsure how to do that.

The initial issue is that I am trying to forward the originating caller ID number to a phone number however, my SIP provider is forcing the caller ID to be changed to the registered DID so any forwarded calls will be from the registered DID (called ID) and not from the caller itself.

I was advised to create an API wherein there will be a communication from Fusion to the other party sending information that this originating caller ID is calling/ connecting.

Any input or suggestions are welcome!
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,489
410
83
My first thought is switch SIP provider to one that will do what you need.
Depending on the type of communication you are thinking of using to pass this information to the other party, you could just send an arbitrary UDP message to the other parties IP address / port where you have something listening for this information. Here is a very simple test dialplan example for sending a the caller_id_number in a UDP message, you could easily put the bgsystem call in an outbound route:
XML:
<extension name="AF Send UDP Test" continue="false" uuid="4e9459dd-4b99-487d-ab2e-ee52708314e7">
  <condition field="destination_number" expression="^6659$">
    <action application="answer" data=""/>
    <action application="bgsystem" data="/bin/bash -c 'echo ${caller_id_number} > /dev/udp/10.11.12.13/8880'"/>
    <action application="hangup" data=""/>
  </condition>
</extension>
 
Status
Not open for further replies.