# Post Caller ID to other app

**URL:** <https://community.asterisk.org/t/post-caller-id-to-other-app/90930>\
**Category:** Asterisk APIs\
**Created:** [December 15, 2021, 7:21pm UTC](https://community.asterisk.org/t/post-caller-id-to-other-app/90930 "2021-12-15T19:21:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackyITS](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@JackyITS](https://community.asterisk.org/u/JackyITS)\
**Post date:** [December 15, 2021, 7:21pm UTC](https://community.asterisk.org/t/post-caller-id-to-other-app/90930/1 "2021-12-15T19:21:45Z")

</div>

We are developing a new CRM, running CRM on a different server, when customers called, we would like to catch the caller ID (get the incoming caller ID from Asterisk), then CRM can search the caller ID and get the customer details.

I have googled it, looks like AGI script to do, however, I don’t know how this works and don’t have much background on php.

Please help.

---

<div class="post-metadata">

**Author:** ![sedwards](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sedwards](https://community.asterisk.org/u/sedwards)\
**Post date:** [December 15, 2021, 9:04pm UTC](https://community.asterisk.org/t/post-caller-id-to-other-app/90930/2 "2021-12-15T21:04:32Z")

</div>

Based on the information presented, I agree an AGI is the way to go.

Depending on how you access your database, I’d use the MySQL or cURL library. Query the database using the caller ID (passed in the AGI environment or as a channel variable), set a bunch of channel variables with the customer details, and Robert’s your mothers brother.

You can write an AGI in almost any language. What languages do you have experience with?

---

<div class="post-metadata">

**Author:** ![EkFudrek](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@EkFudrek](https://community.asterisk.org/u/EkFudrek)\
**Post date:** [December 16, 2021, 5:12am UTC](https://community.asterisk.org/t/post-caller-id-to-other-app/90930/3 "2021-12-16T05:12:29Z")

</div>

You could as well evaluate Asterisk Manager events, or simply send an HTTP GET across the net with the curl function. It all depends on what’s available and whether there are restriction that have nothing to do with Asterisk.

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [December 17, 2021, 12:16am UTC](https://community.asterisk.org/t/post-caller-id-to-other-app/90930/4 "2021-12-17T00:16:20Z")

</div>

If you don’t know anything about PHP or any other programming language, use the Asterisk curl() function.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [January 16, 2022, 12:17am UTC](https://community.asterisk.org/t/post-caller-id-to-other-app/90930/5 "2022-01-16T00:17:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
