You can put a stopline on your road and call the code as below:

This assumes you have cars on the road of a custom CarType Emergency
obviously. Then, each car checks "am I an emergency" and if so, it checks if the traffic light is currently red (assuming phase 0 is the red phase). If so, it goes to the next phase (which should be defined as green, obviously).
this is just 1 suggestion to get you started
PS: You will not be able to model true emergency-car interactions as you see them in reality, this is beyond the Roadtraffic library capabilities. You can only "nudge" towards it and mimic real behavior.