The problem is that your domain in your return is incorrect. It should say <domain name=“x.x.x.x”> as that is the domain of the user being looked up. Its not authing because you are not returning a user that matches the lookup.
On May 17, 2018, at 2:56 PM, Rick Jarvis <rick@magicmail.mooo.com> wrote:
{ hostname: 'verto', section: 'directory', tag_name: 'domain', key_name: 'name', key_value: ‘x.x.x.x', 'Event-Name': 'REQUEST_PARAMS', 'Core-UUID': '9a5477aa-ea0f-433f-9c27-007a99de8529', 'FreeSWITCH-Hostname': 'verto', 'FreeSWITCH-Switchname': 'verto', 'FreeSWITCH-IPv4': ‘x.x.x.x', 'FreeSWITCH-IPv6': '::1', 'Event-Date-Local': '2018-05-17 19:53:23', 'Event-Date-GMT': 'Thu, 17 May 2018 18:53:23 GMT', 'Event-Date-Timestamp': '1526583203902782', 'Event-Calling-File': 'mod_verto.c', 'Event-Calling-Function': 'check_auth', 'Event-Calling-Line-Number': '947', 'Event-Sequence': '1743', action: 'jsonrpc-authenticate', key: 'id', user: '203', domain: ‘x.x.x.x' }
On 17 May 2018, at 18:13, Michael Jerris <mike@jerris.com <mailto:mike@jerris.com>> wrote:
what params are you getting in the request?
On May 17, 2018, at 12:14 PM, Rick Jarvis <rick@magicmail.mooo.com <mailto:rick@magicmail.mooo.com>> wrote:
Ok I am now seeing post requests (small steps!), but cannot get an authentication success. Maybe something I’m misunderstanding (most likely!).
This is the XML I’m sending back to FS:
<document type="freeswitch/xml"> <section name="directory"> <domain name=“default"> <groups> <group name="default"> <users> <user id=“203"> <params> <param name="password" value="password"/> <param name="vm-password" value="982375982735"/> <param name="jsonrpc-allowed-methods" value="verto"/> <param name="jsonrpc-allowed-event-channels" value="demo,conference,presence"/> <param name="jsonrpc-allowed-jsapi" value="all"/> <param name="jsonrpc-allowed-fsapi" value="all"/> <param name="verto-context" value="default"/> <param name="verto-dialplan" value="XML"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="accountcode" value=“203"/> <variable name="user_context" value=“default"/> <variable name="effective_caller_id_name" value=“verto"/> <variable name="effective_caller_id_number" value=“203"/> <variable name="outbound_caller_id_name" value=“verto"/> <variable name="outbound_caller_id_number" value=“203"/> </variables> </user> </users> </group> </groups> </domain> </section> </document>
And this is what I’m getting on FS console (with xml_curl debug_on):
2018-05-17 17:09:34.902788 [DEBUG] mod_verto.c:1876 BAD READ -1000 2018-05-17 17:09:34.902788 [DEBUG] mod_verto.c:2019 x.x.x.x:49935 Ending client thread. 2018-05-17 17:09:34.902788 [DEBUG] mod_verto.c:2027 x.x.x.x:49935 Thread ended 2018-05-17 17:10:34.402793 [DEBUG] mod_verto.c:4139 x.x.x.x:50348 Client Connect from x.x.x.x:50348 accepted 2018-05-17 17:10:34.402793 [DEBUG] mod_verto.c:1992 x.x.x.x:50348 Starting client thread. 2018-05-17 17:10:34.482797 [ALERT] mod_verto.c:1384 READ x.x.x.x:50348 [{ "jsonrpc": "2.0", "method": "login", "params": { "sessid": "c674980b-27ca-4c3e-37d1-3421736b990f" }, "id": 2 }] 2018-05-17 17:10:34.482797 [DEBUG] mod_verto.c:1281 x.x.x.x:50348 re-connecting session c674980b-27ca-4c3e-37d1-3421736b990f 2018-05-17 17:10:34.482797 [ALERT] mod_verto.c:604 WRITE x.x.x.x:50348 [{ "jsonrpc": "2.0", "id": 2, "error": { "code": -32000, "message": "Authentication Required" } }] 2018-05-17 17:10:34.482797 [ALERT] mod_verto.c:1384 READ x.x.x.x:50348 [{ "jsonrpc": "2.0", "method": "login", "params": { "sessid": "c674980b-27ca-4c3e-37d1-3421736b990f" }, "id": 1 }] 2018-05-17 17:10:34.482797 [ALERT] mod_verto.c:604 WRITE x.x.x.x:50348 [{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32000, "message": "Authentication Required" } }] 2018-05-17 17:10:34.482797 [ALERT] mod_verto.c:1384 READ x.x.x.x:50348 [{ "jsonrpc": "2.0", "method": "login", "params": { "login": "203", "passwd": "password", "loginParams": { }, "userVariables": { }, "sessid": "c674980b-27ca-4c3e-37d1-3421736b990f" }, "id": 3 }] 2018-05-17 17:10:34.542787 [ALERT] mod_verto.c:604 WRITE x.x.x.x:50348 [{ "jsonrpc": "2.0", "id": 3, "error": { "code": -32001, "message": "Login Incorrect" } }]