Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#pubctors) \| [Methods](https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#inhmethods)

# SipAudioCall.Listener

*** ** * ** ***


`
public
static


class
SipAudioCall.Listener
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.sip.SipAudioCall.Listener |

<br />

*** ** * ** ***

Listener for events relating to a SIP call, such as when a call is being
received ("on ringing") or a call is outgoing ("on calling").

Many of these events are also received by `https://developer.android.com/reference/android/net/sip/SipSession.Listener`.

<br />

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#Listener()() ` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onCallBusy(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when the peer is busy during session initialization. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onCallEnded(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when the session is terminated. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onCallEstablished(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when the session is established. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onCallHeld(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when the call is on hold. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onCalling(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when a request is sent out to initiate a new call. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when an event occurs and the corresponding callback is not overridden. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onError(android.net.sip.SipAudioCall,%20int,%20java.lang.String)(https://developer.android.com/reference/android/net/sip/SipAudioCall call, int errorCode, https://developer.android.com/reference/java/lang/String errorMessage) ` Called when an error occurs. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onReadyToCall(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when the call object is ready to make another call. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onRinging(android.net.sip.SipAudioCall,%20android.net.sip.SipProfile)(https://developer.android.com/reference/android/net/sip/SipAudioCall call, https://developer.android.com/reference/android/net/sip/SipProfile caller) ` Called when a new call comes in. |
| ` void` | ` https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onRingingBack(android.net.sip.SipAudioCall)(https://developer.android.com/reference/android/net/sip/SipAudioCall call) ` Called when a RINGING response is received for the INVITE request sent. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### Listener

```
public Listener ()
```

<br />

<br />

## Public methods

### onCallBusy

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallBusy (SipAudioCall call)
```

Called when the peer is busy during session initialization.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |

### onCallEnded

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallEnded (SipAudioCall call)
```

Called when the session is terminated.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |

### onCallEstablished

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallEstablished (SipAudioCall call)
```

Called when the session is established.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |

### onCallHeld

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallHeld (SipAudioCall call)
```

Called when the call is on hold.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |

### onCalling

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCalling (SipAudioCall call)
```

Called when a request is sent out to initiate a new call.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |

### onChanged

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onChanged (SipAudioCall call)
```

Called when an event occurs and the corresponding callback is not
overridden. The default implementation is no op. Error events are
not re-directed to this callback and are handled in `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onError(android.net.sip.SipAudioCall,%20int,%20java.lang.String)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall` <br /> |

### onError

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onError (SipAudioCall call, 
                int errorCode, 
                String errorMessage)
```

Called when an error occurs. The default implementation is no op.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |
| `errorCode` | `int`: error code of this error <br /> |
| `errorMessage` | `String`: error message <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/sip/SipErrorCode`

### onReadyToCall

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onReadyToCall (SipAudioCall call)
```

Called when the call object is ready to make another call.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that is ready to make another call <br /> |

### onRinging

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onRinging (SipAudioCall call, 
                SipProfile caller)
```

Called when a new call comes in.
The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |
| `caller` | `SipProfile`: the SIP profile of the caller <br /> |

### onRingingBack

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onRingingBack (SipAudioCall call)
```

Called when a RINGING response is received for the INVITE request
sent. The default implementation calls `https://developer.android.com/reference/android/net/sip/SipAudioCall.Listener#onChanged(android.net.sip.SipAudioCall)`.

<br />

| Parameters ||
|---|---|
| `call` | `SipAudioCall`: the call object that carries out the audio call <br /> |