I want to be able to send SIP packets to different SIP servers using different local identities. Any tips on how this is best handled with this stack?
The way to do this through the router. Note that you can specify a Router class implementation when the stack is created. The Router sets up the path to the next hop. In your Router, look at the user trying to set up the call and return the Hop implementation corresponding to the gateway to which that user should be pointed to. Note also that the Router is only used to route requests out of dialog – which is to say it is used for pre-dialog establishment, requests that dont belong to any particular dialog and stateless requests.