MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / parse_dlg

Function parse_dlg

modules/tm/t_lookup.c:178–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176
177
178static inline int parse_dlg( struct sip_msg *msg )
179{
180 if (parse_headers(msg, HDR_FROM_F | HDR_CSEQ_F | HDR_TO_F, 0)==-1) {
181 LM_ERR("From or Cseq or To invalid\n");
182 return 0;
183 }
184 if ((msg->from==0)||(msg->cseq==0)||(msg->to==0)) {
185 LM_ERR("missing From or Cseq or To\n");
186 return 0;
187 }
188
189 if (parse_from_header(msg)<0) {
190 LM_ERR("From broken\n");
191 return 0;
192 }
193 /* To is automatically parsed through HDR_TO in parse bitmap,
194 * we don't need to worry about it now
195 if (parse_to_header(msg)==-1) {
196 LM_ERR("To broken\n");
197 return 0;
198 }
199 */
200 return 1;
201}
202
203/* is the ACK (p_msg) in p_msg dialog-wise equal to the INVITE (t_msg)
204 * except to-tags? */

Callers 1

matching_3261Function · 0.85

Calls 1

parse_from_headerFunction · 0.85

Tested by

no test coverage detected