Hey,
for the sake of practice/learning, I want to create a Voice Chat Room mobile app (no real phone/trunks/external things).
I was thinking of having an asterisk server so each user registers to an Extension (SIP) so he can Voice Call with other users (by calling their Extension internally).
User login/sessions will be handled by a separate backend system/server/web-application.
Assuming we have tons of users, what would be the best approach:
[ol]
[li]Create a new extension for each registering user, and then have the user register to the SIP Extension when he logs into the app (and stay registered to the extension)?
Main problems I see here:
[ul]
[]I need a way to create a new extension on-the-fly (when the user registers)/[/li]
[li]User needs to be constantly connected/registered to the SIP Extension, which might among other things consume battery and network (mobile package).[/li]
[li]We might end up with tons of unused extensions for users that don’t return and/or use the app anymore.[/li][/ul][/:m]
[li]Create a fixed number of extensions that will represent the maximum amount of simultaneous “voice chats” the system support (divided by 2 of course).[/li]
[li]When a user want to initiate a chat, the web-application server will register him to an available (if there is one) extension, register the “voice chatting partner” to an extension as well.[/li]
[li]initiate/originate a call between those 2 registered extensions.[/li]
[li]onHangUp, unregister the users from the extensions to free them up for other users.
Main problems I see here:
[ul]
[]the initial number of available extensions might need to be adjusted every now and then (as the app grows).[/li]
[li]generally speaking might be a bit too complex, but most logic will be in the web-apllication server anyway.[/li][/ul][/:m][/ol]
in either case, users don’t need to know their extension number.
what do you think?
doable? too complex? Asterisk/SIP is completely not suitable for this task…?