Hi Michush,
For onprem deployment you need to provision your FQDN of your edge server at the website https://pic.lync.com/
you need also configure additionally some settings in your onprem deployment:
https://technet.microsoft.com/en-us/library/dn705313.aspx
If it is in Skype for Business Online:
Go to Admin Center - Admin Centers - Skype for Business - Organization - External Communication - enable communication with public provider.
Greetings,
Erdem
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.