<div dir="ltr">Yes,my code is pulled from the master branch on <a href="http://4.23.It">4.23.It</a> seems that the push is fast than pop.I add some code to log the queue length,just like below:<div><div>if (!sofia_private) {</div>
<div><span class="" style="white-space:pre">                        </span>if (sess_count &gt;= sess_max || !sofia_test_pflag(profile, PFLAG_RUNNING) || !switch_core_ready_inbound()) {</div><div><span class="" style="white-space:pre">                                </span>nua_respond(nh, 503, &quot;Maximum Calls In Progress&quot;, SIPTAG_RETRY_AFTER_STR(&quot;300&quot;), NUTAG_WITH_THIS(nua), TAG_END());</div>
<div><span class="" style="white-space:pre">                                </span>goto end;</div><div><span class="" style="white-space:pre">                        </span>}</div><div><br></div><div><span class="" style="white-space:pre">                        </span>switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;switch_queue_size(mod_sofia_globals.msg_queue):%d\n&quot;, switch_queue_size(mod_sofia_globals.msg_queue));</div>
<div><span class="" style="white-space:pre">                        </span>switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;critical:%d\n&quot;, (unsigned int)critical);</div><div><br></div><div><span class="" style="white-space:pre">                        </span>if (switch_queue_size(mod_sofia_globals.msg_queue) &gt; (unsigned int)critical) {</div>
<div><span class="" style="white-space:pre">                                </span>nua_respond(nh, 503, &quot;System Busy&quot;, SIPTAG_RETRY_AFTER_STR(&quot;300&quot;), NUTAG_WITH_THIS(nua), TAG_END());</div><div><span class="" style="white-space:pre">                                </span>goto end;</div>
<div><span class="" style="white-space:pre">                        </span>}</div><div><br></div><div><span class="" style="white-space:pre">                        </span>if (sofia_test_pflag(profile, PFLAG_STANDBY)) {</div><div><span class="" style="white-space:pre">                                </span>nua_respond(nh, 503, &quot;System Paused&quot;, NUTAG_WITH_THIS(nua), TAG_END());</div>
<div><span class="" style="white-space:pre">                                </span>goto end;</div><div><span class="" style="white-space:pre">                        </span>}</div><div><span class="" style="white-space:pre">                </span>}</div></div><div><br></div><div>And I found the switch_queue_size(mod_sofia_globals.msg_queue) is increase so fast and almost did not decrease,the below is the log:</div>
<div><div>2014-04-28 18:55:31.416405 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56157</div><div>2014-04-28 18:55:31.436402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56158</div>
<div>2014-04-28 18:55:31.436402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56159</div><div>2014-04-28 18:55:31.476402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56160</div>
<div>2014-04-28 18:55:31.496402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56161</div><div>2014-04-28 18:55:31.496402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56162</div>
<div>2014-04-28 18:55:31.496402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56163</div><div>2014-04-28 18:55:31.516402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56164</div>
<div>2014-04-28 18:55:31.516402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56165</div><div>2014-04-28 18:55:31.536402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56166</div>
<div>2014-04-28 18:55:31.556402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56167</div><div>2014-04-28 18:55:31.576407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56168</div>
<div>2014-04-28 18:55:31.576407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56169</div><div>2014-04-28 18:55:31.576407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56170</div>
<div>2014-04-28 18:55:31.596403 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56171</div><div>2014-04-28 18:55:31.616404 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56169</div>
<div>2014-04-28 18:55:31.636404 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56170</div><div>2014-04-28 18:55:31.656403 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56172</div>
<div>2014-04-28 18:55:31.656403 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56173</div><div>2014-04-28 18:55:31.656403 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56174</div>
<div>2014-04-28 18:55:31.676404 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56175</div><div>2014-04-28 18:55:31.676404 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56175</div>
<div>2014-04-28 18:55:31.716404 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56177</div><div>2014-04-28 18:55:31.716404 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56178</div>
<div>2014-04-28 18:55:31.756407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56180</div><div>2014-04-28 18:55:31.756407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56181</div>
<div>2014-04-28 18:55:31.756407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56182</div><div>2014-04-28 18:55:31.756407 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56183</div>
<div>2014-04-28 18:55:31.776414 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56184</div><div>2014-04-28 18:55:31.796402 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56185</div>
<div>2014-04-28 18:55:31.836415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56179</div><div>2014-04-28 18:55:31.856415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56180</div>
<div>2014-04-28 18:55:31.896415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56183</div><div>2014-04-28 18:55:31.896415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56184</div>
<div>2014-04-28 18:55:31.896415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56185</div><div>2014-04-28 18:55:31.916416 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56186</div>
<div>2014-04-28 18:55:31.916416 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56187</div><div>2014-04-28 18:55:31.916416 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56188</div>
<div>2014-04-28 18:55:31.936415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56189</div><div>2014-04-28 18:55:31.936415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56190</div>
<div>2014-04-28 18:55:31.936415 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56191</div><div>2014-04-28 18:55:31.996416 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56192</div>
<div>2014-04-28 18:55:32.036417 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56194</div><div>2014-04-28 18:55:32.036417 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56195</div>
<div>2014-04-28 18:55:32.036417 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56196</div><div>2014-04-28 18:55:32.056417 [DEBUG] sofia.c:2081 switch_queue_size(mod_sofia_globals.msg_queue):56197</div>
</div><div><br></div><div><br></div><div>Can you confirm again?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-28 20:03 GMT+08:00 Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I think we have already fixed this bug.  Have you tried updating to more recent code?<div>
<br><div><div><div class="h5"><div>On Apr 28, 2014, at 7:46 AM, rockxsj &lt;<a href="mailto:rockxsj@gmail.com" target="_blank">rockxsj@gmail.com</a>&gt; wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">

  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    
    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">Hi guys!<span><br>

        <br>
        I found that the some of the incoming call will hangup with
        case: WRONG_CALL_STATE,but else will be ok.After a hour,almost
        every incoming call will be hangup with the same cause.Then I
        will restart the freeswitch,it will server like before:some call
        will be hangup with the cause...<br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

      </span></span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">28e10f2e-c851-11e3-a146-85a8fadad1b0 2014-04-20
      14:01:15.498169 [WARNING] switch_core_state_machine.c:567
      28e10f2e-c851-11e3-a146-85a8fadad1b0
      <a href="mailto:sofia/internal/123456@sipsj.236.cn" target="_blank">sofia/internal/123456@sipsj.236.cn</a> Abandoned<br>
      28e10f2e-c851-11e3-a146-85a8fadad1b0 2014-04-20 14:01:15.498169
      [NOTICE] switch_core_state_machine.c:570 Hangup
      <a href="mailto:sofia/internal/123456@sipsj.236.cn" target="_blank">sofia/internal/123456@sipsj.236.cn</a> [CS_NEW] [WRONG_CALL_STATE]</span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">What does Wrong call state mean and what can I do to
      fix this issue?<span> </span></span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">Everything else is working. I can make outgoing
      calls and call other<span> </span></span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">extensions.<span> </span></span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">Thanks in advance.<span> </span></span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px">

    <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:13px;white-space:normal;font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;word-spacing:0px"><span> <br>

      </span></span>
  </div></div></div>

_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">个人主页:<a href="http://yazi.whoknow.me" target="_blank">http://yazi.whoknow.me</a></div>
</div>