danbarua / NEventSocket

A reactive FreeSwitch eventsocket library for Modern .Net
Mozilla Public License 2.0
74 stars 37 forks source link

Bridge simultaneous ring multiple endpoints #69

Open EmaX093 opened 7 years ago

EmaX093 commented 7 years ago

Hi! I'm newbie to freeswitch, this afternoon i was trying to make ring multiple endpoints simultaneously. I tried first with ExecuteApplication and it worked flawlessly... Here's is the handcoded bridgestring:

{ignore_early_media='true'}${sofia_contact(*/102@soldem.com)},${sofia_contact(*/103@soldem.com)}

That works ok!

Now, when i tried to do the same with the Bridge function in EventSocket class, well, only one extension (the first) was ringing. I found the problem, but i'm unsure how to solve it.

If you look at LOC 418 of EventSocket class, there's is this block of code:

if (string.IsNullOrEmpty(options.UUID))
{
    options.UUID = Guid.NewGuid().ToString();
}

When the UUID property is setted, the bridgeString looks like this:

{ignore_early_media='true',origination_uuid='58caf194-b334-43a1-b496-684e0ae01018'}${sofia_contact(*/102@soldem.com)},${sofia_contact(*/103@soldem.com)}

I tested commenting the block in LOC 418 so the bridgeString is generated without origination_uuid and it works! But i don't know if that is the correct way to solve it.

Any idea?

Cheers!

danbarua commented 7 years ago

I've just looked at the code, it doesn't look like we use the origination_uuid in this scenario for anything other than correlating log messages. We might be able to remove it but I will need to do some testing to ensure there are no unwanted side effects.