|
|
@ -928,7 +928,8 @@ func (s *IcsSession) ProcACKInvite(sip *icspacketparser.SIP) *icserror.IcsError
|
|
|
|
reqAck.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTENT_LENGTH, "0")
|
|
|
|
reqAck.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTENT_LENGTH, "0")
|
|
|
|
reqAck.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR)
|
|
|
|
reqAck.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR)
|
|
|
|
|
|
|
|
|
|
|
|
wlen, werr := (*s.sipNeter).WriteSIP([]byte(reqAck.String()))
|
|
|
|
// wlen, werr := (*s.sipNeter).WriteSIP([]byte(reqAck.String()))
|
|
|
|
|
|
|
|
wlen, werr := (*s.sipNeter).WriteSIPTo([]byte(reqAck.String()), s.remoteSIPAddr)
|
|
|
|
if werr != nil {
|
|
|
|
if werr != nil {
|
|
|
|
l.Print(icslog.LOG_LEVEL_FATAL, s.ID, werr.GetMessage())
|
|
|
|
l.Print(icslog.LOG_LEVEL_FATAL, s.ID, werr.GetMessage())
|
|
|
|
s.SetAgentStatus(STATUS_AGENT_READY)
|
|
|
|
s.SetAgentStatus(STATUS_AGENT_READY)
|
|
|
@ -1208,7 +1209,8 @@ func (s *IcsSession) ProcBye(sip *icspacketparser.SIP) *icserror.IcsError {
|
|
|
|
res200.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTACT, contact)
|
|
|
|
res200.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTACT, contact)
|
|
|
|
res200.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR)
|
|
|
|
res200.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR)
|
|
|
|
|
|
|
|
|
|
|
|
wlen, werr := (*s.sipNeter).WriteSIP([]byte(res200.String()))
|
|
|
|
// wlen, werr := (*s.sipNeter).WriteSIP([]byte(res200.String()))
|
|
|
|
|
|
|
|
wlen, werr := (*s.sipNeter).WriteSIPTo([]byte(res200.String()), s.remoteSIPAddr)
|
|
|
|
if werr != nil {
|
|
|
|
if werr != nil {
|
|
|
|
l.Print(icslog.LOG_LEVEL_FATAL, s.ID, werr.GetMessage())
|
|
|
|
l.Print(icslog.LOG_LEVEL_FATAL, s.ID, werr.GetMessage())
|
|
|
|
s.SetAgentStatus(STATUS_AGENT_READY)
|
|
|
|
s.SetAgentStatus(STATUS_AGENT_READY)
|
|
|
@ -2033,7 +2035,8 @@ func (s *IcsSession) RequestBYE(inviteSIP *icspacketparser.SIP) {
|
|
|
|
reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTENT_LENGTH, contentLength)
|
|
|
|
reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTENT_LENGTH, contentLength)
|
|
|
|
reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR)
|
|
|
|
reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR)
|
|
|
|
|
|
|
|
|
|
|
|
wlen, werr := (*s.sipNeter).WriteSIP([]byte(reqOpt.String()))
|
|
|
|
// wlen, werr := (*s.sipNeter).WriteSIP([]byte(reqOpt.String()))
|
|
|
|
|
|
|
|
wlen, werr := (*s.sipNeter).WriteSIPTo([]byte(reqOpt.String()), s.remoteSIPAddr)
|
|
|
|
if werr != nil {
|
|
|
|
if werr != nil {
|
|
|
|
l.Print(icslog.LOG_LEVEL_FATAL, s.ID, werr.GetMessage())
|
|
|
|
l.Print(icslog.LOG_LEVEL_FATAL, s.ID, werr.GetMessage())
|
|
|
|
return
|
|
|
|
return
|
|
|
|