> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # extractSipUsername > Extract the SIP username from a request body's call.to field. Static method that extracts the SIP username from a request body's `call.to` field. Strips the `sip:` or `sips:` protocol prefix and the `@domain` suffix, returning just the username portion. ## **Parameters** **`requestBody`** `Record` — required The parsed request body containing call information. Expected to have a `call.to` field in SIP URI format (e.g., `"sip:helpdesk@example.com"`). --- ## **Returns** `string | null` -- The extracted SIP username, or `null` if not found. ## **Example** ```typescript {3} import { AgentBase } from '@signalwire/sdk'; const username = AgentBase.extractSipUsername({ call: { to: 'sip:helpdesk@example.com' }, }); console.log(username); // "helpdesk" const noMatch = AgentBase.extractSipUsername({}); console.log(noMatch); // null ``` > Extract the SIP username from a request body's call.to field.