I use Asterisk for SIP and Media Proxy. Despite the fact that Asterisk is not a SIP Proxy at all.

Customer registers in a SIP account, sends the invite and thru de context Asterisk dials out thru a SIP Trunk. Asterisk does the media proxy, since customer can't route directly to the SIP Trunk (altough it has a valida address, it don't have a public route allowed to it).

I need limit customer concurrent calls, mangle some dial-in/dial-out numbers, keep track of ongoing call, control SIP dialog, retransmit correct hang-up causes and do media proxy (no transconding at all)

After reading about Kamailio and Opensips, and due to the Kamailio Admin Book, I decided to go with Kamailio.

Well, I understand that I have to use some kamailio modules, like auth, dialplan, rtpproxy and db_mysql.

What make me stuck is how does everything fit together in kamailio.cfg and how do I get ongoing calls and CDR's?

Can anyone point me a direction?

Thanks