File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " rsipstack"
3- version = " 0.2.33 "
3+ version = " 0.2.34 "
44edition = " 2021"
55description = " SIP Stack Rust library for building SIP applications"
66license = " MIT"
Original file line number Diff line number Diff line change @@ -116,6 +116,27 @@ impl ServerInviteDialog {
116116 & self . inner . initial_request
117117 }
118118
119+ pub fn ringing ( & self , headers : Option < Vec < Header > > , body : Option < Vec < u8 > > ) -> Result < ( ) > {
120+ if !self . inner . can_cancel ( ) {
121+ return Ok ( ( ) ) ;
122+ }
123+ info ! ( id = %self . id( ) , "sending ringing response" ) ;
124+ let resp = self . inner . make_response (
125+ & self . inner . initial_request ,
126+ if body. is_some ( ) {
127+ StatusCode :: SessionProgress
128+ } else {
129+ StatusCode :: Ringing
130+ } ,
131+ headers,
132+ body,
133+ ) ;
134+ self . inner
135+ . tu_sender
136+ . send ( TransactionEvent :: Respond ( resp. clone ( ) ) ) ?;
137+ self . inner . transition ( DialogState :: Early ( self . id ( ) , resp) ) ?;
138+ Ok ( ( ) )
139+ }
119140 /// Accept the incoming INVITE request
120141 ///
121142 /// Sends a 200 OK response to accept the incoming INVITE request.
You can’t perform that action at this time.
0 commit comments