Question: I am iPhone application developer. How to block incoming and outgoing calls in iPhone using iPhone application, It is need to work when application run background also.

Thanks in advance.

Answer: 
This cannot be done in iOS as its a technical restriction enforced by Apple.
“Block Caller” is at the bottom of the Contact for each individual.
It can be selected to “block” and “unblock” as desired.
Block voicemail are stored but blocked messages just never go through (from another IPhone it is noticeable, but not from android phones).