How to properly recognize a session id generated by drupal? I'm storing stuff in a session that is sometimes handled by drupal. The session id is passed forward to another service, which checks back to the original server to get the session data. 

When the session id is generated by drupal, i want to recognize it so i can include the drupal bootstrap instead of creating a normal php session. What would be a proper way to recognize drupal session ids ?

Is there a way to make it more specific, like change the sessionid myself ?
Drupal will let you override the default session handler using the session_inc variable. This is what Drupal actually uses to bootstrap the session:

require_once DRUPAL_ROOT . '/' . variable_get('session_inc', 'includes/session.inc');


So to replace that with your own, set the variable to your own path:

variable_set('session_inc', 'sites/all/modules/MYMODULE/session.inc');


And re-implement the functions from the core session.inc in your custom file, making changes where necessary.