I have a sample application of a SIP server listening on both tcp and udp ports 5060.
At some point in the code, I do a system(\"pppd file /etc/ppp/myoptions &\");
system() copies current process and then launch a child on top of it. (current process is no more there. that is probably why pppd uses 5060. You can try fork()/exec() to create a child process and keep parent alive.