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

Label not being applied on participant after conference is created #832

Open
johnpaulmedina opened this issue Nov 15, 2024 · 1 comment
Open

Comments

@johnpaulmedina
Copy link

johnpaulmedina commented Nov 15, 2024

Issue Summary

Label for the second participant is not being applied to the call participant. I even tried participantLabel. When creating the conference the first call accepts the participantLabel value.

Steps to Reproduce

  1. Client initiates new outbound call
  2. Application hits app url which establishes a new conference via $response->dial()->conference($name, [])
  3. Wait url triggers logic to add second participant while setting the label attribute

Code Snippet

public function callParticipantFromConference(TelAccount $account, $callType, $conference, $toPhone) {
    
    $client = new Client($this->account->sid, $this->account->token);

    $client->conferences($this->request->ConferenceSid)->participants->create(
    normalize_phone_to_E164(env('DEFAULT_CALLER_ID')), // From
    normalize_phone_to_E164($toPhone), // To
    [   
        "label" => "customer",
        "earlyMedia" => true,
        "beep" => "onEnter",
        "endConferenceOnExit" => true,
        "record" => true,
    ]);

    $response = new VoiceResponse;
    
    echo $response;
}

Exception/Log

No exception

Technical details:

  • twilio-php version: 8.3.7 & 8.3.8
  • php version: 8.2
@johnpaulmedina
Copy link
Author

johnpaulmedina commented Nov 15, 2024

Also, how come when we create the initial conference the attribute to pass for the participant is participantLabel?

These should be standard across the Participant. One should not be label and the other participantLabel

$client = new Client($this->account->sid, $this->account->token);

$response = new VoiceResponse;

$dial = $response->dial();
$dial->conference($name, [
    "participantLabel" => "agent-{$this->user->extension->id}",
    "waitUrl" => $this->getConfParticpantUrl($name),
    "beep" => true,
    "startConferenceOnEnter" => true,
    "endConferenceOnExit" => true
]);

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