<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Asterisk shuts down and restarts 2 processes]]></title><description><![CDATA[<p dir="auto">Hi, I've got a big Problem with my asterisk on pfsense. It's the asterisk 1.8 package installed through the package system of the web gui. So nothing fancy.<br />
Yet after a while the asterisk process stops with:</p>
<pre><code>
...
[Nov 15 20:14:26]     -- Remote UNIX connection
[Nov 15 20:14:26] Beginning asterisk shutdown....
[Nov 15 20:14:26] Asterisk cleanly ending (0).
[Nov 15 20:14:26] Executing last minute cleanups
...

</code></pre>
<p dir="auto">After that asterisk get's automatically restarted but it starts 2 processes interfering with each other.</p>
<pre><code> ps aux | grep asterisk
asterisk 12817   0.0  0.9 503796 27208  -  Is    8:49PM     0:02.60 /usr/local/sbin/asterisk -n -F -U asterisk
asterisk 12903   0.0  0.9 504436 27496  -  Is    8:49PM     0:02.93 /usr/local/sbin/asterisk -n -F -U asterisk

</code></pre>
<p dir="auto">This ends up in a log like this:</p>
<pre><code>
...
[Nov 17 21:16:22] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:16:22] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #81)
[Nov 17 21:16:42] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:16:42] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #82)
[Nov 17 21:16:42] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:16:42] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #82)
[Nov 17 21:17:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:17:03] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #83)
[Nov 17 21:17:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:17:03] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #83)
[Nov 17 21:17:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:17:23] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #84)
[Nov 17 21:17:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:17:23] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #84)
[Nov 17 21:17:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:17:43] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #85)
[Nov 17 21:17:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:17:43] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #85)
[Nov 17 21:18:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:18:03] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #86)
[Nov 17 21:18:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:18:03] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #86)
[Nov 17 21:18:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:18:23] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #87)
[Nov 17 21:18:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:18:23] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #87)
[Nov 17 21:18:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:18:43] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #88)
[Nov 17 21:18:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:18:43] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #88)
[Nov 17 21:19:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:19:03] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #89)
[Nov 17 21:19:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:19:03] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #89)
[Nov 17 21:19:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:19:23] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #90)
[Nov 17 21:19:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:19:23] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #90)
[Nov 17 21:19:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:19:43] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #91)
[Nov 17 21:19:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
[Nov 17 21:19:43] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #91)
[Nov 17 21:19:57] NOTICE[-1] cdr.c: CDR simple logging enabled.
[Nov 17 21:19:57] NOTICE[-1] loader.c: 162 modules will be loaded.
[Nov 17 21:19:57] WARNING[-1] loader.c: Error loading module 'res_snmp.so': Shared object "libperl.so" not found, required by "libnetsnmpmibs.so.30"
[Nov 17 21:19:57] NOTICE[-1] pbx_lua.c: Lua PBX Switch loaded.
[Nov 17 21:19:58] WARNING[-1] loader.c: Error loading module 'res_snmp.so': Shared object "libperl.so" not found, required by "libnetsnmpmibs.so.30"
[Nov 17 21:19:58] WARNING[-1] loader.c: Module 'res_snmp.so' could not be loaded.
[Nov 17 21:19:58] NOTICE[-1] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Nov 17 21:20:04] NOTICE[-1] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
...

</code></pre>
<p dir="auto">This repeats forever more until I either kill the 2 processes or restart asterisk completely though the web gui. Worth noting is, that this happens even with the default config that comes with the package.<br />
I'm kind at an end with this since the logs don't tell me much apart from that's asterisk stopped. Just not why it stopped.<br />
Any ideas? Is it a bug? Any other relevant logs I can paste?</p>
]]></description><link>https://forum.netgate.com/topic/91831/asterisk-shuts-down-and-restarts-2-processes</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 04:31:59 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/91831.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Nov 2015 20:35:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Asterisk shuts down and restarts 2 processes on Sat, 21 Nov 2015 18:16:55 GMT]]></title><description><![CDATA[<p dir="auto">Yep.</p>
]]></description><link>https://forum.netgate.com/post/585531</link><guid isPermaLink="true">https://forum.netgate.com/post/585531</guid><dc:creator><![CDATA[Fesoj]]></dc:creator><pubDate>Sat, 21 Nov 2015 18:16:55 GMT</pubDate></item><item><title><![CDATA[Reply to Asterisk shuts down and restarts 2 processes on Sat, 21 Nov 2015 18:15:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fesoj">@<bdi>Fesoj</bdi></a>:</p>
<blockquote>
<p dir="auto">A better fix is probably fixing the Asterisk package by renaming the rc-file to asterisk instead naming it asterisk.sh.</p>
</blockquote>
<p dir="auto">As already noted elsewhere, that file should not exist at all.</p>
]]></description><link>https://forum.netgate.com/post/585528</link><guid isPermaLink="true">https://forum.netgate.com/post/585528</guid><dc:creator><![CDATA[doktornotor]]></dc:creator><pubDate>Sat, 21 Nov 2015 18:15:11 GMT</pubDate></item><item><title><![CDATA[Reply to Asterisk shuts down and restarts 2 processes on Sat, 21 Nov 2015 17:23:05 GMT]]></title><description><![CDATA[<p dir="auto">Normally there can only be a single instance of Asterisk, but it takes a moment before the pid file is written and another starting instance can check this. In /etc/rc.start_packages the Asterisk packages gets started 2 times: at first by calling start_service() and then by explicitly executing /usr/local/etc/rc.d/asterisk.sh. This happens so fast that two instances are typically running, which may cause a couple of problems subsequently.</p>
<p dir="auto">A simple fix is to add the statement<code>sleep(1);</code>just before the statement```<br />
$shell = @popen("/bin/sh", "w");</p>
<pre><code>The second instance will then not start. A better fix is probably fixing the Asterisk package by renaming the rc-file to asterisk instead naming it asterisk.sh.</code></pre>
]]></description><link>https://forum.netgate.com/post/585516</link><guid isPermaLink="true">https://forum.netgate.com/post/585516</guid><dc:creator><![CDATA[Fesoj]]></dc:creator><pubDate>Sat, 21 Nov 2015 17:23:05 GMT</pubDate></item></channel></rss>