signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.61k stars 1.43k forks source link

mod_conference: isfocus for conference_outcall #679

Open sergey-safarov opened 4 years ago

sergey-safarov commented 4 years ago

When I initiate new participant addition to the conference using the command line

conference 3500 dial sofia/internal/sip:5555@192.168.2.10:5064 1111 1111

And the conference has defined flag rfc-4579 then Contact header does not have isfocus param. For an established conference may be used this fix

@@ -1581,7 +1582,13 @@ switch_status_t conference_outcall(conference_obj_t *conference,
        }

-       status = switch_ivr_originate(session, &peer_session, cause, bridgeto, timeout, NULL, cid_name, cid_num, NULL, var_event, SOF_NO_LIMITS, cancel_cause, NULL);
+       if (conference_utils_test_flag(conference, CFLAG_RFC4579)) {
+               char *dialstr = switch_mprintf("{sip_invite_contact_params=~isfocus}%s", bridgeto);
+               status = switch_ivr_originate(session, &peer_session, cause, dialstr, timeout, NULL, cid_name, cid_num, NULL, var_event, SOF_NO_LIMITS, cancel_cause, NULL);
+               switch_safe_free(dialstr);
+       } else {
+               status = switch_ivr_originate(session, &peer_session, cause, bridgeto, timeout, NULL, cid_name, cid_num, NULL, var_event, SOF_NO_LIMITS, cancel_cause, NULL);
+       }
        switch_mutex_lock(conference->mutex);
        conference->originating--;
        switch_mutex_unlock(conference->mutex);

But this does not work for first participant addition.

Could you add isfocus contact param when for conference_outcall when conference has flag rfc-4579.

briankwest commented 4 years ago

Please issue a pull request.

briankwest commented 4 years ago

You don't wanna do this on every single outbound dial from a conference even if that flag is on, Just an FYI.

sergey-safarov commented 4 years ago

Please issue a pull request.

Diff above will fix call when conference exists (has one or more participants). But not fix when conference does not have participants. So diff is not optimal and needs other changes.

You don't wanna do this on every single outbound dial

Yes, we want for every call from conference with flag rfc-4579.

slavikbialik commented 4 years ago

OMG, I'm sitting on the same issue for over 3 days already , and now I see this. Need it also for outbound calls from the conference, as I want to use REFER (in-dialog) to add/remove participants to a conference according to the RFC4579, without it, it seems that I cannot at all. Only if I'll call into an existing conference, it'll reply me in 200OK with a proper contact, so REFER can work on those kind of calls, but not on calls that invoked using the outcall method (mostly important for a newly created conference when you invoke the outcall method in the dialplan).

chicoze commented 3 years ago

Any news about this subject?