How to setup pstn connection to asterisk

Hi I am the beginner ,I need to setup pstn to my asterisk server.please share your ideas.

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-OutsideConn.html

Here my need is to get the call time with date ,anyone can help to get the details.let me know what mistake i did.

Without seeing what you did, it is a bit difficult to see which of what you did you did wrong!