> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# refer

> Transfer a SIP call to an external endpoint via SIP REFER.

[transfer]: /docs/server-sdks/reference/python/relay/call/transfer

[calling-call-refer]: /docs/server-sdks/reference/python/relay/call#events

[call-events]: /docs/server-sdks/reference/python/relay/call#events

Transfer a SIP call to an external SIP endpoint using the SIP REFER method.
Unlike [`transfer()`][transfer]
which transfers control within RELAY, `refer()` performs a SIP-level transfer
to an external endpoint.

This method emits [`calling.call.refer`][calling-call-refer] events. See [Call Events][call-events] for payload details.

## **Parameters**

The target SIP device for the REFER.

Device type. Typically `"sip"`.

SIP parameters including `uri` (the SIP URI to refer to).

URL to receive REFER status webhooks.

## **Returns**

`dict` -- Server response confirming the refer operation.

## **Example**

```python {15}
from signalwire.relay import RelayClient

client = RelayClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
    contexts=["default"],
)

@client.on_call
async def handle_call(call):
    await call.answer()
    await call.play([{"type": "tts", "params": {"text": "Transferring to another line."}}])

    result = await call.refer(
        device={
            "type": "sip",
            "params": {"uri": "sip:support@example.com"},
        },
    )
    print(f"SIP REFER result: {result}")

client.run()
```