Help & Support

SIP Providers

The service methods available for SIP provider records are listed below. In all cases the "where" parameter is an optional filter. It can be used to filter the results of a Get or Count query.

  • Count: GET sipprovider/count?where={where},
  • Get: GET sipprovider/get?where={where}&offset={offset}&count={count}
  • Add: POST sipprovider/add where the request body is a JSON formatted SIP provider
  • Update: POST sipprovider/update where the request body is a JSON formatted SIP provider
  • Delete: GET sipprovider/delete?id={id}

The service methods available for SIP provider binding records are listed below.

  • Count: GET sipproviderbinding/count?where={where},
  • Get: GET sipproviderbinding/get?where={where}&offset={offset}&count={count}

The typical JSON format for a SIP provider is shown below. When updating a SIP provider all the properties must be specified and any properties that are ommitted will be set to their default value which will be null in most cases.

A description for each of the SIP Provider properties is listed below.

  • ID: A system generated GUID that uniquely identifies the SIP Provider record. It cannot be updated.
  • ProviderName: A descriptive name for the SIP Provider record. The provider name is not used for call routing or anything else other than to provide an easy way for users to identify their provider records.
  • ProviderUsername: The username for the SIP Provider. It is used to authenticate registrations and calls with the SIP Provider.
  • ProviderPassword: The password for the SIP Provider. It is used to authenticate registrations and calls with the SIP Provider.
  • ProviderServer: The host name or IP address for the SIP Provider.
  • ProviderAuthUsername: An optional field that if set will override the ProviderUsername field for authentication purposes. The ProviderUsername will still be used in the From header on all SIP requests to the Provider.
  • ProviderOutboundProxy: This is a read only field that identifies which SIPSorcery SIP socket that requests to the SIP Provider were sent through.
  • ProviderType: The type of the Provider record. Can be SIP or GoogleVoice.
  • ProviderFrom: An optional field that if specified will be used as the From header on all SIP requests sent to the SIP Provider.
  • CustomHeaders: An optional field that can be used to specify a list of customer SIP headers that will be included on all SIP requests sent to the SIP Provider.
  • RegisterContact: If registrations are enabled for the SIP Provider this field must contain the SIP URI to send in REGISTER requests to the SIP Provider.
  • RegisterExpiry: If registrations are enabled for the SIP Provider this field will contain the values that is requested for the registration expiry.
  • RegisterServer: An optional field that overrule the ProviderServer for the host name or IP address that REGISTER requests will be sent to for the SIP Provider.
  • RegisterRealm: An optional fileld that if set will overrule the ProviderServer as the realm in the digest authentication.
  • RegisterEnabled: Set to true to enable registrations from SIPSorcery to the SIP Provider.
  • GVCallbackNumber: Only relevant for GoogleVoice Provider entries and specifies the number that GoogleVoice calls should use for the callback.
  • GVCallbackPattern: The regular expression pattern that the SIPSorcery application server should use to match an incoming call against a pending GoogleVoice call. Typicall set as ".*" to match the next incoming call.
  • GVCallbackType: The type of the GoogleVoice callback number. Can be Home, Mobile or Work.

The typical JSON format for a SIP Provider Binding is shown below. SIP Provider Binding records are readonly. If the ReigsterContact, Expiry or other SIP Provider registration details need to be updated the associated SIP Provider record should be modified.

A description for each of the SIP Provider Binding properties is listed below.

  • ID: A system generated GUID that uniquely identifies the SIP Provider Binding record.
  • ProviderID: The ID of the SIP Provider that the SIP Provider Binding record is for.
  • ProviderName: The name of the SIP Provider that the SIP Provider Binding record is for..
  • RegistrationFailureMessage: If the registration fails with a temporary failure condition this field will contain a message indicating the reason for the failure.
  • LastRegisterTime: The last time a successful registration occurred.
  • NextRegistrationTime: The time the next registration attempt is scheduled to occur.
  • LastRegisterAttempt: The time the last registration attempt was made.
  • IsRegistered: Indicates whether the last registration attempt was successful or not.
  • BindingExpiry: The expiry value that was granted by the SIP Provider's registrar.
  • BindingURI: The SIP URI that was set as the contact for the REGISTER request sent to the SIP Provider.
  • RegistrarSIPSocket: The SIP socket that the REGISTER request for the SIP Provider was sent to.
  • CSeq: The CSeq SIP header value that was set in the latest REGISTER request to the SIP Provider.

The Ruby script below illustrates how to use each of the service methods for SIP provider and SIP Provider Binding records.