Hello,

I think Raphael meant to do it like this:

Author: sayer
Date: 2008-05-06 11:02:07 +0200 (Tue, 06 May 2008)
New Revision: 932

Modified:
    trunk/core/AmSession.cpp
Log:
trying content_type directly for DTMF, as reported by Alex Gradinar

Modified: trunk/core/AmSession.cpp
===================================================================
--- trunk/core/AmSession.cpp    2008-05-06 00:25:51 UTC (rev 931)
+++ trunk/core/AmSession.cpp    2008-05-06 09:02:07 UTC (rev 932)
@@ -582,7 +582,8 @@

    } else if( req.method == "INFO" ){

-    if ((strip_header_params(getHeader(req.hdrs, "Content-Type"))
+    if ((req.content_type == "application/dtmf-relay") ||
+       (strip_header_params(getHeader(req.hdrs, "Content-Type"))
         =="application/dtmf-relay")||
        (strip_header_params(getHeader(req.hdrs, "c"))
         =="application/dtmf-relay")){

Does this fix DTMF with INFO?

Stefan

Alex Gradinar wrote:
> Are you going to fix this bug?
> Two weeks have pasted and nothing has been done to fix this bug.
> 
> Best regards,
> Alex Gradinar
> 
> ----- Original Message ----- 
> From: "Alex Gradinar" <[EMAIL PROTECTED]>
> To: "Raphael Coeffic" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, April 23, 2008 5:38 PM
> Subject: Re: [Semsdev] SipCtrlInterface & Content-Type:application/dtmf-relay
> 
> 
> Hi, Raphael,
> 
> You are right.
> I've done a new patch.
> SipCtrlInterface::handle_sip_request sets req.content_type.
> AmSession::onSipRequest uses req.content_type if req.content_type is set,
> if not it uses req.hdrs.
> 
> And I think AmSession::onSipRequest should reply error if 
> content_type!="application/dtmf-relay" to avoid retransmission.
> 
> Best regards,
> Alex Gradinar
> 
> 
> ----- Original Message ----- 
> From: "Raphael Coeffic" <[EMAIL PROTECTED]>
> To: "Alex Gradinar" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, April 22, 2008 5:48 PM
> Subject: Re: [Semsdev] SipCtrlInterface & Content-Type:application/dtmf-relay
> 
> 
>> Hi Alex,
>>
>> thanks for your patch. Actually, i tried to move this item to 
>> [req|reply].content_type, to avoid everybody parsing this item each 
>> time, whereby it is already parsed. So i think that the correct fix 
>> would be that onSipRequest first checks it the content-type is set in 
>> the right field. If not, then it could parse the hdrs field as usual.
>>
>> Unfortunatly, i noticed that the new field is far from being used 
>> everywhere... So we may need to check some more places where this should 
>> be also changed.
>>
>> Cheers
>> Raphael.
>>
>> Alex Gradinar wrote:
>>> Hi,
>>>
>>> I've found a bug in the latest trunk of sems.
>>> If DTMF is sent with SIP message INFO the sems doesn't corretly process SIP 
>>> message.
>>> Because in AmSession::onSipRequest it tries to get "Content-Type" header 
>>> from req.hdrs,
>>> but SipCtrlInterface doesn't add "Content-Type" header  to req.hdrs in 
>>> SipCtrlInterface::handle_sip_request.
>>>
>>> I've fixed it... see my path
>>>
>>> Best regards,
>>> Alex Gradinar
>>>   
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Semsdev mailing list
>>> [email protected]
>>> http://lists.iptel.org/mailman/listinfo/semsdev
>>>   
>> _______________________________________________
>> Semsdev mailing list
>> [email protected]
>> http://lists.iptel.org/mailman/listinfo/semsdev
> 
> 
> --------------------------------------------------------------------------------
> 
> 
>> _______________________________________________
>> Semsdev mailing list
>> [email protected]
>> http://lists.iptel.org/mailman/listinfo/semsdev
>>
> _______________________________________________
> Semsdev mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/semsdev

-- 
Stefan Sayer
VoIP Services

[EMAIL PROTECTED]
www.iptego.com

iptego GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to