Hey Guys,
We are in the process of implementing prepaid control using CGRateS
engine and for that we will be using evapi module (thanks Daniel again
for that).
I was wondering if you can advice us whether the path we are taking is
the correct one.
On INVITE, we will initiate a MaxCallTimeout (sort of call auth) to
CGRateS via evapi. Once request sent, we should "park" the request
somehow (right now we are considering sleep in the process via usleep
and recheck for the answer every 5-10 milliseconds). Answer should be
shared via htable. Could you recommend us a better approach?
On reply, the answer processed in event route evapi:message-received
should set in htable a key of combination callid:fromtag with the
maximum call duration or auth reject if not enough balance. This key
should be processed by the sleeping process on wakeup.
What do u think, is there a better way to approach the 2 ways communication?
Thanks in advance for any kind of tip!
DanB