<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
thanks for reporting and troubleshooting. I pushed the fix to master
and 4.2 branches.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 07/04/15 12:22, <a class="moz-txt-link-abbreviated" href="mailto:schwatzi@web.de">schwatzi@web.de</a>
wrote:<br>
</div>
<blockquote cite="mid:5523AFEE.3020606@web.de" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
Hi. <br>
<br>
I think there is a bug in function search_hf_f() in textops.c<br>
<br>
Here is what I do<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
if ( method == SUBSCRIBE ) {<br>
if ( !search_hf("Event", "call-completion", "f") )
{ <br>
sl_send_reply("489","Bad Event");<br>
exit;<br>
}<br>
}<br>
<br>
But here is a SUBSCRIBE that do pass the proxy.<br>
<br>
<br>
SUBSCRIBE <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="sip:101@192.168.1.50">sip:101@192.168.1.50</a> SIP/2.0<br>
Via: SIP/2.0/UDP
77.10.66.72:59793;branch=z9hG4bKPj.O5IXVtDsImPNfCGnDkvj91INsEfvZsm<br>
Max-Forwards: 70<br>
From: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:101@192.168.1.50"><sip:101@192.168.1.50></a>;tag=8-cXkrmwx5WGSIAYgYaXW0oTTsEAEM1S<br>
To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:101@192.168.1.50"><sip:101@192.168.1.50></a><br>
Contact: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:101@192.168.1.8:59793;ob"><sip:101@192.168.1.8:59793;ob></a><br>
Call-ID: O12dPIx7Wiih2b.o36UFmMdXr6RE-8Jl<br>
CSeq: 24359 SUBSCRIBE<br>
Route: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:192.168.1.50;transport=udp;lr"><sip:192.168.1.50;transport=udp;lr></a><br>
Event: message-summary<br>
Expires: 3600<br>
Supported: replaces, 100rel, timer, norefersub<br>
Accept: application/simple-message-summary<br>
Allow-Events: presence, message-summary, refer<br>
User-Agent: CSipSimple_mako-21/r2457<br>
Content-Length: 0<br>
<br>
<br>
As you can see the Event header doesn't contain
"call-completition".<br>
<br>
<br>
Looking at function search_hf_f() i saw that if nothing is found
value -1 will be returned. if there is the match then 1 is
returned. (see line 2779 and 2797)<br>
But in line 2782 the function will return 1 instead of -1<br>
<br>
<br>
index 50a6f07..a945937 100644<br>
--- a/modules/textops/textops.c<br>
+++ b/modules/textops/textops.c<br>
@@ -2779,7 +2779,7 @@ static int search_hf_f(struct sip_msg* msg,
char* str_hf, char* re, char *flags)<br>
return 1;<br>
} else {<br>
if(flags!=NULL &&
*flags=='f')<br>
- return 1;<br>
+ return -1;<br>
}<br>
} else {<br>
hfl = hf;<br>
<br>
<br>
I am no programmer so it's possible that I misunderstood
something.<br>
<br>
<br>
greetz<br>
Paolo<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
</body>
</html>