Skip to content

ChannelData.UUID from InboundSocket.Originate returns null #12

@DanieleGhianda

Description

@DanieleGhianda

I was following the Demo https://github.com/iamkinetic/NEventSocket/blob/master/NEventSocket.Examples/Examples/DtmfExample.cs
But the program crashes since ChannelData.UUID is null.
I am using Freeswitch 1.10.6, with default configuration
For the softphones I used MicroSip and PhonerLite
the OS is Windows10

To Reproduce
Steps to reproduce the behavior:

  1. Download Freeswitch,softphones and setup visual studio
  2. Create new solution/project (and install NEventSocket using NuGet)
  3. In Program.cs put this code:
    `using Microsoft.Extensions.Logging;
    using NEventSocket;
    using NEventSocket.FreeSwitch;
    using System;
    using System.Collections.Generic;
    using System.Reactive.Linq;
    using System.Threading.Tasks;

namespace Test_FSw
{
class Program
{
static async Task Main(string[] args)
{
NEventSocket.Logging.Logger.Configure(new LoggerFactory());
InboundSocket client;
client = await InboundSocket.Connect("localhost", 8021, "ClueCon", TimeSpan.FromSeconds(20));

        var originate = await client.Originate("user/1001", new OriginateOptions
        {
            CallerIdNumber = "123456789",
            CallerIdName = "test2",
            HangupAfterBridge = false,
            TimeoutSeconds = 20
        });

        if (!originate.Success)
        {
            Console.WriteLine("Failed");
            Console.WriteLine(originate.HangupCause.ToString());
            await client.Exit();
        }
        else
        {
            Console.WriteLine(originate.ChannelData.UUID);/*UUID or ChannelData is null*/
            var uuid = originate.ChannelData.UUID;
            /*unreached code*/
            await client.SubscribeEvents(EventName.Dtmf);
        }
        Console.WriteLine("Exit[Enter]");
        Console.ReadLine();


    }
   
}

}

`
4. Execute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions