2016-07-26 3 views
0

Was ich eigentlich suche sind die Termination und Origination SIP-URIs für einen bestimmten Trunk.Twilio Origination und Terminierung SIP-URIs mit Java

Die nächstgelegene ich bisher gefunden wurde:

getCredential 

public Credential getCredential(String credentialSid) 

Gets the credentials from the credential list 

Returns: 
    the credentials 

https://twilio.github.io/twilio-java/com/twilio/sdk/resource/instance/sip/CredentialListInstance.html#getCredential-java.lang.String-

Wie erhalte ich eine credentialSid, und was ist ein credentialSid?

SID ist Security IDentifier?

siehe auch: Twilio: cannot rename subdomain null for SIP termination

Antwort

1

Sie über SIP Credentials via the API herausfinden können.

Und ein Beispiel einer in Java zu erhalten:

// Install the Java helper library from twilio.com/docs/java/install 
import com.twilio.sdk.TwilioRestClient; 
import com.twilio.sdk.TwilioRestException; 
import com.twilio.sdk.resource.instance.sip.Credential; 

public class Example { 

    // Find your Account Sid and Token at twilio.com/user/account 
    public static final String ACCOUNT_SID = "None"; 
    public static final String AUTH_TOKEN = "your_auth_token"; 

    public static void main(String[] args) throws TwilioRestException { 
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN); 

    // Get an object from its sid. If you do not have a sid, 
    // check out the list resource examples on this page 
    Credential credential = client.getAccount().getCredentialList("CL32a3c49700934481addd5ce1659f04d2").getCredential("SC32a3c49700934481addd5ce1659f04d2"); 
    System.out.println(credential.getUsername()); 
    } 
} 

hoffe, das hilft!