[Freeswitch-users] External authentication

Rick Jarvis rick at magicmail.mooo.com
Wed May 16 13:47:21 UTC 2018


Ok, so I’ve stripped everything out to a very basic verto setup.

 - I *am* seeing the POST requests for a ‘normal’ sip authentication attempt, eg from an ip phone.
 - I am not however seeing any POST requests for the verto auth request

I am seeing a ‘reconnect’, even after restarting FS, so I’m wondering if that’s part of my problem - do the sessions persist after a restart? How would I force a new session?

Still getting ‘authentication required’ and ‘missing or improper credentials’ Debug & js below:

// fs output

2018-05-16 14:38:03.656190 [DEBUG] mod_verto.c:4139 x.x.x.x:65349 Client Connect from x.x.x.x:65349 accepted
2018-05-16 14:38:03.656190 [DEBUG] mod_verto.c:1992 x.x.x.x:65349 Starting client thread.
2018-05-16 14:38:03.696189 [ALERT] mod_verto.c:1384 READ x.x.x.x:65349 [{
	"jsonrpc":	"2.0",
	"method":	"login",
	"params":	{
		"sessid":	"c674980b-27ca-4c3e-37d1-3421736b990f"
	},
	"id":	2
}]
2018-05-16 14:38:03.696189 [DEBUG] mod_verto.c:1281 x.x.x.x:65349 re-connecting session c674980b-27ca-4c3e-37d1-3421736b990f
2018-05-16 14:38:03.696189 [ALERT] mod_verto.c:604 WRITE x.x.x.x:65349 [{
	"jsonrpc":	"2.0",
	"id":	2,
	"error":	{
		"code":	-32000,
		"message":	"Authentication Required"
	}
}]
2018-05-16 14:38:03.696189 [ALERT] mod_verto.c:1384 READ x.x.x.x:65349 [{
	"jsonrpc":	"2.0",
	"method":	"login",
	"params":	{
		"sessid":	"c674980b-27ca-4c3e-37d1-3421736b990f"
	},
	"id":	1
}]
2018-05-16 14:38:03.696189 [ALERT] mod_verto.c:604 WRITE x.x.x.x:65349 [{
	"jsonrpc":	"2.0",
	"id":	1,
	"error":	{
		"code":	-32000,
		"message":	"Authentication Required"
	}
}]
2018-05-16 14:38:03.696189 [ALERT] mod_verto.c:1384 READ x.x.x.x:65349 [{
	"jsonrpc":	"2.0",
	"method":	"login",
	"params":	{
		"login":	“203 at xxxx",
		"passwd":	"password",
		"loginParams":	{
		},
		"userVariables":	{
		},
		"sessid":	"c674980b-27ca-4c3e-37d1-3421736b990f"
	},
	"id":	3
}]
2018-05-16 14:38:03.696189 [ALERT] mod_verto.c:604 WRITE x.x.x.x:65349 [{
	"jsonrpc":	"2.0",
	"id":	3,
	"error":	{
		"code":	-32001,
		"message":	"Missing or improper credentials"
	}
}]


//verto_client.js

var vertoHandle, vertoCallbacks;

vertoCallbacks = {
  onWSLogin: onWSLogin,
  onWSClose: onWSClose,
  onDialogState: onDialogState
};


$(document).ready(function() {
    $.verto.init({}, bootstrap);
});

function onWSLogin(verto, success) {
  console.log('onWSLogin', success);
};

function onWSClose(verto, success) {
  console.log('onWSClose', success);
};

function onDialogState(d) {
  console.log ("XXXX DIALOG: ", d.state.name);
};

function bootstrap(status) {
    console.log('bootstrap');
    vertoHandle = new jQuery.verto({
        login: ‘203 at xxxx',
        passwd: 'password',
        socketUrl: 'wss://redio.siplink.uk:8082',
        ringFile: 'sounds/bell_ring2.wav',
        iceServers: [
          {
            url: 'stun:stun.freeswitch.org',
          },
        ],
        deviceParams: {
          useMic: 'any',
          useSpeak: 'any',
        },
        tag: "video-container"
    }, vertoCallbacks);
};





> On 15 May 2018, at 21:22, Michael Jerris <mike at jerris.com> wrote:
> 
> if you have it not hitting curl at all (and you have xml_curl debug_on enabled) and you see nothing, it sounds like the connection is failing before it even gets that far.  Its hard to tell why with tiny snippets of information cherry picked out like below.  Something in verto settings i would suspect.  You can try to enable verto debug to get some more info possibly.
> 
> 
>> On May 15, 2018, at 4:17 PM, Rick Jarvis <rick at magicmail.mooo.com <mailto:rick at magicmail.mooo.com>> wrote:
>> 
>> What am I looking for exactly? I am seeing:
>> 
>> mod_verto.c:1876 BAD READ -1000
>> 
>> …which sounds relevant. But I’m not seeing anything on my app receiving the request (I’ve got that simply console logging anything that hits the URL, and nothing happens when doing the Verto login…)
>> 
>>  
>>> On 15 May 2018, at 20:40, Michael Jerris <mike at jerris.com <mailto:mike at jerris.com>> wrote:
>>> 
>>> it certainly can do curl directory lookups with verto.  if you do the api command “xml_curl debug_on” it will provide more details of the requests and responses, it looks like you are not handling the request in your cgi the way we expect.
>>> 
>>>> On May 15, 2018, at 2:44 PM, Rick Jarvis <rick at magicmail.mooo.com <mailto:rick at magicmail.mooo.com>> wrote:
>>>> 
>>>> Thanks José,
>>>> 
>>>> It’s the XML_CURL binding bit that’s relevant to me then, as the server it’s querying is something we've written already.
>>>> 
>>>>   <bindings>
>>>>     <binding name="directory">
>>>>       <param name="gateway-url" value="https://server/xmlcurl <https://server/xmlcurl>" bindings="directory"/>
>>>>     </binding>
>>>>   </bindings>
>>>> 
>>>> So I’m seeing posts come into my server from general stuff, but nothing when I try and authenticate with it (via Verto). 
>>>> 
>>>> On the FS console I’m seeing:
>>>> 
>>>> 	"jsonrpc":	"2.0",
>>>> 	"id":	1,
>>>> 	"error":	{
>>>> 		"code":	-32000,
>>>> 		"message":	"Authentication Required"
>>>> 	}
>>>> 
>>>> So I guess either it’s not working, or maybe FS doesn’t support Curl directories for Verto?
>>> 
>>> _
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180516/cc4eaa0b/attachment-0001.html>


More information about the FreeSWITCH-users mailing list