Forward call based on callerId thru mysql

For a game i want to forward calls based on the callerid thru a database.
For example if person calls for first time it needs to get prompt1
Calling second time prompt2
Reason for database is that same result needs to be achieved for rest of the players in team. Callerid is known then

Open for all ideas
Thanks

For a game i want to forward calls based on the callerid thru a database.

Is this an external database such as MySQL, Postgres, MariaDB, etc, or do you
mean the internal Asterisk database?

For example if person calls for first time it needs to get prompt1
Calling second time prompt2

That can easily be achieved using the Asterisk internal database.

Reason for database is that same result needs to be achieved for rest of
the players in team. Callerid is known then

Are you saying that all callers in one team will present the same CallerID?

Open for all ideas

What have you tried so far? How familiar are you with either the Asterisk
internal database, or with performing ODBC queries from a dialplan?

Antony.

As above notes, the internal Asterisk database (SQLite3) sounds capable to the task as described.

Personally, I wouldn’t use it for more than a couple hundred rows.

If you have a reason that justifies MySQL, I’d do it in an AGI. I’m not a fan of external database access in the dialplan – but I may be biased.

SQLite can gracefully handle hundreds of thousands of rows. I think its maximum file size is on the order of terabytes.

I would avoid ODBC. If you have to use that, I would take that as an indication that you need to pass database duties to an external script.

it is an external database, not the Asterisk database

all callers from same team have different callerid, but from the database i know who is what team

tried with scripts, did not know there is a database that i can use.
Will try that out now.
Is it possible to access the database like phpmyadmin??

What does Google say? It’s probably the first hit returned.

Personally, I’d let Asterisk keep it’s database and create a new one – MySQL or SQLite.

I don’t doubt the abilities or reliability of SQLite, I’d just prefer to keep my cruft out of Asterisk’s garden.

I’d just prefer to keep my cruft out of Asterisk’s garden.

And yet you are not a fan of external database access??

Too messy, too ‘quote-y’, too fragile, too cumbersome, too limiting.

Too messy, too ‘quote-y’, too fragile, too cumbersome, too limiting.

That describes the entire dialplan language in a nutshell. And it seems that attempts at successors–first AEL, now Lua–have not been entirely popular.

So what else is there, if not external programming/scripting?

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