[Spce-user] Updating subscriber with API Rest

Javier Valencia jv at voiper.es
Wed Oct 4 07:16:27 EDT 2017


Hi there!

I'm using SIPProviderCE 3.8.10 and I'm updating successfully a 
subscriber with the API, but this update create a unwanted new contact 
(with empty fields values) for the customer.

Staring from: *Contact id**: 6 -> **Customer: 2**-> Subscriber id**: 1*

Contacts before update:

Contacts after update:

New contact details:

		

Log data in SIPProviderCE:

Oct  4 12:51:50 sw-3-8-10 ngcp-panel: DEBUG: lang set by browser or 
config: i_default
Oct  4 12:51:50 sw-3-8-10 ngcp-panel: DEBUG: ++++++ Root::auto 
unauthenticated API request
Oct  4 12:51:50 sw-3-8-10 ngcp-panel: DEBUG: ++++++ Root::auto API 
request with client auth sn '1507107264'
Oct  4 12:51:50 sw-3-8-10 ngcp-panel: DEBUG: ++++++ admin 
'administrator' authenticated via api_admin_cert

==> /var/log/ngcp/api.log <==
Oct  4 12:51:50 sw-3-8-10 ngcp-panel: INFO: IP=192.168.1.240 
CALLED=API[GET]/api/subscribers/1 TX=14EA587B00388CE0 USER=administrator 
DATA={} MSG="" LOG=""
Oct  4 12:51:50 sw-3-8-10 ngcp-panel: INFO: IP=192.168.1.240 
CALLED=API[GET 200]/api/subscribers/1 TX=14EA587B00388CE0 
USER=administrator DATA={} MSG="" LOG="{ "_links" : { "collection" : { 
"href" : "/api/subscribers/" }, "curies" : { "href" : 
"http://purl.org/sipwise/ngcp-api/#rel-{rel}", "name" : "ngcp", 
"templated" : true }, "ngcp:callforwards" : { "href" : 
"/api/callforwards/1" }, "ngcp:calls" : { "href" : 
"/api/calls/?subscriber_id=1" }, "ngcp:customers" : { "href" : 
"/api/customers/2" }, "ngcp:domains" : { "href" : "/api/domains/1" }, 
"ngcp:reminders" : { "href" : "/api/reminders/?subscriber_id=1" }, 
"ngcp:subscriberpreferences" : { "href" : "/api/subscriberpreferences/1" 
}, "ngcp:subscriberregistrations" : { "href" : 
"/api/subscriberregistrations/?subscriber_id=1" }, 
"ngcp:voicemailsettings" : { "href" : "/api/voicemailsettings/1" }, 
"profile" : { "href" : "http://purl.org/sipwise/ngcp-api/" }, *"self" : 
{ "href" : "/api/subscribers/1" } }*, "administrative" : false, 
"alias_numbers" : [ { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, { 
"ac" : "XXX", "cc" : "XX", "sn" : "XXXXX" }, { "ac" : "XXX", "cc" : 
"XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, 
{ "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : 
"XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, 
{ "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" } ], "create_timestamp" : 
"2017-10-04T11:04:58+00:00", *"customer_id" : 2*, "domain" : 
"dev.sip.XXX.com", "domain_id" : 1, "email" : null, "external_id" : 
"XXXXXX", "id" : 1, "modify_timestamp" : "2017-10-04T12:48:41+00:00", 
"password" : "XXXXXXXXX", "primary_number" : { "ac" : "XXX", "cc" : 
"XX", "sn" : "XXXXXX" }, "profile_id" : null, "profile_set_id" : null, 
"status" : "active", "username" : "XXXXXXXXX", "uuid" : 
"3dc68727-b517-4fb1-ac53-46a4979ab4cb", "webpassword" : null, 
"webusername" : "XXXXXXXXX"}"

==> /var/log/ngcp/panel-debug.log <==
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: DEBUG: lang set by browser or 
config: i_default
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: DEBUG: ++++++ Root::auto 
unauthenticated API request
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: DEBUG: ++++++ Root::auto API 
request with client auth sn '1507107264'
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: DEBUG: ++++++ admin 
'administrator' authenticated via api_admin_cert

==> /var/log/ngcp/api.log <==
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: INFO: IP=192.168.1.240 
CALLED=API[PUT]/api/subscribers/1 TX=14EA587B08F15E70 USER=administrator 
DATA={} MSG="" 
LOG="{"administrative":false,"alias_numbers":[{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"},{"cc":"XX","ac":"XXX","sn":"XXXXXX"}],"create_timestamp":"2017-10-04T11:04:58+0000",*"customer_id":2*,"domain":"dev.sip.XXXXXX.com","domain_id":1,"email":"jv at voiper.es","external_id":"XXXXXX",*"id":1*,"modify_timestamp":"2017-10-04T12:48:41+0000","password":"XXXXXXXXXXXX","primary_number":{"cc":"XX","ac":"XXX","sn":"XXXXXX"},"profile_id":null,"profile_set_id":null,"status":"active","username":"XXXXXXXXXXXX","uuid":"3dc68727-b517-4fb1-ac53-46a4979ab4cb","webpassword":null,"webusername":"XXXXXXXXXXXX"}"

==> /var/log/ngcp/panel-debug.log <==
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: DEBUG: Old and new groups are the same

==> /var/log/ngcp/api.log <==
Oct  4 12:51:51 sw-3-8-10 ngcp-panel: INFO: IP=192.168.1.240 
CALLED=API[PUT 200]/api/subscribers/1 TX=14EA587B08F15E70 
USER=administrator DATA={} MSG="" LOG="{ "_links" : { "collection" : { 
"href" : "/api/subscribers/" }, "curies" : { "href" : 
"http://purl.org/sipwise/ngcp-api/#rel-{rel}", "name" : "ngcp", 
"templated" : true }, "ngcp:callforwards" : { "href" : 
"/api/callforwards/1" }, "ngcp:calls" : { "href" : 
"/api/calls/?subscriber_id=1" }, "ngcp:customers" : { "href" : 
"/api/customers/2" }, "ngcp:domains" : { "href" : "/api/domains/1" }, 
"ngcp:reminders" : { "href" : "/api/reminders/?subscriber_id=1" }, 
"ngcp:subscriberpreferences" : { "href" : "/api/subscriberpreferences/1" 
}, "ngcp:subscriberregistrations" : { "href" : 
"/api/subscriberregistrations/?subscriber_id=1" }, 
"ngcp:voicemailsettings" : { "href" : "/api/voicemailsettings/1" }, 
"profile" : { "href" : "http://purl.org/sipwise/ngcp-api/" }, *"self" : 
{ "href" : "/api/subscribers/1" } }*, "administrative" : false, 
"alias_numbers" : [ { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, { 
"ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : 
"XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, 
{ "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : 
"XX", "sn" : "XXXXXX" }, { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, 
{ "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" } ], "create_timestamp" : 
"2017-10-04T11:04:58+00:00", *"customer_id" : 2*, "domain" : 
"dev.sip.XXXXXX.com", "domain_id" : 1, "email" : "jv at voiper.es", 
"external_id" : "XXXXXX", "id" : 1, "modify_timestamp" : 
"2017-10-04T12:51:51+00:00", "password" : "XXXXXXXXXXXX", 
"primary_number" : { "ac" : "XXX", "cc" : "XX", "sn" : "XXXXXX" }, 
"profile_id" : null, "profile_set_id" : null, "status" : "active", 
"username" : "XXXXXXXXXXXX", "uuid" : 
"3dc68727-b517-4fb1-ac53-46a4979ab4cb", "webpassword" : null, 
"webusername" : "XXXXXXXXX"}"

Kind regards, Javier Valencia.


-- 
Logo <http://www.voiper.es/>

	
Javier Valencia | CTO
Centro de Negocios Martín Buendía
Camino de las Cañadas, nº 1C, Portal 1, 2ºG
29649 Mijas (Málaga)

# 	951562080 (T) <tel:951562080> | 687486759 (M) <tel:687486759>
# 	www.voiper.es <http://www.voiper.es/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ageioklfogkgjlbe.png
Type: image/png
Size: 18343 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lakaonnjcppiakph.png
Type: image/png
Size: 24437 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jlfgcnhomgljgmfi.png
Type: image/png
Size: 25805 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hhjgpiefjilcflki.png
Type: image/png
Size: 23230 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: njfpnghfjgimihak.png
Type: image/png
Size: 29189 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndcegjdijclleglb.png
Type: image/png
Size: 7800 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emjnaloafbmphcle.png
Type: image/png
Size: 334 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noedmjmldohpmhen.png
Type: image/png
Size: 453 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20171004/99312388/attachment-0007.png>


More information about the Spce-user mailing list