[SR-Users] kamailio configuration for pass-thru proxy and username rewrite

Klaus Darilion klaus.mailinglists at pernau.at
Tue Aug 20 10:53:49 CEST 2013


If you want to hide your upstream providers from your customers, you 
should use a B2BUA (sems, Asterisk).

Probably the most simple setup would be:

customers ------ Kamailio ------ Asterisk ------ PSTN Provider


Kamailio is used for Registrations, NAT traversal, Authentication ...

Calls to the PSTN are routed to your Asterisk. Your Asterisk server will 
forwards the calls to the PSTN provider.

Then you can decide if you use only 1 SIP account between Asterisk and 
the PSTN provider (then you have to do the billing yourself and separate 
the customers), or you map every customer to a dedicated SIP accounts on 
the PSTN provider (then you can use the billing of the PSTN provider, 
but then for every new customer you have to interact with PSTN provider 
to get a new SIP account and configure Asterisk to map the internal 
account to the PSTN provider account).

The mapping is easy, e.g. do it in Kamailio and signal the "to be used 
upstream account" to Asterisk. But I would do it in Asterisk, e.g. using 
a DB lookup or use a static mapping if you do not have plenty of customers.

regards
Klaus


On 19.08.2013 11:56, 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?
>



More information about the sr-users mailing list