phparia icon indicating copy to clipboard operation
phparia copied to clipboard

Sequential Call

Open bashong opened this issue 7 years ago • 0 comments

Hi,

I'm testing sequential call, so ring another endpoint if the previous endpoint does not take the call.

I have three endpoints.

$endpoints = array("PJSIP/000001115","PJSIP/116","PJSIP/117");
`
$this->dialedChannel = $this->client->channels()->createChannel($endpoints[0],null,'null',null,null,$this->client->getStasisApplicationName(),'dialed');`

Now on code below use to trigger the second endpoint.

$this->dialedChannel->onChannelDestroyed(function (ChannelDestroyed $event) use($endpoints) {
      $this->dialedChannel = $this->client->channels()->createChannel($endpoints[1],null,'null',null,null,$this->client->getStasisApplicationName(),'dialed');		
 });	

How can I make this to ring the 3rd endpoint once second endpoint channel has been destroyed.

TIA.

bashong avatar Sep 13 '18 11:09 bashong