[Freeswitch-users] xml_curl for directory with verto

Rick Jarvis rick at magicmail.mooo.com
Thu May 17 16:14:03 UTC 2018


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"
	}
}]

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


More information about the FreeSWITCH-users mailing list