vanbui1995 / react-sipjs

React components for SIP.js
https://www.npmjs.com/package/react-sipjs
15 stars 6 forks source link

DTMF, Blind transfer and Attended Transfer #16

Open newlflextv opened 6 days ago

newlflextv commented 6 days ago

Dear,

Can tell how to utilize DTMF, blind and attended transfer, if you add this will great helpful

vanbui1995 commented 5 days ago

@newlflextv with DTMF, you can use archive that by use session.info https://sipjs.com/guides/send-dtmf/

in my example

CallSessionItem.tsx

const { session } = useSessionCall();
const dtmfOptions = {
  requestOptions: {
    body: {
      contentDisposition: "render",
      contentType: "application/dtmf-relay",
      content: "Signal=1\r\nDuration=1000"
    }
  }
};
session.info(dtmfOptions)
vanbui1995 commented 5 days ago

bind and attended transfer is feature of IP PBX server, so the package can't support it @newlflextv, sip client only do the refer in this workflow, but note that its just a part of the workflow, other things need to be configured on IP PBX server

you totally follow the DTMF for refer method


session.refer('sip:userC@example.com')
newlflextv commented 5 days ago

Thanks for the support will test the DTMF and update

can you please provide the example code

bind and attended transfer is feature of IP PBX server, so the package can't support it @newlflextv, sip client only do the refer in this workflow, but note that its just a part of the workflow, other things need to be configured on IP PBX server

you totally follow the DTMF for refer method


session.refer('sip:userC@example.com')

understood already we have configured the transfer functionality in configured in pbx end. just want refer : can you give example code as per CallSessionItem.tsx

vanbui1995 commented 5 days ago

@newlflextv you can see the CallSessionItem.tsx in the example folder: https://github.com/vanbui1995/react-sipjs/blob/870fcf0b44855a9726529b741db35d4e22936fb6/examples/full-example/src/CallSessionItem.tsx#L16