<div dir="ltr"><div class="gmail_default" style="font-size:small">Is there way to obtain the SIP Call ID from the "id" or when is_callid=0?</div><div class="gmail_default" style="font-size:small">if I save the callID on a global variable, will it be visible around all the code?</div><div class="gmail_default" style="font-size:small">Sorry I am still learning the ropes.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 14, 2022 at 9:38 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <font face="monospace">Hi,<br>
      <br>
      As per docs [1], you have in event_route :<br>
      <br>
       id - represents the identifier of the call for which that event
      was received.<br>
      <br>
       is_callid - is 0 if the id parameter represents the Dialog ID, or
      1 if it is a callid. <br>
      <br>
      [1]
<a href="https://opensips.org/html/docs/modules/3.2.x/rtpproxy.html#event_E_RTPPROXY_DTMF" target="_blank">https://opensips.org/html/docs/modules/3.2.x/rtpproxy.html#event_E_RTPPROXY_DTMF</a><br>
      <br>
      Regards,<br>
    </font>
    <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
  <a href="https://www.opensips.org/events/Summit-2022Athens/" target="_blank">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
    <div>On 9/14/22 10:46 AM, Saint Michael
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small">My goal is
              to close the call as soon as the callee presses any DTMF</span></blockquote>
          <div><span class="gmail_default" style="font-size:small">when
              any DTMF is detected,  then I need to access the callID
              variable, </span> <span class="gmail_default" style="font-size:small">$ci</span></div>
          <div><span class="gmail_default" style="font-size:small">but
              it's nowhere to be found</span></div>
          <div><span class="gmail_default" style="font-size:small">Also
              I need $avp(start_time) and $avp(duration)</span></div>
          <div><span class="gmail_default" style="font-size:small">I am
              at a loss as to how to retrieve this information. The call
              is connected</span></div>
          <div><span class="gmail_default" style="font-size:small">I
              need to fire a database query to close the call.</span></div>
          <div>
            <div class="gmail_default" style="font-size:small">I imagine
              that when the call got connected, some variable stored
              that unix-time .</div>
            <div class="gmail_default" style="font-size:small">But it
              does not seem to be available in this part of the code.</div>
            <div class="gmail_default" style="font-size:small">Philip</div>
            <div class="gmail_default" style="font-size:small"><br>
            </div>
            <br>
          </div>
          <div><span class="gmail_default" style="font-size:small"><br>
            </span></div>
          <div><span class="gmail_default" style="font-size:small"><br>
            </span></div>
          <div><span class="gmail_default" style="font-size:small"><br>
            </span></div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small"></span><br>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a 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>

</blockquote></div>