<div dir="ltr"><div>Just for others looking later, here is the final code I came up with, with rtp_payload extracted. <br></div><div class="gmail_extra"><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote"><span class="" style="white-space:pre">                </span>if session:getVariable(&quot;switch_r_sdp&quot;) ~= nil then</div><div class="gmail_quote"><span class="" style="white-space:pre">                        </span></div><div class="gmail_quote"><span class="" style="white-space:pre">                        </span>local s = &#39;[[&#39; .. session:getVariable(&quot;switch_r_sdp&quot;) ..&#39;]]&#39;</div><div class="gmail_quote"><span class="" style="white-space:pre">        </span></div><div class="gmail_quote"><span class="" style="white-space:pre">                        </span>if string.find(s, &quot;a=rtpmap:(%d+)%stelephone%-event%/8000&quot;) ~= nil then</div><div class="gmail_quote"><br></div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>freeswitch.consoleLog(&quot;debug&quot;, &quot;NO NEED TO START starting spandsp_start_dtmf\n&quot;)</div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span></div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>local payload = string.match(s,&quot;a=rtpmap:(%d+)%stelephone%-event%/8000&quot;)</div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span></div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>if payload  ~= nil then</div><div class="gmail_quote"><span class="" style="white-space:pre">                                        </span>freeswitch.consoleLog(&quot;debug&quot;, &quot;rtp_payload_number = &quot; .. payload  ..&quot;\n&quot;)</div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>end </div><div class="gmail_quote"><br></div><div class="gmail_quote"><span class="" style="white-space:pre">                        </span>else</div><div class="gmail_quote"><br></div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>freeswitch.consoleLog(&quot;info&quot;, &quot;starting spandsp_start_dtmf\n&quot;)</div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>session:execute(&quot;spandsp_start_dtmf&quot;)</div><div class="gmail_quote"><span class="" style="white-space:pre">                                </span>session:sleep(2000)</div><div class="gmail_quote"><span class="" style="white-space:pre">                        </span></div><div class="gmail_quote"><span class="" style="white-space:pre">                        </span>end</div><div class="gmail_quote"><br></div><div class="gmail_quote"><span class="" style="white-space:pre">                </span>end </div></div></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Cheers</div><div class="gmail_quote"><br></div><div class="gmail_quote">Phil</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>