<p dir="ltr">It's 2 in the morning and I'm really sleepy so pardon me if it does not make a lot of sense but maybe something to do with php timeout closing the socket and dropping the call?</p>
<div class="gmail_quote">Em 22/07/2013 14:33, "Michael Collins" <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Hi Fraser,<br><br></div>I'm curious about this line (#842 from PB 21211):<br><div><font size="1"><span style="font-family:courier new,monospace"><span><div style="color:rgb(0,170,170);background-color:black">
<span>2013</span><span>-07</span><span>-20</span> <span>10</span>:<span>42</span>:<span>15.093114</span> <span>[</span>NOTICE<span>]</span> mod_commands.c:<span>2960</span> Hangup sofia/internal/sip:<span>12605</span>@<span>192.168</span><span>.1</span><span>.43</span>:<span>51977</span> <span>[</span>CS_EXECUTE<span>]</span> <span>[</span>NORMAL_CLEARING<span>]</span></div>
</span></span></font></div><br></div>That hangup is coming from mod_commands.c, which suggests that there is something going on related to the originate API. For test purposes, what happens when you manually perform the originate from fs_cli without using the web/PHP stuff? See if the symptom occurs there or not and that may help narrow down where to look next.<br>
<br></div>-MC<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 20, 2013 at 5:15 AM, Fraser Redmond <span dir="ltr"><<a href="mailto:fraserredmond@gmail.com" target="_blank">fraserredmond@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Some of our calls are getting disconnected after exactly 5 minutes. I've finally narrowed it down to be something to do with how the calls are initiated. We have 2 ways of initiating calls:</div>
<div>
<br></div><div>1) Direct from a softphone out to a gateway to a landline number - this doesn't disconnect after 5min</div><div><br></div><div>2) From our webapp using php and fsock to call a command like this:</div><div>
api originate {otherVarsGetPassedThruHereFromPhp=x}user/12605@$freeswitchDomain 442030112233<br></div><div>(I pass through about 8-10 vars. I've tried removing them all, but it still disconnects.) </div>
<div>The call works fine and everything is normal until 5 minutes after the call was answered, at which point it hangs up (usually with a second or two, sometimes up to 10 seconds after the 5 minute mark.)</div><div><br>
</div><div><br></div><div><br></div><div>A few things I've already tried and ruled out:</div><div><br></div><div>- I've stripped out all the javascript files that we run, variables we set, and commands we run, so that the only part of the dialplan that gets executed are just:</div>
<div> <action application="bridge" data="sofia/gateway/flowroute/796000#442030112233"/></div><div><br></div><div><div>- Right before it disconnects there are no extra lines in the sip log (other than those to handle the hangup.) There's also no sip messages in the log immediately before it disconnects. </div>
<div><br></div></div><div>- A year ago I set "record_waste_resources=true" and that seemed to fix it at the time - but it may have only fixed the calls direct from the softphone.</div>
<div><br></div><div>- In the internal and external profiles I've set rtp-timeout-sec=3600 (it used to be 300, and I thought that might be the cause.)</div><div><br></div><div>- I've done a file compare between the log outputs of each type of call and theres differences that I'd expect because of the different types of call, but otherwise they're about the same. (Differences in how the codec gets set, and a slightly different route through the dialplan.)</div>
<div><br></div><div><br></div><div><br></div><div>A few other details about our setup</div>
<div><br></div><div>- I upgrade to the latest version of freeswitch regularly, but the problem has been happening for months or years.</div><div><br></div><div>- Our production server is on Amazon AWS, so there could be a NAT issue... but it also happens on my dev server on my local network (though that is behind a NAT too, so it could be the NAT between my dev server and the gateway... what would I do about that? And why would it happen with one type of call, but not the other.)</div>
<div><br></div>
<div>- Normally, all our calls are recorded, so I'm not doing bypass-media. The wav file for a 5min recording is just slightly under 10mb, so I had been wondering if that was the limit being hit, but it still disconnects if recording is off.</div>
<div><br></div><div>- I've tried with a different gateway and different softphone, and it still happens.</div><div><br></div><div><div>- Here's a full log output (with sip) if you want to take a look:</div><div><br>
</div><div><a href="http://pastebin.freeswitch.com/21211" target="_blank">http://pastebin.freeswitch.com/21211</a></div></div><div><a href="http://pastebin.freeswitch.com/21212" target="_blank">http://pastebin.freeswitch.com/21212</a> (this is direct from the softphone, in case the comparison helps)<br>
</div><div><br></div><div><br></div><div>I'm stumped, so any ideas or advice would be much appreciated. I have a pcap I can send if you want to look at one.</div><div><br></div><div>My best guess right now is that it's a bug to do with api originate. (That it's setting a variable that a normal call doesn't, or vice-versa.)</div>
<div><br></div><div><br></div><div>Or is there something I should change about the format of either:</div><div> user/12605@$freeswitchDomain<br></div><div>or</div><div> sofia/gateway/flowroute/796000#442030112233<br>
</div><div>(I set up the format of both of those strings about 3 years ago, so maybe there's a better way to do it now.)</div><div><br></div><div>Cheers,<br>Fraser<br><br></div>
</div>
<br>_________________________________________________________________________<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br>
</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>