Expire a number masking session

    DELETEhttps://api.plivo.com/v1/Account/{Auth_ID}/Session/{session_uuid}


    No hard deletion. The session is marked as ‘expired’.

    API response codes

    201

    Session created.

    200

    Session updated.

    200

    Session updated.

    200

    Session expired.

    400

    Session already expired.

    400

    Number pool exhausted or not available.

    400

    Invalid parameter. first_party is not a valid phone number.

    400

    Invalid parameter. second_party is not a valid phone number.

    400

    Mandatory parameter missing. first_party must be present.

    400

    Mandatory parameter missing. second_party must be present.

    400

    Invalid parameter. session_expiry is outside the allowed range.

    400

    Invalid parameter. call_time_limit is outside the allowed range.

    400

    Invalid parameter. record allowed values are true or false.

    400

    Invalid parameter. record_file_format allowed values are mp3 or wav.

    400

    Invalid parameter. recording_callback_url should be a valid URL.

    400

    Invalid parameter. recording_callback_url should be under 1000 characters.

    500

    Internal server error.

    SDK

    The number masking SDK is available in Go. The repo is available here. To use the repo, you can use one of the below methods

    • Install it using the below command:

      go get github.com/plivo/plivo-go/v7@number_masking

    • Add this requirement in go.mod file

      github.com/plivo/plivo-go/v7 v7.16.1-0.20230110070302-afc386fcd1e8

    Plivo phone number allocation (DID)

    In the current scenario, it is possible that 1 agent may have multiple customers and vice versa. In such a case, the total number of DIDs needed is to be governed as follows:

    Total DIDs needed = 2 x Max unique concurrent sessions for any single party - 1

     

     

     

     

     

     

     

     

     

     

     

     

     

    Example Request

    1
    
    1
    
    1
    
    1
    
    1
    
    1
    
    1
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/plivo/plivo-go/v7"
    )
    
    func main() {
    	client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
    	if err != nil {
    		fmt.Print("Error", err.Error())
    		return
    	}
    	response, err := client.Calls.DeleteMaskingSession("SessionUUID")
    	if err != nil {
    		fmt.Print("Error", err.Error())
    		return
    	}
    	fmt.Printf("Response: %#v\n", response)
    }