Hi Florian,
Kamailio has limited support for this in the form of the reg facility of the 'uac' module:
http://kamailio.org/docs/modules/4.0.x/modules/uac.html#reg-db-url-id
The 'uac' module can register (with authentication) to other gateways on your behalf. However, it's not very flexible.
From a methodological point of view, this is probably not the best thing to do. Registration and digest authentication is a feature of retail-oriented SIP origination/termination providers. More intra-industrial, resale-oriented (we might call them "wholesale") SIP trunking providers usually use trusted IP authentication/authorisation for endpoints like your proxy, obviating the need for this exercise. Registration is a feature associated with consumer-level endpoints (handsets, ATAs, etc.) and dynamic IPs (on residential and small-business broadband connections). Many pieces of equipment within the industry don't support registration, and/or don't support answering digest challenges.
I recommend that you see if your SIP provider supports IP trust AAA and incoming routing to you based on static IP destination as well. If not, you might consider reselling a different SIP provider.
-- Alex
On 08/19/2013 05:56 AM, ACW - Florian Schmid wrote:
Hello,
i am new to kamailio and have some problems creating the configuration.
What we have now:
A SIP-Provider who gives us sip accounts or sip-trunks with username and passwords. Our customers, where we have to enter the SIP-Provider's userdata.
What we want to have: We want to create a sip proxy between the SIP-Provider and our customers.
Our customers should not see the userdata from the SIP-Provider, but the customers should get our usernames and passwords.
What the new kamailio server should do: Forward the registration and calls to the SIP-Provider's server and change our usernames and passwords to the correct usernames from the SIP-Provider.
There should be a translation database table where the usernames and passwords from us and from the SIP-Provider were stored. Every time a phone or asterisk pbx will register or make a call, the kamailio server should change the username and password via the translation database table.
The database could be a text file or a mysql database.
Is that possible and can someone please help me to manage this?