[Spce-user] API - Method "POST/subscriberregistrations" sip:provider CE - 5.5.4

Marcos Gil mggcti at gmail.com
Mon Jun 11 02:40:24 EDT 2018


Hi,

This bug (TT#35954) is fixed in version 5.5.5 that tomorrow is released?

BR.

---------- Forwarded message ---------
From: Alex Lutay <alutay at sipwise.com>
Date: mar., 24 abr. 2018 a las 10:24
Subject: Re: [Spce-user] API - Method "POST/subscriberregistrations"
sip:provider CE - 5.5.4
To: <spce-user at lists.sipwise.com>


Hi,

Thank you for the excellent bug report!

I have reproduced it locally and reported internally as TT#35954
I hope it will be fixed in the following mr5.5 build(s).

P.S. As I can see, ngcp-panel is trying to generate email notification
if ignore_auth_realm is enabled and is trying to use some improperly
generated template path/name in this case.

So far location record should be inserted properly on this stage.

Thank you for the bug report here!

On 04/23/2018 03:57 AM, Marcos Gil wrote:
> 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
> <http://sip:LAB919999999@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
> <http://sip:LAB919999999@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
> <http://sip:LAB919999999@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
> <http://sip:LAB919999999@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
> <http://sip:LAB919999999@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
> <http://sip:LAB919999999@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
>
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user
>

-- 
Alex Lutay

_______________________________________________
Spce-user mailing list
Spce-user at lists.sipwise.com
https://lists.sipwise.com/listinfo/spce-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20180611/0778c03f/attachment.html>


More information about the Spce-user mailing list