public static void basicExample003 ( ) throws Exception { // Generate a request again final SipRequest invite = SipRequest . invite ( "sip:alice@aboutsip.com" ) . withFromHeader ( "sip:bob@pkts.io" ) . build ( ) ; // Create a 200 OK to that INVITE and also add a generic // header for good measure. final SipResponse response = invite . createResponse ( 200 ) . withHeader ( SipHeader . create ( "X-Hello" , "World" ) ) . build ( ) ; System . out . println ( response ) ; }
Creating responses is typically done based off a request and SIP Lib allows you to do so but of course the object returned will be a builder .