<p dir="ltr">I saw the profiles binding to TCP 5080 and 5060 (UDP too).</p>
<div class="gmail_quote">On Sep 10, 2015 1:15 AM, "Support" <<a href="mailto:support@directvoip.co.uk">support@directvoip.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
Stanislav,<div><br></div><div>Great progress you have made there, I returned to Debian myself but I believe quite a few smartos guys are running older versions.</div><div><br></div><div>I'll spin up a smartos box and see if master resolves the issue that was the killer for me: <a href="https://freeswitch.org/jira/browse/FS-7991" target="_blank">https://freeswitch.org/jira/browse/FS-7991</a></div><div><br></div><div>Sip handsets had no problem with TCP but it just wouldn't send through a gateway using TCP.</div><div><br></div><div>Thanks for everything so far.</div><div><br></div><div>Regards</div><div>Darren<br><blockquote style="padding-left:5px;margin-left:5px;border-left:#0000ff 2px solid;margin-right:0px"><hr><b>From:</b> Stanislav Sinyagin [mailto:<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>]<br><b>To:</b> FreeSWITCH Users Help [mailto:<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>]<br><b>Sent:</b> Wed, 09 Sep 2015 23:57:00 +0000<br><b>Subject:</b> Re: [Freeswitch-users] Compiling under SmartOS<br><br>My patches are now in master, so FreeSWITCH can be compiled under any<br>
of Solaris derivatives.<br>
<br>
The -u option will not work in current FreeSWITCH on any of Solaris<br>
derivatives, regardless if it's in a zone or not: the -u option causes<br>
it to execute setuid() to switch to the unprivileged user. But the<br>
problem is, that setuid() sets the effective set of privileges to<br>
"basic", and "proc_clock_highres" is not included, even that it is<br>
allowed for the process.<br>
<br>
This piece illustrates this behavior:<br>
<br>
[<a href="mailto:root@fs01" target="_blank">root@fs01</a> ~]# perl -e 'use POSIX; setuid(1000); system("ppriv \$\$")'<br>
4079: ppriv 4079<br>
flags = <none><br>
E: basic<br>
I: basic<br>
P: basic<br>
L: basic,contract_event,contract_identity,contract_observer,dtrace_proc,dtrace_user,file_chown,file_chown_self,file_dac_execute,file_dac_read,file_dac_search,file_dac_write,file_owner,file_setid,ipc_dac_read,ipc_dac_write,ipc_owner,net_bindmlp,net_icmpaccess,net_mac_aware,net_observability,net_privaddr,net_rawaccess,proc_audit,proc_chroot,proc_clock_highres,proc_lock_memory,proc_owner,proc_prioup,proc_setid,proc_taskid,sys_acct,sys_admin,sys_audit,sys_fs_import,sys_ip_config,sys_iptun_config,sys_mount,sys_nfs,sys_ppp_config,sys_resource<br>
<br>
<br>
So, switch_core.c needs to be modified to utilize setpflags() and<br>
setppriv() if we are under Solaris, and assign "proc_clock_highres" to<br>
the process before the timer is initialized. I will propose the patch<br>
within a month or so.<br>
<br>
FreeSWITCH runs fine as root.<br>
<br>
<br>
<br>
<br>
<br>
On Tue, Sep 8, 2015 at 11:54 PM, Stanislav Sinyagin <<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>> wrote:<br>
> Darren,<br>
><br>
> if the zone has the proc_clock_highres privilege, you can assign it to<br>
> the freeswitch user:<br>
> usermod -K defaultpriv=basic,proc_clock_highres frsw<br>
><br>
> after that, under "su - frsw", FreeSWITCH can start.<br>
><br>
> But launching it as root with "-u frsw -g frsw" causes the same<br>
> coredump, as timerfd is unavailable for some reason. This needs<br>
> further investigation.<br>
><br>
> Also inside a zone, -rp does not have any effect on the process<br>
> priority, because this needs another privilege: PRIV_PROC_PRIOUP or<br>
> PRIV_PROC_PRIOCNTL (see privileges(5)).<br>
><br>
> So, there are still obstacles, but we're getting there slowly. But it<br>
> looks like you anyway have to have administrative access to the global<br>
> zone in order to run FreeSWITCH in a SmartOS zone. So, hosting it at<br>
> Joyent doesn't look realistic. Still, it's a very attractive platform<br>
> because of its lightweight zones and nice network performance and<br>
> built-in ZFS. Soon I will have a test physical server with SmartOS in<br>
> my lab, and I can let the interested people access it and test or play<br>
> around.<br>
><br>
> cheers,<br>
> stanislav<br>
><br>
><br>
><br>
><br>
><br>
> On Tue, Sep 8, 2015 at 6:59 PM, Support <<a href="mailto:support@directvoip.co.uk" target="_blank">support@directvoip.co.uk</a>> wrote:<br>
>> Stanislav,<br>
>><br>
>> Yes I did use that to get it going but then found that only worked as root.<br>
>><br>
>> Also, I know for myself, who was in control of the global zone, that this<br>
>> was a workaround but it was quickly pointed out to me by community members<br>
>> that this is just a workaround as those just using for example Joyent cloud<br>
>> or any zone other than on their own server would probably never be given<br>
>> access to the high res clock.<br>
>><br>
>> Regards<br>
>> Darren<br>
>><br>
>> ________________________________<br>
>> From: Stanislav Sinyagin [mailto:<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>]<br>
>> To: FreeSWITCH Users Help [mailto:<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>]<br>
>> Sent: Tue, 08 Sep 2015 16:49:01 +0000<br>
>><br>
>> Subject: Re: [Freeswitch-users] Compiling under SmartOS<br>
>><br>
>> phew, it started finally.<br>
>><br>
>> The correct string is "limit_priv": "default,proc_clock_highres"<br>
>><br>
>> After vmadm update, you need to reboot the zone, in order for new<br>
>> permissions to propagate to its processes.<br>
>><br>
>><br>
>><br>
>><br>
>> On Tue, Sep 8, 2015 at 5:38 PM, Stanislav Sinyagin <<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>><br>
>> wrote:<br>
>>> no, my bad, it's still failing on the timer. I'll spend some time on<br>
>>> it. Feel free to contact me directly on skype or google hangouts or<br>
>>> telegram<br>
>>><br>
>>> On Tue, Sep 8, 2015 at 5:27 PM, Stanislav Sinyagin <<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>><br>
>>> wrote:<br>
>>>> actually the answer about the timer was given in that same chat where<br>
>>>> you took part:<br>
>>>> <a href="http://echelog.com/logs/browse/smartos/1438293600" target="_blank">http://echelog.com/logs/browse/smartos/1438293600</a><br>
>>>><br>
>>>> I added the following line to the VM manifest json, and then did "vmadm<br>
>>>> update":<br>
>>>><br>
>>>> "limit_priv": "default,-proc_clock_highres"<br>
>>>><br>
>>>> Now it doesn't complain about the timer. But the master branch still<br>
>>>> coredumps for some other reason :)<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Tue, Sep 8, 2015 at 3:42 PM, Support <<a href="mailto:support@directvoip.co.uk" target="_blank">support@directvoip.co.uk</a>> wrote:<br>
>>>>> Stanislav,<br>
>>>>><br>
>>>>> I cannot help with this, my skills don't reach that far but I can point<br>
>>>>> you<br>
>>>>> in the right direction.<br>
>>>>><br>
>>>>> I had the same problem and it seems to be related to something called<br>
>>>>> timerfd. Using the ppriv command you can see freeswitch is wanting<br>
>>>>> access to<br>
>>>>> the high res clock, something not available to smartos zones with the<br>
>>>>> default privileges.<br>
>>>>><br>
>>>>> I did manage to mess with the smartos privileges and get it to run at<br>
>>>>> one<br>
>>>>> time but it was only when running as root.<br>
>>>>><br>
>>>>> If you actually used an older version of smartos, I think the one I used<br>
>>>>> is<br>
>>>>> dated around january this year, then it will compile fine and use some<br>
>>>>> sort<br>
>>>>> of other timing method.<br>
>>>>><br>
>>>>> This timerfd thing, thing relates to freeswitch finding a file called<br>
>>>>> timerfd.h that didn't appear in smartos zones until about march this<br>
>>>>> year,<br>
>>>>> something to do with lx brand I think.<br>
>>>>><br>
>>>>> I have just looked and the smartos version that will compile is<br>
>>>>> 20150108T111855Z, obviously it would be better on the newer.<br>
>>>>><br>
>>>>> Compiling on the above smartos version and then running it on newer is<br>
>>>>> no<br>
>>>>> problem which is what I ended up doing.<br>
>>>>><br>
>>>>> Hope this helps<br>
>>>>><br>
>>>>> Regards<br>
>>>>> Darren<br>
>>>>><br>
>>>>> ________________________________<br>
>>>>> From: Stanislav Sinyagin [mailto:<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>]<br>
>>>>> To: FreeSWITCH Users Help [mailto:<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>]<br>
>>>>> Sent: Tue, 08 Sep 2015 07:55:37 +0000<br>
>>>>> Subject: Re: [Freeswitch-users] Compiling under SmartOS<br>
>>>>><br>
>>>>><br>
>>>>> See the update at <a href="https://freeswitch.org/jira/browse/FS-7967" target="_blank">https://freeswitch.org/jira/browse/FS-7967</a><br>
>>>>><br>
>>>>> I fixed the compilation problems, and now there's a runtime issue.<br>
>>>>><br>
>>>>> On Mon, Aug 17, 2015 at 10:40 AM, Stanislav Sinyagin<br>
>>>>> <<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>> wrote:<br>
>>>>>> I see there are some people on the list, working with SmartOS.<br>
>>>>>><br>
>>>>>> The current master fails to compile:<br>
>>>>>> <a href="https://freeswitch.org/jira/browse/FS-7967" target="_blank">https://freeswitch.org/jira/browse/FS-7967</a><br>
>>>>>><br>
>>>>>> Your input will be appreciated.<br>
>>>>>><br>
>>>>>> I just started looking around and getting the feeling what SmartOS is.<br>
>>>>>> I worked with Solaris quite a lot, but that was almost 10 years ago.<br>
>>>>><br>
>>>>><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>
>>>>> Official FreeSWITCH Sites<br>
>>>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>>>> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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>
>>>>><br>
>>>>><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>
>>>>> Official FreeSWITCH Sites<br>
>>>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>>>> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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>
>> _________________________________________________________________________<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>
>> Official FreeSWITCH Sites<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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>
>><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>
>> Official FreeSWITCH Sites<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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>
_________________________________________________________________________<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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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></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" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div>