SIGN UP

Managing SIP Registration

Methods

Bind the SIP registration to the application/user or unbind the SIP registration from the application/user. You should specify the application_id or application_name if you specify the rule_name or user_id, or user_name. You should specify the sip_registration_id if you set bind=true. You can bind only one SIP registration to the user (the previous SIP registration will be auto unbound).

Parameters

  • Follow link for authentication parameter names and details.

  • sip_registration_id:

    number

    The registration ID

  • application_id:

    number

    The application ID which the SIP registration will be bound to. Could be used instead of the application_name parameter.

  • application_name:

    string

    The application name which the SIP registration will be bound to. Could be used instead of the application_id parameter.

  • rule_id:

    number

    The rule ID which the SIP registration will be bound to. Could be used instead of the rule_name parameter.

  • rule_name:

    string

    The rule name which the SIP registration will be bound to. Could be used instead of the rule_id parameter.

  • user_id:

    number

    The user ID which the SIP registration will be bound to. Could be used instead of the user_name parameter.

  • user_name:

    string

    The user name which the SIP registration will be bound to. Could be used instead of the user_id parameter.

  • bind:

    booleanDefaults to true

    Bind or unbind?

Returns

  • result:

    number

    1

Examples

request:

Bind SIP registration with id 1 to application with id 123.

https://api.voximplant.com/platform_api/BindSipRegistration/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&application_id=123&sip_registration_id=1&bind=true

Unbind the user with id 123 from the all SIP registrations.

https://api.voximplant.com/platform_api/BindSipRegistration/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&user_id=123&bind=false

response:

Success

{
    "result": 1
}

Create a new SIP registration. You should specify the application_id or application_name if you specify the rule_name or user_id, or user_name. You should set is_persistent=true if you specify the user_id or user_name. You can bind only one SIP registration to the user (the previous SIP registration will be auto unbound).

Parameters

  • Follow link for authentication parameter names and details.

  • sip_username:

    string

    The user name.

  • proxy:

    string

    The SIP proxy

  • auth_user:

    string

    The SIP authentications user

  • outbound_proxy:

    string

    The outbound SIP proxy

  • password:

    string

    The SIP password

  • is_persistent:

    booleanDefaults to true

    Is SIP registration persistent or on the user logon?

  • application_id:

    number

    The application ID which new SIP registration will be bound to. Could be used instead of the application_name parameter.

  • application_name:

    string

    The application name which new SIP registration will be bound to. Could be used instead of the application_id parameter.

  • rule_id:

    number

    The rule ID which new SIP registration will be bound to. Could be used instead of the rule_name parameter.

  • rule_name:

    string

    The rule name which new SIP registration will be bound to. Could be used instead of the rule_id parameter.

  • user_id:

    number

    The user ID which new SIP registration will be bound to. Could be used instead of the user_name parameter.

  • user_name:

    string

    The user name which new SIP registration will be bound to. Could be used instead of the user_id parameter.

Returns

  • result:

    number

    1

  • sip_registration_id:

    number

    The sip registration id.

  • The current account state.

Examples

request:

Create SIP registration.

https://api.voximplant.com/platform_api/CreateSipRegistration/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&sip_username=test&proxy=localhost

response:

Success

{
    "result": 1,
    "sip_registration_id": 1
}

Insufficient money to add a new SIP registration.

{
    "error": {
        "msg": "Insufficient money.",
        "code": 127,
        "details": {
            "required_money": 0.5
        }
    }
}

Delete SIP registration.

Parameters

  • Follow link for authentication parameter names and details.

  • sip_registration_id:

    number

    The registration ID

Returns

  • result:

    number

    1

Examples

request:

Delete SIP registration with id 1.

https://api.voximplant.com/platform_api?cmd=DeleteSipRegistration&account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&registration_id=1

response:

Success

{
    "result": 1
}

Get active SIP registrations.

Parameters

  • Follow link for authentication parameter names and details.

  • sip_registration_id:

    number

    The SIP registration ID.

  • sip_username:

    string

    The SIP user name to filter.

  • deactivated:

    boolean

    Set true to show the frozen SIP registrations only.

  • successful:

    boolean

    Set false to show the unsuccessful SIP registrations only.

  • is_persistent:

    boolean

    The persistent flag to filter.

  • application_id:

    string

    The application ID list separated by the ';' symbol to filter. Can be used instead of appliction_name.

  • application_name:

    string

    The application name list separated by the ';' symbol to filter. Can be used instead of appliction_id.

  • rule_id:

    string

    The rule ID list separated by the ';' symbol to filter. Can be used instead of rule_name.

  • rule_name:

    string

    The rule name list separated by the ';' symbol to filter. Can be used instead of rule_id.

  • user_id:

    string

    The user ID list separated by the ';' symbol to filter. Can be used instead of user_name.

  • user_name:

    string

    The user name list separated by the ';' symbol to filter. Can be used instead of user_id.

Returns

Examples

request:

Get all active sip registrations

https://api.voximplant.com/platform_api/GetSipRegistrations/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac

response:

Success

{
    "count": 1,
    "result": [
        {
            "proxy": "localhost",
            "user_id": 2,
            "successful": true,
            "deactivated": false,
            "status_code": 200,
            "last_updated": "2014-09-01 12:00:00",
            "sip_username": "test",
            "is_persistent": true,
            "purchase_date": "2014-09-01 11:00:01",
            "application_id": 123,
            "outbound_proxy": "127.0.0.1",
            "subscription_price": 0.5,
            "sip_registration_id": 1,
            "next_subscription_renewal": "2014-10-01"
        }
    ]
}

Update SIP registration. You should specify the application_id or application_name if you specify the rule_name or user_id, or user_name. You can bind only one SIP registration to the user (the previous SIP registration will be auto unbound).

Parameters

  • Follow link for authentication parameter names and details.

  • sip_registration_id:

    number

    The registration ID

  • sip_username:

    string

    The user name.

  • proxy:

    string

    The SIP proxy

  • auth_user:

    string

    The SIP authentications user

  • outbound_proxy:

    string

    The outbound SIP proxy

  • password:

    string

    The SIP password

  • application_id:

    number

    The application ID which the SIP registration will be bound to. Could be used instead of the application_name parameter.

  • application_name:

    string

    The application name which the SIP registration will be bound to. Could be used instead of the application_id parameter.

  • rule_id:

    number

    The rule ID which the SIP registration will be bound to. Could be used instead of the rule_name parameter.

  • rule_name:

    string

    The rule name which the SIP registration will be bound to. Could be used instead of the rule_id parameter.

  • user_id:

    number

    The user ID which the SIP registration will be bound to. Could be used instead of the user_name parameter.

  • user_name:

    string

    The user name which the SIP registration will be bound to. Could be used instead of the user_id parameter.

Returns

  • result:

    number

    1

Examples

request:

Update SIP registration with id 1.

https://api.voximplant.com/platform_api/UpdateSipRegistration/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&sip_registration_id=1&sip_username=test&outbound_proxy=12&password=123456

Bind SIP registration with id 1 to application with id 123.

https://api.voximplant.com/platform_api/UpdateSipRegistration/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&sip_registration_id=1&application_id=123

response:

Success

{
    "result": 1
}