You need to find out the linecoding, clocking, framing and signaling type that the PBX uses to interface to the E1 on the 3640. The signaling type has to match. If you are using E1 R2, then you need to see whether it is compelled, semi-compelled, etc...if you are using E1 ISDN, you need to find out ISDN switch type and if it is Qsig or PRI. We have some URLs below that may help get you started:
E1 R2:
http://www.cisco.com/warp/customer/788/signalling/e1r2config.html
E1 PRI:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/dial_c/dcchant.htm
http://www.cisco.com/warp/customer/116/E1_pri.html
PRI signaling for E1 voice is similar to E1 data.
If you need additional voice configurations, this page is very good also:
http://www.cisco.com/warp/customer/788/
Hope this helps!!