res_pjsip is the replacement for the chan_sip stack.
You can read how to configure it in the Wiki at
https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
Contexts are also explained in the WIki
https://wiki.asterisk.org/wiki/display/AST/Contexts%2C+Extensions%2C+and+Priorities
I can’t tell you what you need to create for your project, Only you can determine what you need.