[Spce-user] Using API for suscriber control
Andreas Granig
agranig at sipwise.com
Tue Nov 25 05:04:10 EST 2014
Hi,
On recent systems, do:
export APIUSER="youruser:yourpass"
echo '[{"op":"add", "path":"/lock", "value":2}]' | \
ngcp-api-patch
https://localhost:1443/api/subscriberpreferences/<your-subscriber-id>
Value 2 means outgoing locked. Actually the value should be "none",
"outgoing", "foreign", "incoming and outgoing" and "global", seems like
an inconsistency in the API which I'll open an internal ticket.
Hooray for REST API :)
Andreas
On 11/24/2014 08:54 PM, Pedro Guillem wrote:
> Hello guys
>
> I was wondering if there is a "single liner" or ngcp-* script to
> temporally enable or disable a suscriber?. I mean specifically to
> restrict outgoing calls.
>
> I do know there are some perl scripts for creating a new suscriber and
> even for "terminating" it, but not for temporally disabling a suscriber.
>
> If its easier to modify a table row to perform this, it's also a solution.
>
> Any ideas
> Pedro Guillem
>
>
>
>
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user
>
More information about the Spce-user
mailing list