[Spce-user] API - Method "POST/subscriberregistrations" sip:provider CE - 5.5.4
Marcos Gil
mggcti at gmail.com
Sun Apr 22 21:57:13 EDT 2018
Hello,
I have a issue with API - Method "POST/subscriberregistrations"
sip:provider CE - 5.5.4. When I configure parameter "ignore_auth_realm:
yes" (config.yml) I receive a response code 500 "HTTP/1.1 500 Internal
Server Error" but I see that it inserts the data into the table
kamailio.location with domain ="null".
Do I need to make any additional configuration?
Example 1: Error
ignore_auth_realm: yes
Example command:
curl -i -X POST -H 'Connection: close' -H 'Content-Type: application/json'
-k --user user:passwd '
https://192.168.11.48:1443/api/subscriberregistrations/' --data-binary
'{"contact" : "sip:LAB919999999 at 192.168.11.250:5034", "expires" :
"1970-01-01 01:00:00", "q" : 1, "subscriber_id" : 3}'
Response:
HTTP/1.1 500 Internal Server Error
Server: nginx
Date: Sun, 22 Apr 2018 23:14:41 GMT
Content-Type: application/json
Content-Length: 49
Connection: close
Set-Cookie: ngcp_panel_session=768e80baefd5c826c4c0d826bf77a2aafbdc9f26;
path=/; expires=Mon, 23-Apr-2018 00:14:40 GMT; HttpOnly
X-Catalyst: 5.90114
{"message":"Internal Server Error","code":"500"}
Api:
Apr 23 01:14:41 sp554 ngcp-panel: INFO: IP=192.168.11.250
CALLED=API[POST]/api/subscriberregistrations/ TX=1527E515EFA67A08 USER=user
DATA={} MSG="" LOG="{"contact" : "sip:LAB919999999 at 192.168.11.250:5034",
"expires" : "1970-01-01 01:00:00", "q" : 1, "subscriber_id" : 3}"
*Apr 23 01:14:41 sp554 ngcp-panel: ERROR: IP=192.168.11.250 CALLED=API[POST
200]/api/subscriberregistrations/ TX=1527E515EFA67A08 USER=user DATA={}
MSG="" LOG="Couldn't render template "api/subscriberregistrations/POST.tt:
file error - api/subscriberregistrations/POST.tt: not found""*
Apr 23 01:14:41 sp554 ngcp-panel: INFO: IP=192.168.11.250 CALLED=API[POST
500]/api/subscriberregistrations/ TX=1527E515EFA67A08 USER=user DATA={}
MSG="" LOG="{"message":"Internal Server Error","code":"500"}"
MYSQL:
id: 20
username: lab919999999sip
domain: NULL
contact: sip:LAB919999999 at 192.168.11.250:5034
received: NULL
path: <sip:127.0.0.1:5060;lr>
expires: 1970-01-01 01:00:00
q: 1.00
callid: dfjrewr12386fd6-343 at kamailio.mi
cseq: 1
last_modified: 1970-01-01 01:00:00
flags: 0
cflags: 0
user_agent: SIP Router MI Server
socket: NULL
methods: 0
ruid: ulcx-5add110a-26b0-1
reg_id: 0
instance: NULL
server_id: 0
connection_id: 0
keepalive: 0
partition: 34
--------------------------------------------------------------------------------------------------------
Example 2: OK
ignore_auth_realm: no
Example command:
curl -i -X POST -H 'Connection: close' -H 'Content-Type: application/json'
-k --user user:passwd '
https://192.168.11.48:1443/api/subscriberregistrations/' --data-binary
'{"contact" : "sip:LAB919999999 at 192.168.11.250:5034", "expires" :
"1970-01-01 01:00:00", "q" : 1, "subscriber_id" : 3}'
Response:
HTTP/1.1 201 Created
Server: nginx
Date: Sun, 22 Apr 2018 23:22:53 GMT
Content-Length: 0
Connection: close
Location: /api/subscriberregistrations/21
Set-Cookie: ngcp_panel_session=49b7a09a5529ad62d37720e11b62b036feaa68bd;
path=/; expires=Mon, 23-Apr-2018 00:22:52 GMT; HttpOnly
X-Catalyst: 5.90114
Strict-Transport-Security: max-age=15768000
Api:
Apr 23 01:22:53 sp554 ngcp-panel: INFO: IP=192.168.11.250
CALLED=API[POST]/api/subscriberregistrations/ TX=1527E5886C7D7AF0 USER=user
DATA={} MSG="" LOG="{"contact" : "sip:LAB919999999 at 192.168.11.250:5034",
"expires" : "1970-01-01 01:00:00", "q" : 1, "subscriber_id" : 3}"
Apr 23 01:22:53 sp554 ngcp-panel: INFO: IP=192.168.11.250 CALLED=API[POST
201]/api/subscriberregistrations/ TX=1527E5886C7D7AF0 USER=user DATA={}
MSG="" LOG=""
MYSQL
id: 21
username: lab919999999sip
domain: 192.168.11.48
contact: sip:LAB919999999 at 192.168.11.250:5034
received: NULL
path: <sip:127.0.0.1:5060;lr>
expires: 1970-01-01 01:00:00
q: 1.00
callid: dfjrewr12386fd6-343 at kamailio.mi
cseq: 1
last_modified: 1970-01-01 01:00:00
flags: 0
cflags: 0
user_agent: SIP Router MI Server
socket: NULL
methods: 0
ruid: ulcx-5add1936-454-1
reg_id: 0
instance: NULL
server_id: 0
connection_id: 0
keepalive: 0
partition: 58
Thanks a lot!
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20180423/c6a6b6ab/attachment.html>
More information about the Spce-user
mailing list