Here is my situation. I have to register some user agents with asterisk. Then I want asterisk to register with a sip provider for these clients using multiple accounts. For example, User1 and User2 can register with Asterisk. But they cannot register with the sip provider directly. When Asterisk receives REGISTER from them, it should send REGISTER to the provider using the respective account credentials for the Users.
Like If we receive register from User1 with username: User1 secret: passwd, we execute
similarly for User2, with username: User2 secret: passwd, we execute
So that the context of section  and  can be tweaked and we can route the call to the respective user in dialplan.
Is it possible ? When I google, the closest I could get is the use of Asterisk Realtime. But I am not sure, if it will help my case. Thank you in advance for the help.