FreeSwitch Error: "username param is REQUIRED!"
Hi! I'm trying out FreeSwitch with sample configuration at sip_profile/external/example.xml. I removed few required line from there and issued command: sofia profile external restart reloadxml Its giving me the following error: [ERR] sofia.c:2606 ERROR: username param is REQUIRED!
From the source code I see at the specified line checks if "username" is null, if so we get this error. How come I get this error while I see a string is there in the configuration file?
-- Sincerely, Sazzad Bin Kamal
Long story short: just put in a dummy value if you are not using SIP authentication for this gateway. -MC On Thu, Aug 2, 2012 at 11:28 AM, Sazzad <sazzadbinkamal@gmail.com> wrote:
Hi!
I'm trying out FreeSwitch with sample configuration at sip_profile/external/example.xml. I removed few required line from there and issued command:
sofia profile external restart reloadxml
Its giving me the following error:
[ERR] sofia.c:2606 ERROR: username param is REQUIRED!
From the source code I see at the specified line checks if "username" is null, if so we get this error. How come I get this error while I see a string is there in the configuration file?
-- Sincerely, Sazzad Bin Kamal
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Hi Michael, Thank you very much for your reply. I've tried out that as well. Same result. Just one simple question. Can you tell me whether this error message is an indication of failure? Or I can safely ignore it? I'm currently testing on my local machine after I tried (and failed) on a live server. -- Sincerely, Sazzad Bin Kamal
If you're still getting the error after putting in a password then something isn't configured correctly. Paste your entire gateway xml file to pastebin.freeswitch.org and the gang here will offer you some suggestions. -MC On Thu, Aug 2, 2012 at 12:26 PM, Sazzad <sazzadbinkamal@gmail.com> wrote:
Hi Michael,
Thank you very much for your reply. I've tried out that as well. Same result. Just one simple question. Can you tell me whether this error message is an indication of failure? Or I can safely ignore it? I'm currently testing on my local machine after I tried (and failed) on a live server.
-- Sincerely, Sazzad Bin Kamal
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
On Fri, Aug 3, 2012 at 1:42 AM, Michael Collins <msc@freeswitch.org> wrote:
If you're still getting the error after putting in a password then something isn't configured correctly. Paste your entire gateway xml file to pastebin.freeswitch.org and the gang here will offer you some suggestions.
You guys rock. :D Actually the file <http://pastebin.freeswitch.org/19630> is pretty bare-bone. I'm trying to use Alcazar Networks<http://www.alcazarnetworks.com/>. I get the same error at my server which is *registered* with Alcazar and on my local machine which is not registered at all. -- Sincerely, Sazzad Bin Kamal
Hi, The people at there told not to use authentication but to use bridge command. I'm going to try it. Will dig the issue later. :D -- Sincerely, Sazzad Bin Kamal
On 02/08/12 20:59, Sazzad wrote:
Actually the file <http://pastebin.freeswitch.org/19630> is pretty bare-bone. I'm trying to use Alcazar Networks <http://www.alcazarnetworks.com/>. I get the same error at my server which is /registered/ with Alcazar and on my local machine which is not registered at all.
You don't have a closing </gateway> tag in that example. Not sure if that is your actual issue though. Have you reloaded the configuration/rescaned the sofia gateways since changing the file? Could you give us an example of the console log showing the fault, please? Regards,
You don't have a closing </gateway> tag in that example. Not sure if that is your actual issue though.
Umm, well that might be missing there, its not causing the problem. I've tried several approaches before posting. The only left is to debug. Like printing that "profile.username" string and if its really null or where did it get lost etc. Have you reloaded the configuration/rescaned the sofia gateways since
changing the file? Could you give us an example of the console log showing the fault, please?
Yeah did that. This is the exact copy-paste of the relevant output: 2012-08-03 01:02:19.768103 [NOTICE] sofia.c:2168 Waiting for worker thread
2012-08-03 01:02:19.768103 [NOTICE] sofia_glue.c:5574 deleted gateway example.com from profile external 2012-08-03 01:02:19.768103 [NOTICE] sofia.c:4782 Started Profile external [sofia_reg_external] 2012-08-03 01:02:19.788155 [ERR] sofia.c:2606 ERROR: username param is REQUIRED! 2012-08-03 01:02:19.788155 [NOTICE] sofia_reg.c:2904 Added gateway ' example.com' to profile 'external'
-- Sincerely, Sazzad Bin Kamal
On 02/08/12 21:32, Sazzad wrote:
This is the exact copy-paste of the relevant output:
2012-08-03 01:02:19.768103 [NOTICE] sofia.c:2168 Waiting for worker thread 2012-08-03 01:02:19.768103 [NOTICE] sofia_glue.c:5574 deleted gateway example.com <http://example.com> from profile external 2012-08-03 01:02:19.768103 [NOTICE] sofia.c:4782 Started Profile external [sofia_reg_external] 2012-08-03 01:02:19.788155 [ERR] sofia.c:2606 ERROR: username param is REQUIRED! 2012-08-03 01:02:19.788155 [NOTICE] sofia_reg.c:2904 Added gateway 'example.com <http://example.com>' to profile 'external'
This is odd then. I don't know if the issue is occuring where you think it is. Do you have any other gateways setup in profile external? Can you post the output of 'sofia status' with minimal changes, please? For reference, the following definitely works for a provider which does not require username/password (i.e. IP authentication only), I've only obfuscated the actual IP address from the realm in this example: <include> <gateway name="provider"> <param name="username" value="not-used"/> <param name="password" value="not-used"/> <param name="realm" value="192.0.2.1"/> <param name="register" value="false"/> <param name="caller-id-in-from" value="true"/> </gateway> </include> Regards,
This is odd then.
(@_@)
I don't know if the issue is occuring where you think it is. Do you have any other gateways setup in profile external?
Nope!
Can you post the output of 'sofia status' with minimal changes, please?
Sure, I can. Though I don't think it'll be of much help to you. Here<http://pastebin.freeswitch.org/19631>it is.
For reference, the following definitely works for a provider which does not require username/password (i.e. IP authentication only), I've only obfuscated the actual IP address from the realm in this example:
<include> <gateway name="provider"> <param name="username" value="not-used"/> <param name="password" value="not-used"/> <param name="realm" value="192.0.2.1"/> <param name="register" value="false"/> <param name="caller-id-in-from" value="true"/> </gateway> </include>
I see. Hmm, but Alcazar support adviced to use Freeswitch bridge command to point to ip. Probably it is same as Asterisk bridge()?! And it definitely is not seeming like a cli command rather an application to be used in dialplan, I guess. By the way, I registered Alcazar for outbound termination. May be this context may help you find out some reason: I'm trying to use Newfies <http://newfies-dialer.org> dialer. Plivo<http://plivo.com>has been installed on the server, so we'll not be using their API (or sending request to their cloud server). After a fresh install I simply did the following according to Newfies doc: 1. copy-paste the sip_profile/external/example.com to alcazarnetworks.com 2. change relevant fields, EXACTLY same as you provided in the above example. EXCEPT "realm" and "caller-id-in-form" fields. I used real username and password provided by Alcazar by the way. 3. Run command : "sip profile external restart reloadxml" and got the error! 4. So I tried it on my local machine (which is not registered with Alcazar) and got the same error! That's all I can tell. -- Sincerely, Sazzad Bin Kamal
I don't see anywhere where this " alcazarnetworks-outbound " gateway is even being loaded. Nor do I see where FS would figure out how to reach this alcaz-outbound realm. Are these being looked up from DNS? If not, then how do you propose sofia finds the IP to contact this gateway on? I think with the bridge command you might have to still tell it the IP. If you tell it the IP, then why is the definition of the gateway needed if you're not registering. Haha sorry I'm not all that of an expert at FS either so maybe someone more knowledgeable can respond to this and help us both. I think what you need to run, as mentioned previously is fs@internal>sofia profile external gwlist up <-- this should show you the gateways that are loaded and ready (I think) if you don't see your alcazarnetworks-outbound gateway there, try running fs@internal>sofia profile external rescan reloadxml <-- this should rescan your gateways in the directory and you should see alcazarnetworks-outbound load up OR it should give you some error as to why it can't load it up. Also, don't forget to include the </gateway> in the config file. I'm surprised that this doesn't show up as an error in the console when you load it up. HTH aeg On Thu, Aug 2, 2012 at 5:22 PM, Sazzad <sazzadbinkamal@gmail.com> wrote:
This is odd then.
(@_@)
I don't know if the issue is occuring where you think it is. Do you have any other gateways setup in profile external?
Nope!
Can you post the output of 'sofia status' with minimal changes, please?
Sure, I can. Though I don't think it'll be of much help to you. Here<http://pastebin.freeswitch.org/19631>it is.
For reference, the following definitely works for a provider which does not require username/password (i.e. IP authentication only), I've only obfuscated the actual IP address from the realm in this example:
<include> <gateway name="provider"> <param name="username" value="not-used"/> <param name="password" value="not-used"/> <param name="realm" value="192.0.2.1"/> <param name="register" value="false"/> <param name="caller-id-in-from" value="true"/> </gateway> </include>
I see. Hmm, but Alcazar support adviced to use Freeswitch bridge command to point to ip. Probably it is same as Asterisk bridge()?! And it definitely is not seeming like a cli command rather an application to be used in dialplan, I guess. By the way, I registered Alcazar for outbound termination.
May be this context may help you find out some reason:
I'm trying to use Newfies <http://newfies-dialer.org> dialer. Plivo<http://plivo.com>has been installed on the server, so we'll not be using their API (or sending request to their cloud server).
After a fresh install I simply did the following according to Newfies doc:
1. copy-paste the sip_profile/external/example.com to alcazarnetworks.com 2. change relevant fields, EXACTLY same as you provided in the above example. EXCEPT "realm" and "caller-id-in-form" fields. I used real username and password provided by Alcazar by the way. 3. Run command : "sip profile external restart reloadxml" and got the error! 4. So I tried it on my local machine (which is not registered with Alcazar) and got the same error!
That's all I can tell.
-- Sincerely, Sazzad Bin Kamal
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Just put nothing or BS in the username and password fields for the gateway if you are using IP auth on the other side like with alcazar... If they don¹t 407 the gateway doesn¹t mind having the extra info there...also keep in mind to set the caller id in from field setting on the gateway On 8/2/12 5:58 PM, "A E G" <all.eforums@gmail.com> wrote:
I don't see anywhere where this " alcazarnetworks-outbound " gateway is even being loaded. Nor do I see where FS would figure out how to reach this alcaz-outbound realm. Are these being looked up from DNS? If not, then how do you propose sofia finds the IP to contact this gateway on? I think with the bridge command you might have to still tell it the IP. If you tell it the IP, then why is the definition of the gateway needed if you're not registering.
Haha sorry I'm not all that of an expert at FS either so maybe someone more knowledgeable can respond to this and help us both.
I think what you need to run, as mentioned previously is
fs@internal>sofia profile external gwlist up <-- this should show you the gateways that are loaded and ready (I think)
if you don't see your alcazarnetworks-outbound gateway there, try running
fs@internal>sofia profile external rescan reloadxml <-- this should rescan your gateways in the directory and you should see alcazarnetworks-outbound load up OR it should give you some error as to why it can't load it up. Also, don't forget to include the </gateway> in the config file. I'm surprised that this doesn't show up as an error in the console when you load it up.
HTH aeg
On Thu, Aug 2, 2012 at 5:22 PM, Sazzad <sazzadbinkamal@gmail.com> wrote:
This is odd then.
(@_@)
I don't know if the issue is occuring where you think it is. Do you have any other gateways setup in profile external?
Nope!
Can you post the output of 'sofia status' with minimal changes, please?
Sure, I can. Though I don't think it'll be of much help to you. Here <http://pastebin.freeswitch.org/19631> it is.
For reference, the following definitely works for a provider which does not require username/password (i.e. IP authentication only), I've only obfuscated the actual IP address from the realm in this example:
<include> <gateway name="provider"> <param name="username" value="not-used"/> <param name="password" value="not-used"/> <param name="realm" value="192.0.2.1"/> <param name="register" value="false"/> <param name="caller-id-in-from" value="true"/> </gateway> </include>
I see. Hmm, but Alcazar support adviced to use Freeswitch bridge command to point to ip. Probably it is same as Asterisk bridge()?! And it definitely is not seeming like a cli command rather an application to be used in dialplan, I guess. By the way, I registered Alcazar for outbound termination.
May be this context may help you find out some reason:
I'm trying to use Newfies <http://newfies-dialer.org> dialer. Plivo <http://plivo.com> has been installed on the server, so we'll not be using their API (or sending request to their cloud server).
After a fresh install I simply did the following according to Newfies doc:
1. copy-paste the sip_profile/external/example.com <http://example.com> to alcazarnetworks.com <http://alcazarnetworks.com> 2. change relevant fields, EXACTLY same as you provided in the above example. EXCEPT "realm" and "caller-id-in-form" fields. I used real username and password provided by Alcazar by the way. 3. Run command : "sip profile external restart reloadxml" and got the error! 4. So I tried it on my local machine (which is not registered with Alcazar) and got the same error!
That's all I can tell.
participants (5)
-
A E G
-
Ken Rice
-
Michael Collins
-
Paul Cupis
-
Sazzad