Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Support for providing (custom) SIP Headers for Cold transfer #237

Open
mohsen-parloa opened this issue Dec 3, 2024 · 0 comments

Comments

@mohsen-parloa
Copy link

It'd be great to have this capability to provide a list of SIP headers as part of the REFER request.

example:

import { SipClient } from 'livekit-server-sdk';

// ...

async function transferParticipant(participant) {
  console.log("transfer participant initiated");

  const sipTransferOptions = {
    playDialtone: false,
    sipHeaders: {  // 👉 Here we provide a mapping of SIP headers
      "User-to-user": "00000",
      "X-Custom-Header": "ABCDE",
    }
  };

  const sipClient = new SipClient(process.env.LIVEKIT_URL,
                                  process.env.LIVEKIT_API_KEY,
                                  process.env.LIVEKIT_API_SECRET);

  const transferTo = "tel:+15105550100";

  await sipClient.transferSipParticipant('open-room', participant.identity, transferTo, sipTransferOptions);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant