https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I extract the caller number
# ❓・ai-evy-support
b
@AI Evy how do I extract the caller number?
a
Thanks for tagging me @barmaman_20903. I'll look through relevant sources and get back to you shortly.
### Answer You can extract the caller number using several methods in Retell AI: ## Using API Endpoints The caller number is available in the
from_number
field when you retrieve call information using the Get Call API [(1) ]() or List Calls API [(2) ]() . For example:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
[(1) ]() The response includes the
from_number
field which contains the caller's phone number [(3) ]() [(2) ]() [(1) ]() . ## Using Webhooks You can also access the caller number through webhooks [(4) ]() . The
from_number
is automatically included in webhook payloads for call events like
call_started
,
call_ended
, and
call_analyzed
[(5) ]() . ## Important Considerations If you have "Opt out sensitive data storage" enabled, you can still access the caller number by enabling webhook subscriptions for
call_ended
or
call_analyzed
events and parsing the webhook payload to extract the
from_number
[(4) ]() . The caller number is available for both inbound and outbound calls and appears in the same
from_number
field across all API responses [(3) ]() [(2) ]() [(1) ]() .
​ To learn more, see the sources I considered: [[1] Get Call](https://docs.retellai.com/api-references/get-call) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) [[3] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[4] accessing call logs and from_number](https://discord.com/channels/1186424376300679209/1361465621056983222) [[5] Discord message from @moetechy_ on 2025-04-09](https://discord.com/channels/1186424376300679209/1186462578310910112/1359598033330770050) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.