From 404d756f5b6972686dd1cfc9aaca10a689ac52d7 Mon Sep 17 00:00:00 2001 From: jjLee Date: Tue, 26 Jul 2022 17:35:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=A0=ED=94=8C=20=EC=8B=9C=EB=AE=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- icssessionmanager/agentoperator.go | 95 ++++++++++++++++++---------- icssessionmanager/csprocessor.go | 3 +- icssessionmanager/icssipautomata.go | 9 ++- icssessionmanager/sessionoperator.go | 26 +++++--- sipasm/siptemplt.go | 3 + 5 files changed, 93 insertions(+), 43 deletions(-) diff --git a/icssessionmanager/agentoperator.go b/icssessionmanager/agentoperator.go index c18425a..cc100d6 100644 --- a/icssessionmanager/agentoperator.go +++ b/icssessionmanager/agentoperator.go @@ -275,35 +275,37 @@ func (s *IcsSession) RequestInvite(inviteto string) { format := conf.AgentConfig[s.ID].MediaConfig.Format //sim - inviteMethod := fmt.Sprintf("sip:%s@192.168.0.83;transport=%s", s.AgentName, transport) + inviteMethod := fmt.Sprintf("sip:%s@172.31.29.47;transport=%s", s.AgentName, transport) // nlb(DNS)를 한번 갔다온 ip를 넣어줘야함. s.uri = fmt.Sprintf("sip:%s@%s", s.AgentName, ip) - to := fmt.Sprintf("", s.AgentName) + to := fmt.Sprintf("", s.AgentName, ip) if conf.Representative.Value { - inviteMethod = fmt.Sprintf("sip:%s@192.168.0.83;transport=%s", "AISB", transport) + inviteMethod = fmt.Sprintf("sip:%s@%s;transport=%s", "AISB", ip, transport) s.uri = fmt.Sprintf("sip:%s@%s", "AISB", ip) - to = fmt.Sprintf("", "AISB") + to = fmt.Sprintf("", "AISB", ip) } reqInvite := sipasm.NewSIPMessage(sipasm.ICSSIP_METHOD_INVITE, inviteMethod) - via := fmt.Sprintf("SIP/2.0/UDP 192.168.0.83:5090;branch=%s", sipasm.GenerateBranch()) + via := fmt.Sprintf("SIP/2.0/UDP %s:5090;branch=%s", ip, sipasm.GenerateBranch()) maxforwards := "70" from := fmt.Sprintf(";tag=%s", inviteto, ip, sipasm.GenerateTag()) l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Set URI [%s]", s.uri) - postfix := "192.168.0.83" + // postfix := "192.168.0.83" var callid string - if len(s.callID) != 0 { - callid = s.callID - //if len(s.regiCallID) != 0 { - //callid = s.regiCallID - } else { - callid = sipasm.GenerateCallID(postfix) - } + s.callID = uuid.New().String() + callid = s.callID + // if len(s.callID) != 0 { + // callid = s.callID + // //if len(s.regiCallID) != 0 { + // //callid = s.regiCallID + // } else { + // callid = sipasm.GenerateCallID(postfix) + // } cseq := fmt.Sprintf("%d INVITE", s.Cseq) s.Cseq++ // contact := fmt.Sprintf("", s.AgentName, ip, port, transport) - contact := fmt.Sprintf("", inviteto) + contact := fmt.Sprintf("", inviteto, ip) //expires := fmt.Sprintf("%d", conf.AgentConfig[s.ID].RegisterConfig.RegisterExpire) // userAgent := conf.InfoConfig.Product userAgent := "M800B/v.7.20A.204.759" @@ -312,7 +314,7 @@ func (s *IcsSession) RequestInvite(inviteto string) { formats := strings.Split(format, " ") // reqInvite.SDP = sipasm.NewSDPMessage(ip, mediaPort, formats[:], 0) - reqInvite.SDP = sipasm.NewSDPMessage("192.168.0.83", mediaPort, formats[:], 0) + reqInvite.SDP = sipasm.NewSDPMessage(ip, mediaPort, formats[:], 0) sdpLength := fmt.Sprintf("%d", len(reqInvite.SDP.String())) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_VIA, via) @@ -322,6 +324,7 @@ func (s *IcsSession) RequestInvite(inviteto string) { reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CALL_ID, callid) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CSEQ, cseq) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTACT, contact) + reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_XAICALL, s.referto) //reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_EXPIRES, expires) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_USER_AGENT, userAgent) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_ALLOW, allow) @@ -336,7 +339,8 @@ func (s *IcsSession) RequestInvite(inviteto string) { return } - s.callID = callid + // s.callID = callid + // s.callID = uuid.New().String() if conf.Representative.Value { s.SetAgentStatus(STATUS_AGENT_READY) @@ -382,11 +386,12 @@ func (s *IcsSession) PassInvite(sip *icspacketparser.SIP) *icserror.IcsError { via := fmt.Sprintf("SIP/2.0/UDP %s;rport;branch=%s", ip, sipasm.GenerateBranch()) maxforwards := "70" - from := fmt.Sprintf(";tag=%s", s.AgentName, ip, sipasm.GenerateTag()) + from := fmt.Sprintf(";tag=%s", "AISB", ip, sipasm.GenerateTag()) s.uri = fmt.Sprintf("sip:%s@%s", s.AgentName, ip) l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Set URI [%s]", s.uri) + s.referto = sip.XAICall to := fmt.Sprintf("", "01025670081", ip) //to := fmt.Sprintf("", s.AgentName, ip) // postfix := fmt.Sprintf("@%s", ip) @@ -399,9 +404,10 @@ func (s *IcsSession) PassInvite(sip *icspacketparser.SIP) *icserror.IcsError { // } else { // callid = sipasm.GenerateCallID(postfix) // } + s.callID = callid cseq := fmt.Sprintf("%d INVITE", s.Cseq) s.Cseq++ - contact := fmt.Sprintf("", s.AgentName, ip, port, transport) + contact := fmt.Sprintf("", "AISB", ip, port, transport) //expires := fmt.Sprintf("%d", conf.AgentConfig[s.ID].RegisterConfig.RegisterExpire) userAgent := conf.InfoConfig.Product allow := "REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE" @@ -410,6 +416,8 @@ func (s *IcsSession) PassInvite(sip *icspacketparser.SIP) *icserror.IcsError { formats := strings.Split(format, " ") reqInvite.SDP = sipasm.NewSDPMessage(ip, mediaPort, formats[:], 0) sdpLength := fmt.Sprintf("%d", len(reqInvite.SDP.String())) + fmt.Println("###### X-AICALL ", sip.XAICall) + // refer := strings.Split(sip.XAICall, "@")[0] reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_VIA, via) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_MAX_FORWARDS, maxforwards) @@ -418,6 +426,7 @@ func (s *IcsSession) PassInvite(sip *icspacketparser.SIP) *icserror.IcsError { reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CALL_ID, callid) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CSEQ, cseq) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTACT, contact) + reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_XAICALL, sip.XAICall) //reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_EXPIRES, expires) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_USER_AGENT, userAgent) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_ALLOW, allow) @@ -426,7 +435,11 @@ func (s *IcsSession) PassInvite(sip *icspacketparser.SIP) *icserror.IcsError { reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTENT_LENGTH, sdpLength) reqInvite.AddSIPHeader(sipasm.ICSSIP_HEADER_TERMINATOR) - l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "sip 내용 전달! %+v", sip) + l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Send INVITE! [%s] -> [%s] \r\n %+v\r\n", + (*s.sipNeter).LocalAddr().String(), + (*s.sipNeter).RemoteAddr().String(), + reqInvite) + // sendINVITE := fmt.Sprintf("%+v",sip) wlen, werr := (*s.sipNeter).WriteSIP([]byte(reqInvite.String())) if werr != nil { @@ -436,8 +449,18 @@ func (s *IcsSession) PassInvite(sip *icspacketparser.SIP) *icserror.IcsError { } fmt.Println(wlen) - - s.RemoveSession() + s.InviteSIP = nil + s1 := icspacketparser.NewSIP() + err := s1.SipParser([]byte(reqInvite.String())) + if err != nil { + fmt.Printf("########### ererererrererer %s \r\n %+v\r\n", reqInvite.String(), s.InviteSIP) + } else { + s.InviteSIP = &s1 + fmt.Printf("########### %+v\r\n",s1) + fmt.Printf("########### %s, \r\n %+v\r\n",reqInvite.String(), s.InviteSIP) + } + + // s.RemoveSession() return nil } @@ -808,7 +831,7 @@ func (s *IcsSession) ProcInvite(sip *icspacketparser.SIP) *icserror.IcsError { func (s *IcsSession) ProcACKInvite(sip *icspacketparser.SIP) *icserror.IcsError { l := icslog.GetIcsLog() conf := icsconf.GetIcsConfig() - s.InviteSIP = sip + // s.InviteSIP = sip /////////////////////////////////////////// /////////////////////////////////////////// @@ -1153,7 +1176,6 @@ func (s *IcsSession) ProcBye(sip *icspacketparser.SIP) *icserror.IcsError { ///////////////////////////////////////////// //set call signal addr // fmt.Println(s) - fmt.Println(s) csraddr := icsnet.NewNetAddrWithIPPort(s.AgentInfo.IP, s.AgentInfo.Port) //csladdr := icsnet.NewNetAddrWithIPPort(conf.VoiceAgentConfig.MyAddr.ServerIP, conf.VoiceAgentConfig.MyAddr.ServerPort) /* @@ -1244,10 +1266,11 @@ func (s *IcsSession) SendRequestInvite() { fmt.Printf("Send Call Start Sip(%s) count %d!!!!!!!", s.AgentName, s.simLoopCount) if s.simLoopCount < conf.SimLoopCount { l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Send Call Start Sip(%s) count %d!!!!!!!\r\n", s.AgentName, s.simLoopCount) + time.Sleep(time.Second*1) s.RequestInvite("01024342788") s.simLoopCount += 1 } else { - l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Send Call Start Sip(%s) END!!!!!!!\r\n", s.AgentName, s.simLoopCount) + l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Send Call Start Sip(%s) END %d !!!!!!!\r\n", s.AgentName, s.simLoopCount) } } @@ -1994,28 +2017,34 @@ func (s *IcsSession) RequestBYE(inviteSIP *icspacketparser.SIP) { port := conf.SIPConfig.Port transport := conf.SIPConfig.Transport fmt.Println(">>>contact", inviteSIP.Contact) - contactName1 := strings.SplitN(inviteSIP.Contact, "sip:", 2) - contactName := strings.SplitN(contactName1[1], "@", 2) + // contactName1 := strings.SplitN(inviteSIP.Contact, "sip:", 2) + // contactName := strings.SplitN(contactName1[1], "@", 2) optfunc := func() { - optMethod := fmt.Sprintf("sip:%s@%s;transport=%s", contactName[0], conf.SIPConfig.SIPProxy, transport) + optMethod := fmt.Sprintf("sip:%s@%s;transport=%s", "AISB", conf.SIPConfig.SIPProxy, transport) reqOpt := sipasm.NewSIPMessage(sipasm.ICSSIP_METHOD_BYE, optMethod) via := fmt.Sprintf("SIP/2.0/UDP %s:%d;branch=%s", ip, port, sipasm.GenerateBranch()) maxforwards := "70" - from := strings.SplitN(inviteSIP.From, ": ", 2) + from := fmt.Sprintf(";tag=%s", "AISB", ip, sipasm.GenerateTag()) + // from := strings.SplitN(inviteSIP.From, ": ", 2) //from := fmt.Sprintf(";tag=%s", s.AgentName, ip, sipasm.GenerateTag()) - s.uri = fmt.Sprintf("sip:%s@%s", s.AgentName, ip) + s.uri = fmt.Sprintf("sip:%s@%s", "AISB", ip) l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "Set URI [%s]", s.uri) - to := strings.SplitN(inviteSIP.To, ": ", 2) + to := fmt.Sprintf("", "01024342788", ip) + if s.InviteSIP != nil { + from = s.InviteSIP.From + to = s.InviteSIP.To + } + // to := strings.SplitN(inviteSIP.To, ": ", 2) //to := fmt.Sprintf("", s.AgentName, ip) callid := inviteSIP.GetCallID() cseq := fmt.Sprintf("%d BYE", s.Cseq) s.Cseq++ //referto := fmt.Sprintf("") - contact := fmt.Sprintf("", s.AgentName, ip, port, transport) + contact := fmt.Sprintf("", "AISB", ip, port, transport) userAgent := conf.InfoConfig.Product allow := "REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE" supported := "timer,path,replaces" @@ -2023,8 +2052,8 @@ func (s *IcsSession) RequestBYE(inviteSIP *icspacketparser.SIP) { reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_VIA, via) reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_MAX_FORWARDS, maxforwards) - reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_FROM, to[0]) - reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_TO, from[0]) + reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_FROM, to) + reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_TO, from) reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_CALL_ID, callid) reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_CSEQ, cseq) reqOpt.AddSIPHeader(sipasm.ICSSIP_HEADER_CONTACT, contact) diff --git a/icssessionmanager/csprocessor.go b/icssessionmanager/csprocessor.go index a743f56..9e8feaf 100644 --- a/icssessionmanager/csprocessor.go +++ b/icssessionmanager/csprocessor.go @@ -38,6 +38,7 @@ func (s *IcsSession) Processing(sip *parser.SIP) *icserror.IcsError { case parser.ICS_SIP_METHOD_INFO: case parser.ICS_SIP_METHOD_UPDATE: case parser.ICS_SIP_METHOD_REFER: + s.RequestBYE(s.InviteSIP) case parser.ICS_SIP_METHOD_SUBSCRIBE: case parser.ICS_SIP_METHOD_MESSAGE: case parser.ICS_SIP_METHOD_NOTIFY: @@ -45,7 +46,7 @@ func (s *IcsSession) Processing(sip *parser.SIP) *icserror.IcsError { case parser.ICS_SIP_METHOD_PRACK: case parser.ICS_SIP_METHOD_ACK: l.Printf(icslog.LOG_LEVEL_INFO, s.ID, "ACK - %+v", sip) - s.InviteSIP = sip + // s.InviteSIP = sip if s.GetAgentStatus() == STATUS_AGENT_CALLING { s.SetAgentStatus(STATUS_AGENT_BUSY) diff --git a/icssessionmanager/icssipautomata.go b/icssessionmanager/icssipautomata.go index 4d16fbd..aa46095 100644 --- a/icssessionmanager/icssipautomata.go +++ b/icssessionmanager/icssipautomata.go @@ -15,6 +15,7 @@ const ( ICS_SIP_AUTOMATA_BYE = 32767 ICS_SIP_AUTOMATA_NOTIFY = 32767 ICS_SIP_AUTOMATA_OPTIONS = 32767 + ICS_SIP_AUTOMATA_REFER = 32767 /* ICS_SIP_AUTOMATA_INVITE = 11266 ICS_SIP_AUTOMATA_ACK = 32767 @@ -42,7 +43,7 @@ const ( ) func SessionAvailableSipMethod(sip *icspacketparser.SIP) bool { - if sip.Method == icspacketparser.ICS_SIP_METHOD_INVITE || sip.Method == icspacketparser.ICS_SIP_METHOD_CANCEL || sip.Method == icspacketparser.ICS_SIP_METHOD_BYE || sip.Method == icspacketparser.ICS_SIP_METHOD_ACK || sip.Method == icspacketparser.ICS_SIP_METHOD_NOTIFY { + if sip.Method == icspacketparser.ICS_SIP_METHOD_INVITE || sip.Method == icspacketparser.ICS_SIP_METHOD_CANCEL || sip.Method == icspacketparser.ICS_SIP_METHOD_BYE || sip.Method == icspacketparser.ICS_SIP_METHOD_ACK || sip.Method == icspacketparser.ICS_SIP_METHOD_NOTIFY || sip.Method == icspacketparser.ICS_SIP_METHOD_REFER { return true } else if sip.Method == icspacketparser.ICS_SIP_METHOD_SIP20 { if strings.Contains(sip.Cseq, " INVITE") || strings.Contains(sip.Cseq, " CANCEL") || strings.Contains(sip.Cseq, " BYE") || strings.Contains(sip.Cseq, " ACK") || strings.Contains(sip.Cseq, " REGISTER") || strings.Contains(sip.Cseq, " OPTIONS") { @@ -104,6 +105,8 @@ func GetJobType(sip *icspacketparser.SIP) int { return ICS_SIP_JOB_TYPE_ACK } else if sip.Method == icspacketparser.ICS_SIP_METHOD_NOTIFY { return ICS_SIP_JOB_TYPE_NOTIFY + } else if sip.Method == icspacketparser.ICS_SIP_METHOD_REFER { + return ICS_SIP_JOB_TYPE_REFER } return -1 } @@ -127,6 +130,8 @@ func (s *IcsSession) SetSessionMethod(sip icspacketparser.SIP) { s.MethodAutomata = ICS_SIP_AUTOMATA_ACK } else if strings.Contains(sip.Cseq, " OPTIONS") { s.MethodAutomata = ICS_SIP_AUTOMATA_OPTIONS + } else if strings.Contains(sip.Cseq, " REFER") { + s.MethodAutomata = ICS_SIP_AUTOMATA_REFER } } else if sip.Method == icspacketparser.ICS_SIP_METHOD_REGISTER { s.MethodAutomata = ICS_SIP_AUTOMATA_REGISTER @@ -140,5 +145,7 @@ func (s *IcsSession) SetSessionMethod(sip icspacketparser.SIP) { s.MethodAutomata = ICS_SIP_AUTOMATA_ACK } else if sip.Method == icspacketparser.ICS_SIP_METHOD_NOTIFY { s.MethodAutomata = ICS_SIP_AUTOMATA_NOTIFY + } else if sip.Method == icspacketparser.ICS_SIP_METHOD_REFER { + s.MethodAutomata = ICS_SIP_AUTOMATA_REFER } } diff --git a/icssessionmanager/sessionoperator.go b/icssessionmanager/sessionoperator.go index dbcf516..3b7d068 100644 --- a/icssessionmanager/sessionoperator.go +++ b/icssessionmanager/sessionoperator.go @@ -86,7 +86,7 @@ func findSessionWithSessionStatus(callID string) *IcsSession { session.m.Lock() fmt.Println(session.AgentName, session.agentStatus) if strings.Compare(conf.AgentConfig[idx].Value, "true") == 0 && session.agentStatus == 64 { - session.callID = callID + // session.callID = callID session.m.Unlock() return session } @@ -164,15 +164,17 @@ func FindSession(data interface{}) (*IcsSession, *icserror.IcsError) { } */ - if conf.Representative.Value && sip.Method == icspacketparser.ICS_SIP_METHOD_SIP20 && strings.SplitN(sip.Cseq, " ", 2)[1] == "INVITE" { + // if conf.Representative.Value && sip.Method == icspacketparser.ICS_SIP_METHOD_SIP20 && strings.SplitN(sip.Cseq, " ", 2)[1] == "INVITE" { + if conf.Representative.Value && sip.Method == icspacketparser.ICS_SIP_METHOD_INVITE { // invite, botstatus if len(agentname) > 0 { l.Printf(icslog.LOG_LEVEL_DEBUG2, -1, "FindSession>findSessionWithAgentName> agent name[%s]", agentname) - session := findSessionWithSessionStatus(callID) + // session := findSessionWithCallID(callID) + session := findSessionWithSessionStatus(callID) // 대표번호 agentname if session != nil { return session, nil } } - } else { + } else if conf.Representative.Value && sip.Method == icspacketparser.ICS_SIP_METHOD_SIP20 && strings.SplitN(sip.Cseq, " ", 2)[1] == "INVITE" { // callid if len(callID) > 0 { l.Printf(icslog.LOG_LEVEL_DEBUG2, -1, "FindSession>findSessionWithCallID> callid [%s]", callID) session := findSessionWithCallID(callID) @@ -180,13 +182,21 @@ func FindSession(data interface{}) (*IcsSession, *icserror.IcsError) { return session, nil } } - if len(agentname) > 0 { - l.Printf(icslog.LOG_LEVEL_DEBUG2, -1, "FindSession>findSessionWithAgentName> agent name[%s]", agentname) - session := findSessionWithAgentName(agentname) + } else { + if len(callID) > 0 { + l.Printf(icslog.LOG_LEVEL_DEBUG2, -1, "FindSession>findSessionWithCallID> callid [%s]", callID) + session := findSessionWithCallID(callID) if session != nil { return session, nil } } + // if len(agentname) > 0 { + // l.Printf(icslog.LOG_LEVEL_DEBUG2, -1, "FindSession>findSessionWithAgentName> agent name[%s]", agentname) + // session := findSessionWithAgentName(agentname) + // if session != nil { + // return session, nil + // } + // } if len(uri) > 0 { l.Printf(icslog.LOG_LEVEL_DEBUG2, -1, "FindSession>findSessionWithFromURI> uri [%s]", uri) //fmt.Println("findsession", uri) @@ -376,7 +386,7 @@ func (s *IcsSession) RemoveSession() *icserror.IcsError { s.txSeq = -1 s.rxSeq = -1 s.MethodAutomata = 32767 - s.referto = "" + // s.referto = "" s.SetAgentStatus(STATUS_AGENT_READY) s.SetRegisterStatus(STATUS_REGISTER_READY) fmt.Println("REMOVE SESSION STATUS: ", s.GetAgentStatus()) diff --git a/sipasm/siptemplt.go b/sipasm/siptemplt.go index 42cecbe..3b78acd 100644 --- a/sipasm/siptemplt.go +++ b/sipasm/siptemplt.go @@ -44,6 +44,7 @@ const ( ICSSIP_HEADER_CALL_ID ICSSIP_HEADER_CSEQ ICSSIP_HEADER_CONTACT + ICSSIP_HEADER_XAICALL ICSSIP_HEADER_ACCEPT ICSSIP_HEADER_ACCEPT_ENCODING ICSSIP_HEADER_ACCEPT_LANGUAGE @@ -180,6 +181,7 @@ func initHeaderString() { ICSSIP_HEADER_STRING[ICSSIP_HEADER_CALL_ID] = "Call-ID: %s\r\n" ICSSIP_HEADER_STRING[ICSSIP_HEADER_CALL_INFO] = "Call-Info: %s\r\n" ICSSIP_HEADER_STRING[ICSSIP_HEADER_CONTACT] = "Contact: %s\r\n" + ICSSIP_HEADER_STRING[ICSSIP_HEADER_XAICALL] = "X-AICALL: %s\r\n" ICSSIP_HEADER_STRING[ICSSIP_HEADER_CONTENT_DISPOSITION] = "Content-Disposition: %s\r\n" ICSSIP_HEADER_STRING[ICSSIP_HEADER_CONTENT_ENCODING] = "Content-Encoding: %s\r\n" ICSSIP_HEADER_STRING[ICSSIP_HEADER_CONTENT_LANGUAGE] = "Content-Language: %s\r\n" @@ -230,6 +232,7 @@ func initHeaderString() { ICSSIP_HEADER_STRING2TYPE["CALL-ID"] = ICSSIP_HEADER_CALL_ID ICSSIP_HEADER_STRING2TYPE["CALL-INFO"] = ICSSIP_HEADER_CALL_INFO ICSSIP_HEADER_STRING2TYPE["CONTACT"] = ICSSIP_HEADER_CONTACT + ICSSIP_HEADER_STRING2TYPE["XAICALL"] = ICSSIP_HEADER_XAICALL ICSSIP_HEADER_STRING2TYPE["CONTENT-DISPOSITION"] = ICSSIP_HEADER_CONTENT_DISPOSITION ICSSIP_HEADER_STRING2TYPE["CONTENT-ENCODING"] = ICSSIP_HEADER_CONTENT_ENCODING ICSSIP_HEADER_STRING2TYPE["CONTENT-LANGUAGE"] = ICSSIP_HEADER_CONTENT_LANGUAGE