<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Jonathan,<br>
      <br>
      Please give it a try to this patch - it is not really tested, but
      when the call is sent the Queue announcement, it should have a
      ";cc_pos=xxx" parameter giving the position is the queue (0 being
      the first to be dispatched to agents).<br>
      <br>
      Let me know if it works.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 28.10.2016 15:59, Jonathan Hunter
      wrote:<br>
    </div>
    <blockquote
cite="mid:HE1PR0201MB2171B49419214F396C251B7BBDAD0@HE1PR0201MB2171.eurprd02.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>Hi Bogdan,</p>
        <p><br>
        </p>
        <p>Great news, really do appreciate that.</p>
        <p><br>
        </p>
        <p>Many thanks</p>
        <p><br>
        </p>
        <p>Jon</p>
        <br>
        <br>
        <div style="color: rgb(0, 0, 0);">
          <hr tabindex="-1" style="display:inline-block; width:98%">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              color="#000000" face="Calibri, sans-serif"><b>From:</b>
              Bogdan-Andrei Iancu <a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a><br>
              <b>Sent:</b> 28 October 2016 12:48<br>
              <b>To:</b> Jonathan Hunter; OpenSIPS users mailling list<br>
              <b>Subject:</b> Re: [OpenSIPS-Users] opensips 2.1
              call_center queue position</font>
            <div> </div>
          </div>
          <div><tt>Hi Jonathan,<br>
              <br>
              No, it is no yet available. Give me couple of days and I
              will make a patch for it.<br>
              <br>
              Best regards,<br>
            </tt>
            <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com" id="LPlnk368099" previewremoved="true">http://www.opensips-solutions.com</a></pre>
            <div id="LPBorder_GT_14776595291680.16142986933183168"
              style="margin-bottom: 20px; overflow: auto; width: 100%;
              text-indent: 0px;">
              <table id="LPContainer_14776595291640.8792434000494409"
                style="width: 90%; background-color: rgb(255, 255, 255);
                position: relative; overflow: auto; padding-top: 20px;
                padding-bottom: 20px; margin-top: 20px; border-top: 1px
                dotted rgb(200, 200, 200); border-bottom: 1px dotted
                rgb(200, 200, 200);" cellspacing="0">
                <tbody>
                  <tr style="border-spacing: 0px;" valign="top">
                    <td id="TextCell_14776595291650.6411913265735705"
                      colspan="2" style="vertical-align: top; position:
                      relative; padding: 0px; display: table-cell;">
                      <div id="LPTitle_14776595291650.7835254541490546"
                        style="top: 0px; color: rgb(0, 120, 215);
                        font-weight: normal; font-size: 21px;
                        font-family: wf_segoe-ui_light, &quot;Segoe UI
                        Light&quot;, &quot;Segoe WP Light&quot;,
                        &quot;Segoe UI&quot;, &quot;Segoe WP&quot;,
                        Tahoma, Arial, sans-serif; line-height: 21px;">
                        <a moz-do-not-send="true"
                          id="LPUrlAnchor_14776595291670.06572417450966261"
                          href="http://www.opensips-solutions.com/"
                          target="_blank" style="text-decoration: none;">Home
                          — OpenSIPS Solutions</a></div>
                      <div
                        id="LPMetadata_14776595291670.5178665203400816"
                        style="margin: 10px 0px 16px; color: rgb(102,
                        102, 102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, &quot;Segoe UI&quot;,
                        &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 14px;">
                        <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></div>
                      <div
                        id="LPDescription_14776595291670.8058045333314279"
                        style="display: block; color: rgb(102, 102,
                        102); font-weight: normal; font-family:
                        wf_segoe-ui_normal, &quot;Segoe UI&quot;,
                        &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif;
                        font-size: 14px; line-height: 20px; max-height:
                        100px; overflow: hidden;">
                        OpenSIPS is a mature Open Source implementation
                        of a SIP server. OpenSIPS is more than a SIP
                        proxy/router as it includes application-level
                        functionalities.</div>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <br>
            <div class="moz-cite-prefix">On 25.10.2016 19:22, Jonathan
              Hunter wrote:<br>
            </div>
            <blockquote type="cite">
              <div id="divtagdefaultwrapper" style="font-size:12pt;
                color:#000000;
                font-family:Calibri,Arial,Helvetica,sans-serif">
                <p>Hi Bogdan,</p>
                <p><br>
                </p>
                <p>Sorry cant recall If I replied to this.</p>
                <p><br>
                </p>
                <p>Is cc_pos available now to extract from the module?  </p>
                <p><br>
                </p>
                <p>Thats the only thing I need then I can implement call
                  center which I think will be much more scale-able than
                  the other approach I am using with FreeSWITCH, I would
                  use that just for announcements.</p>
                <p><br>
                </p>
                <p>Any response/help appreciated.</p>
                <p><br>
                </p>
                <p>Jon</p>
                <p><br>
                </p>
                <br>
                <div style="color:rgb(0,0,0)">
                  <hr tabindex="-1" style="display:inline-block;
                    width:98%">
                  <div id="divRplyFwdMsg" dir="ltr"><font
                      style="font-size:11pt" color="#000000"
                      face="Calibri, sans-serif"><b>From:</b>
                      Bogdan-Andrei Iancu
                      <a moz-do-not-send="true"
                        class="moz-txt-link-rfc2396E"
                        href="mailto:bogdan@opensips.org">&lt;bogdan@opensips.org&gt;</a><br>
                      <b>Sent:</b> 13 October 2016 10:59<br>
                      <b>To:</b> Jonathan Hunter; OpenSIPS users
                      mailling list<br>
                      <b>Subject:</b> Re: [OpenSIPS-Users] opensips 2.1
                      call_center queue position</font>
                    <div> </div>
                  </div>
                  <div><tt>Hi Jonathan,<br>
                      <br>
                      No, currently this is not possible. I was trying
                      to envision a solution for your need.<br>
                      <br>
                      But, checking the code, it is really difficult to
                      add the headers to the INVITEs originated by
                      OpenSIPS (via the B2BUA), as we need some
                      flexibility (different headers to different
                      INVITEs belonging to the same B2B scenario , and
                      even more, we need to traverse couple of internal
                      APIs - to propagate the hdrs from Call center
                      module all the way to TM).<br>
                      <br>
                      So, a simpler approach may be to add such extra
                      info as URI params to the RURI. Like if you have
                      the RURI
                      <a moz-do-not-send="true"
                        class="moz-txt-link-rfc2396E"
                        href="mailto:sip:queue@192.168.1.10:5060">"sip:queue@192.168.1.10:5060"</a>
                      for the queue/waiting playback, the RURI in the
                      INVITE to the media server will look like : 
                    </tt><tt><a moz-do-not-send="true"
                        class="moz-txt-link-abbreviated"
                        href="mailto:sip:queue@192.168.1.10:5060;cc_eta=40;cc_pos=10">sip:queue@192.168.1.10:5060;cc_eta=40;cc_pos=10</a> 
                      - cc_eta being the estimated time to wait in
                      seconds and cc_pos the position in the queue.<br>
                      <br>
                      What do you think of this ?<br>
                      <br>
                      Regards,<br>
                    </tt>
                    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
                    <div class="moz-cite-prefix">On 12.10.2016 17:21,
                      Jonathan Hunter wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">Hi Bogdan,
                        <div><br>
                        </div>
                        <div>Yes being able to grab the queue position
                          would be perfect.</div>
                        <div><br>
                        </div>
                        <div>Is that possible?</div>
                        <div><br>
                        </div>
                        <div>Thanks</div>
                        <div><br>
                        </div>
                        <div>Jon<br>
                          <br>
                          <div>
                            <hr id="stopSpelling">
                            Subject: Re: [OpenSIPS-Users] opensips 2.1
                            call_center queue position<br>
                            To: <a moz-do-not-send="true"
                              class="moz-txt-link-abbreviated"
                              href="mailto:hunterj91@hotmail.com">hunterj91@hotmail.com</a>;
                            <a moz-do-not-send="true"
                              class="moz-txt-link-abbreviated"
                              href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
                            From: <a moz-do-not-send="true"
                              class="moz-txt-link-abbreviated"
                              href="mailto:bogdan@opensips.org">bogdan@opensips.org</a><br>
                            Date: Wed, 12 Oct 2016 15:42:43 +0300<br>
                            <br>
                            <tt>Hi Jonathan,<br>
                              <br>
                              When a call is mapped to a flow / queue
                              (before playing the welcome message), we
                              know the ETA (estimated time to wait) and
                              when is placed in the queue (before
                              playing the queuing) we internally know
                              the position in the queue.<br>
                              <br>
                              Would it help to have the position in the
                              queue placed into a custome SIP header,
                              when sending the INVITE to the
                              message_queue URL ? or to the welcome
                              message ?<br>
                              <br>
                              Regards,<br>
                            </tt>
                            <pre class="ecxmoz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                            <div class="ecxmoz-cite-prefix">On
                              12.10.2016 12:06, Jonathan Hunter wrote:<br>
                            </div>
                            <blockquote>
                              <style>
<!--
.ExternalClass .ecxhmmessage p
        {padding:0px}
.ExternalClass body.ecxhmmessage
        {font-size:12pt;
        font-family:Calibri}
-->
</style>
                              <div dir="ltr">Hello Bogdan,
                                <div><br>
                                </div>
                                <div>Thanks for the response.</div>
                                <div><br>
                                </div>
                                <div>In terms of my question, with a
                                  number of queuing platforms, they have
                                  the capability to tell the caller,
                                  what position they are in , and when
                                  they are likely to be answered.</div>
                                <div><br>
                                </div>
                                <div>I just wondered if this logic was
                                  already within the module, or if I
                                  would need to use an external
                                  code/script to facilitate this
                                  function?</div>
                                <div><br>
                                </div>
                                <div>As I presume call_center tracks the
                                  number of calls currently in a queue ?
                                  I would then want to be able to
                                  extract that information, and if a
                                  caller was for example in 3rd place in
                                  a queue, I could inject the relevant
                                  audio from freeswitch to tell them
                                  their current position?</div>
                                <div><br>
                                </div>
                                <div>Does that make sense? :)   Just
                                  wanted to know if its something this
                                  module can do?</div>
                                <div><br>
                                </div>
                                <div>Thanks</div>
                                <div><br>
                                </div>
                                <div>Jon<br>
                                  <br>
                                  <div>
                                    <hr id="ecxstopSpelling">
                                    Subject: Re: [OpenSIPS-Users]
                                    opensips 2.1 call_center queue
                                    position<br>
                                    To: <a moz-do-not-send="true"
                                      class="ecxmoz-txt-link-abbreviated"
href="mailto:users@lists.opensips.org">
                                      users@lists.opensips.org</a>; <a
                                      moz-do-not-send="true"
                                      class="ecxmoz-txt-link-abbreviated"
href="mailto:hunterj91@hotmail.com">
                                      hunterj91@hotmail.com</a><br>
                                    From: <a moz-do-not-send="true"
                                      class="ecxmoz-txt-link-abbreviated"
                                      href="mailto:bogdan@opensips.org">bogdan@opensips.org</a><br>
                                    Date: Wed, 12 Oct 2016 11:23:45
                                    +0300<br>
                                    <br>
                                    <tt>Hello Jon,<br>
                                      <br>
                                      The message_queue is a SIP URI
                                      pointing to an audio announcement
                                      to play to roll of the
                                      waiting/in-queue playback. This
                                      needs to be an announcements that
                                      never ends (from the perspective
                                      of the media server); only the the
                                      OpenSIPS Queue may terminate the
                                      playback, when it decides to take
                                      out the call from waiting and to
                                      deliver it to an agent.<br>
                                      <br>
                                      As for your question, I'm not sure
                                      I understand what you mean by
                                      "inject a message with queue
                                      position for the caller in
                                      question" - could you detail
                                      please ?<br>
                                      <br>
                                      Regards,<br>
                                    </tt>
                                    <pre class="ecxmoz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                    <div class="ecxmoz-cite-prefix">On
                                      11.10.2016 13:36, Jonathan Hunter
                                      wrote:<br>
                                    </div>
                                    <blockquote>
                                      <style>
<!--
.ExternalClass .ecxhmmessage p
        {padding:0px}
.ExternalClass body.ecxhmmessage
        {font-size:12pt;
        font-family:Calibri}
-->
</style>
                                      <div dir="ltr">
                                        <div><span
                                            style="font-size:12pt">Hi
                                            guys,</span></div>
                                        <div><br>
                                        </div>
                                        <div>I have implemented an
                                          opensips/freeswitch
                                          environment, and I wish to add
                                          call queues to it, and I like
                                          the look of call_center, so
                                          just checking this out in
                                          comparison to mod_callcenter
                                          in FS world.</div>
                                        <div><br>
                                        </div>
                                        <div>My main question is if
                                          using the call_center module
                                          if you can inject a message
                                          with queue position for the
                                          caller in question, as I cant
                                          see that in documentation, I
                                          only see message_queue which I
                                          assume could be used to report
                                          the callers position, but just
                                          wondered if anyone has done
                                          this and if they could give me
                                          some tips as to if possible?</div>
                                        <div><br>
                                        </div>
                                        <div>Many thanks</div>
                                        <div><br>
                                        </div>
                                        <div>Jon</div>
                                      </div>
                                      <br>
                                      <fieldset
                                        class="ecxmimeAttachmentHeader"></fieldset>
                                      <br>
                                      <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="ecxmoz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                    </blockquote>
                                    <br>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </div>
              </div>
            </blockquote>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>