Giter Site home page Giter Site logo

Comments (4)

elblasto avatar elblasto commented on July 21, 2024 1

@SecondeJK It's not quite clear how exactly observeForceMute should be passed to the SipCall object. The observeForceMute exists in the default options in the dial function of Opentok, however it looks like it's not present in the $sipJson that is actually passed to the SipCall

public function dial($sessionId, $token, $sipUri, $options = [])
    {
        // unpack optional arguments (merging with default values) into named variables
        $defaults = array(
            'auth' => null,
            'headers' => [],
            'secure' => true,
            'from' => null,
            'video' => false,
            'observeForceMute' => false
        );
        $options = array_merge($defaults, array_intersect_key($options, $defaults));

        // validate arguments
        Validators::validateSessionIdBelongsToKey($sessionId, $this->apiKey);

        // make API call
        $sipJson = $this->client->dial($sessionId, $token, $sipUri, $options);

        // check response
        $id = $sipJson['id'];
        if (!$id) {
            $errorMessage = 'Failed to initiate a SIP call. Server response: ' . $sipJson;
            throw new UnexpectedValueException($errorMessage);
        }

        return new SipCall($sipJson);
    }
    

from opentok-php-sdk.

SecondeJK avatar SecondeJK commented on July 21, 2024

You need to pass in observeForceMute into the SIP call, it's erroring because the array key hasn't been passed into the SipCall object: this is by design.

from opentok-php-sdk.

SecondeJK avatar SecondeJK commented on July 21, 2024

This is my bad: it indeed is not being returned. But #309 will fix this

from opentok-php-sdk.

SecondeJK avatar SecondeJK commented on July 21, 2024

Fixed by #322

from opentok-php-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.