I would like to build a script where two parties can enter in contact each other.
I have customers and delivery man. I need my customer to be able to call delivery man, and delivery man to be able to call customer.
Each party call a unique phone number and call will automatically divert other party mobile phone based on database query. I have a database with current deliveries. I know customer mobile phone and delivery man mobile phone.
When call is coming we catch incoming DID. Then we query mysql database with this number; Query return delivery man phone number and call that number. Two parties can now communicate at phone.
When delivery man need to call customer, it’s the same scenario, delivery man phone number is catched, then query database, and call customer phone number.
Customer may have multiple concurrent deliveries, in that case, text to speech may prompt press 1 for delivery reference XXX, press 2 for delivery reference YYY…
If not delivery server would prompt error message.
All calls must be recorded. I need to be able to query CDR to check all communication between parties + open recorded communications.
Incoming calls will come from PSTN, SIP trunk, and all outgoing call through sip trunk.
Script may be based on freeswitch as it’s an xml based solution, faster for administration.