<h1>Project "FreeSWITCH Source" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: 67edc7c3215f6476452f3ff7ee82ba559c39656f (commit)
      from: 2adfc50af7958eea12c15e023bcf80b18a4c73f9 (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Marc Olivier Chouinard
comments: 
mod_conference: Added to the Auto OutCall support to specify the conf profile to be used using variable : conference_auto_outcall_profile

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #000080; font-weight: bold">index 961a140..0aee352 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #800080; font-weight: bold">@@ -401,13 +401,14 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
                                                                                   char *bridgeto, uint32_t timeout, 
                                                                                   char *flags, 
                                                                                   char *cid_name, 
<span style="color: #A00000">-                                                                                  char *cid_num, </span>
<span style="color: #00A000">+                                                                                  char *cid_num,</span>
<span style="color: #00A000">+                                                                                  char *profile,</span>
                                                                                   switch_call_cause_t *cause,
                                                                                   switch_call_cause_t *cancel_cause);
 static switch_status_t conference_outcall_bg(conference_obj_t *conference,
                                                                                          char *conference_name,
                                                                                          switch_core_session_t *session, char *bridgeto, uint32_t timeout, const char *flags, const char *cid_name,
<span style="color: #A00000">-                                                                                         const char *cid_num, const char *call_uuid, switch_call_cause_t *cancel_cause);</span>
<span style="color: #00A000">+                                                                                         const char *cid_num, const char *call_uuid, const char *profile, switch_call_cause_t *cancel_cause);</span>
 SWITCH_STANDARD_APP(conference_function);
 static void launch_conference_thread(conference_obj_t *conference);
 static void launch_conference_video_thread(conference_obj_t *conference);
<span style="color: #800080; font-weight: bold">@@ -2410,6 +2411,7 @@ static void conference_loop_output(conference_member_t *member)</span>
                         const char *cid_num = switch_channel_get_variable(channel, &quot;conference_auto_outcall_caller_id_number&quot;);
                         const char *toval = switch_channel_get_variable(channel, &quot;conference_auto_outcall_timeout&quot;);
                         const char *flags = switch_channel_get_variable(channel, &quot;conference_auto_outcall_flags&quot;);
<span style="color: #00A000">+                        const char *profile = switch_channel_get_variable(channel, &quot;conference_auto_outcall_profile&quot;);</span>
                         const char *ann = switch_channel_get_variable(channel, &quot;conference_auto_outcall_announce&quot;);
                         const char *prefix = switch_channel_get_variable(channel, &quot;conference_auto_outcall_prefix&quot;);
                         int to = 60;
<span style="color: #800080; font-weight: bold">@@ -2441,7 +2443,7 @@ static void conference_loop_output(conference_member_t *member)</span>
                                         char *dial_str = switch_mprintf(&quot;%s%s&quot;, switch_str_nil(prefix), argv[x]);
                                         switch_assert(dial_str);
                                         conference_outcall_bg(member-&gt;conference, NULL, NULL, dial_str, to, switch_str_nil(flags), cid_name, cid_num, NULL, 
<span style="color: #A00000">-                                                                                  &amp;member-&gt;conference-&gt;cancel_cause);</span>
<span style="color: #00A000">+                                                                                  profile, &amp;member-&gt;conference-&gt;cancel_cause);</span>
                                         switch_safe_free(dial_str);
                                 }
                                 switch_safe_free(cpstr);
<span style="color: #800080; font-weight: bold">@@ -4264,9 +4266,9 @@ static switch_status_t conf_api_sub_dial(conference_obj_t *conference, switch_st</span>
         }
 
         if (conference) {
<span style="color: #A00000">-                conference_outcall(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], &amp;cause, NULL);</span>
<span style="color: #00A000">+                conference_outcall(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], NULL, &amp;cause, NULL);</span>
         } else {
<span style="color: #A00000">-                conference_outcall(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], &amp;cause, NULL);</span>
<span style="color: #00A000">+                conference_outcall(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], NULL, &amp;cause, NULL);</span>
         }
         stream-&gt;write_function(stream, &quot;Call Requested: result: [%s]\n&quot;, switch_channel_cause2str(cause));
 
<span style="color: #800080; font-weight: bold">@@ -4289,9 +4291,9 @@ static switch_status_t conf_api_sub_bgdial(conference_obj_t *conference, switch_</span>
         switch_uuid_format(uuid_str, &amp;uuid);
 
         if (conference) {
<span style="color: #A00000">-                conference_outcall_bg(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL);</span>
<span style="color: #00A000">+                conference_outcall_bg(conference, NULL, NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL, NULL);</span>
         } else {
<span style="color: #A00000">-                conference_outcall_bg(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL);</span>
<span style="color: #00A000">+                conference_outcall_bg(NULL, argv[0], NULL, argv[2], 60, NULL, argv[4], argv[3], uuid_str, NULL, NULL);</span>
         }
 
         stream-&gt;write_function(stream, &quot;OK Job-UUID: %s\n&quot;, uuid_str);
<span style="color: #800080; font-weight: bold">@@ -4807,7 +4809,8 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
                                                                                   switch_core_session_t *session,
                                                                                   char *bridgeto, uint32_t timeout, 
                                                                                   char *flags, char *cid_name, 
<span style="color: #A00000">-                                                                                  char *cid_num, </span>
<span style="color: #00A000">+                                                                                  char *cid_num,</span>
<span style="color: #00A000">+                                                                                  char *profile,</span>
                                                                                   switch_call_cause_t *cause,
                                                                                   switch_call_cause_t *cancel_cause)
 {
<span style="color: #800080; font-weight: bold">@@ -4817,6 +4820,7 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
         switch_channel_t *caller_channel = NULL;
         char appdata[512];
         int rdlock = 0;
<span style="color: #00A000">+        switch_bool_t have_flags = SWITCH_FALSE;</span>
 
         *cause = SWITCH_CAUSE_NORMAL_CLEARING;
 
<span style="color: #800080; font-weight: bold">@@ -4902,13 +4906,16 @@ static switch_status_t conference_outcall(conference_obj_t *conference,</span>
                         status = SWITCH_STATUS_MEMERR;
                         goto done;
                 }
<span style="color: #A00000">-                /* add them to the conference */</span>
<span style="color: #00A000">+</span>
                 if (flags &amp;&amp; strcasecmp(flags, &quot;none&quot;)) {
<span style="color: #A00000">-                        switch_snprintf(appdata, sizeof(appdata), &quot;%s+flags{%s}&quot;, conference_name, flags);</span>
<span style="color: #A00000">-                        switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, appdata);</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #A00000">-                        switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, conference_name);</span>
<span style="color: #00A000">+                        have_flags = SWITCH_TRUE;</span>
                 }
<span style="color: #00A000">+                /* add them to the conference */</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                switch_snprintf(appdata, sizeof(appdata), &quot;%s%s%s%s%s%s&quot;, conference_name,</span>
<span style="color: #00A000">+                                profile?&quot;@&quot;:&quot;&quot;, profile?profile:&quot;&quot;,</span>
<span style="color: #00A000">+                                have_flags?&quot;+flags{&quot;:&quot;&quot;, have_flags?flags:&quot;&quot;, have_flags?&quot;}&quot;:&quot;&quot;);</span>
<span style="color: #00A000">+                switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, appdata);</span>
 
                 switch_channel_set_caller_extension(peer_channel, extension);
                 switch_channel_set_state(peer_channel, CS_EXECUTE);
<span style="color: #800080; font-weight: bold">@@ -4940,6 +4947,7 @@ struct bg_call {</span>
         char *cid_num;
         char *conference_name;
         char *uuid;
<span style="color: #00A000">+        char *profile;</span>
         switch_call_cause_t *cancel_cause;
         switch_memory_pool_t *pool;
 };
<span style="color: #800080; font-weight: bold">@@ -4953,7 +4961,7 @@ static void *SWITCH_THREAD_FUNC conference_outcall_run(switch_thread_t *thread,</span>
                 switch_event_t *event;
 
                 conference_outcall(call-&gt;conference, call-&gt;conference_name,
<span style="color: #A00000">-                                                   call-&gt;session, call-&gt;bridgeto, call-&gt;timeout, call-&gt;flags, call-&gt;cid_name, call-&gt;cid_num, &amp;cause, call-&gt;cancel_cause);</span>
<span style="color: #00A000">+                                                   call-&gt;session, call-&gt;bridgeto, call-&gt;timeout, call-&gt;flags, call-&gt;cid_name, call-&gt;cid_num, call-&gt;profile, &amp;cause, call-&gt;cancel_cause);</span>
 
                 if (call-&gt;conference &amp;&amp; test_eflag(call-&gt;conference, EFLAG_BGDIAL_RESULT) &amp;&amp;
                         switch_event_create_subclass(&amp;event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
<span style="color: #800080; font-weight: bold">@@ -4969,6 +4977,7 @@ static void *SWITCH_THREAD_FUNC conference_outcall_run(switch_thread_t *thread,</span>
                 switch_safe_free(call-&gt;cid_num);
                 switch_safe_free(call-&gt;conference_name);
                 switch_safe_free(call-&gt;uuid);
<span style="color: #00A000">+                switch_safe_free(call-&gt;profile);</span>
                 if (call-&gt;pool) {
                         switch_core_destroy_memory_pool(&amp;call-&gt;pool);
                 }
<span style="color: #800080; font-weight: bold">@@ -4981,7 +4990,7 @@ static void *SWITCH_THREAD_FUNC conference_outcall_run(switch_thread_t *thread,</span>
 static switch_status_t conference_outcall_bg(conference_obj_t *conference,
                                                                                          char *conference_name,
                                                                                          switch_core_session_t *session, char *bridgeto, uint32_t timeout, const char *flags, const char *cid_name,
<span style="color: #A00000">-                                                                                         const char *cid_num, const char *call_uuid, switch_call_cause_t *cancel_cause)</span>
<span style="color: #00A000">+                                                                                         const char *cid_num, const char *call_uuid, const char *profile, switch_call_cause_t *cancel_cause)</span>
 {
         struct bg_call *call = NULL;
         switch_thread_t *thread;
<span style="color: #800080; font-weight: bold">@@ -5025,6 +5034,10 @@ static switch_status_t conference_outcall_bg(conference_obj_t *conference,</span>
                 call-&gt;uuid = strdup(call_uuid);
         }
 
<span style="color: #00A000">+        if (profile) {</span>
<span style="color: #00A000">+                call-&gt;profile = strdup(profile);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
         switch_threadattr_create(&amp;thd_attr, pool);
         switch_threadattr_detach_set(thd_attr, 1);
         switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
<span style="color: #800080; font-weight: bold">@@ -5750,7 +5763,7 @@ SWITCH_STANDARD_APP(conference_function)</span>
         /* if we&#39;re using &quot;bridge:&quot; make an outbound call and bridge it in */
         if (!zstr(bridgeto) &amp;&amp; strcasecmp(bridgeto, &quot;none&quot;)) {
                 switch_call_cause_t cause;
<span style="color: #A00000">-                if (conference_outcall(conference, NULL, session, bridgeto, 60, NULL, NULL, NULL, &amp;cause, NULL) != SWITCH_STATUS_SUCCESS) {</span>
<span style="color: #00A000">+                if (conference_outcall(conference, NULL, session, bridgeto, 60, NULL, NULL, NULL, NULL, &amp;cause, NULL) != SWITCH_STATUS_SUCCESS) {</span>
                         goto done;
                 }
         } else {
</pre></div>
========================================================================<pre>

Summary of changes:
 .../applications/mod_conference/mod_conference.c   |   45 +++++++++++++-------
 1 files changed, 29 insertions(+), 16 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>