[OpenSIPS-Users] dialog - failed to get From header

Jeff Pyle jpyle at fidelityvoice.com
Thu Dec 3 19:51:51 CET 2009


Bogdan,

I manually updated the source file and recompiled.  I'm now seeing the
Call-id in the error output.  But, when I look at all the packets of the
Call-id, each has a tag in the From header.  The tag is the same in each
case, per Call-id.

Not sure where to go from here.


- Jeff



On 12/2/09 9:32 PM, "Jeff Pyle" <jpyle at fidelityvoice.com> wrote:

> Hi Bogdan,
> 
> I got some errors when I tried patching this time:
> 
> (Stripping trailing CRs from patch.)
> patching file modules/dialog/dlg_handlers.c
> Hunk #1 FAILED at 681.
> 1 out of 1 hunk FAILED -- saving rejects to file
> modules/dialog/dlg_handlers.c.rej
> 
> modules/dialog/dlg_handlers.c.rej contains:
> 
> ***************
> *** 681,687 ****
>       }
>   
>       if (parse_from_header(req)<0 || get_from(req)->tag_value.len==0) {
> -         LM_ERR("failed to get From header\n");
>           return -1;
>       }
>   
> --- 681,690 ----
>       }
>   
>       if (parse_from_header(req)<0 || get_from(req)->tag_value.len==0) {
> +         LM_ERR("failed to get From header (hdr=%p,parsed=%p,tag_len=%d) "
> +             "callid=<%.*s>\n", req->from,
> req->from?req->from->parsed:NULL,
> +             
> req->from?(req->from->parsed?get_from(req)->tag_value.len:0):0,
> +             req->callid->body.len, req->callid->body.s);
>           return -1;
>       }
> 
> 
> I'm attempting to patch this against 1.5.3.  I put the dlg_handlers.c.orig
> back in place before attempting this patch.
> 
> Not sure where to go from here.
> 
> 
> - Jeff
> 
> 
> 
> 
> On 12/2/09 10:32 AM, "Jeff Pyle" <jpyle at fidelityvoice.com> wrote:
> 
>> Hi Bogdan,
>> 
>> With the callid I should be able to find at least the correct dialog in
>> sip_trace, but printing the From header would be helpful as well.  I'll wait
>> to receive your reply before I apply this patch.  Regardless I won't be able
>> to restart the proxy until this evening when the traffic subsides.
>> 
>> 
>> Thanks,
>> Jeff
>> 
>> 
>> 
>> On 12/2/09 10:25 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>> 
>>> Hi Jeff,
>>> 
>>> The message says you have a FROM hdr with no TAG parameter :)..
>>> 
>>> For printing the callid - there was mistake in my patch - attached is
>>> the correct new version
>>> 
>>> Do you think that printing the FROM hdr will help ?
>>> 
>>> Regards,
>>> Bogdan
>>> 
>>> Jeff Pyle wrote:
>>>> An error with the patch loaded:
>>>> 
>>>> ERROR:dialog:pre_match_parse: failed to get From header
>>>> (hdr=0x81c4598,parsed=0x81c55b8,tag_len=0) callid=<
>>>> 
>>>> There might have been a closing > on the callid (terminal wrap problem),
>>>> but
>>>> there definitely isn't anything between them.
>>>> 
>>>> 
>>>> - Jeff
>>>> 
>>>> 
>>>> 
>>>> On 12/1/09 6:17 PM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>>>> 
>>>>   
>>>>> Alex, Jeff,
>>>>> 
>>>>> try the attached patch - it should provide more info about the failing
>>>>> FROM parsing.
>>>>> 
>>>>> Regards,
>>>>> Bogdan
>>>>> 
>>>>> Alex Massover wrote:
>>>>>     
>>>>>> Hi Bogdan,
>>>>>> 
>>>>>> We experience the same thing under the same conditions (big amount of
>>>>>> traffic
>>>>>> and rare errors):
>>>>>> 
>>>>>> Oct 27 06:18:05 ser10 /usr/sbin/opensips[2802]:
>>>>>> ERROR:dialog:pre_match_parse:
>>>>>> failed to get From header
>>>>>> Oct 27 06:18:05 ser10 /usr/sbin/opensips[2802]: ERROR:uac:restore_from:
>>>>>> new
>>>>>> URI shorter than old URI
>>>>>> Oct 27 06:18:09 ser10 /usr/sbin/opensips[2854]:
>>>>>> ERROR:dialog:pre_match_parse:
>>>>>> failed to get From header
>>>>>> Oct 27 06:18:09 ser10 /usr/sbin/opensips[2854]: ERROR:uac:restore_from:
>>>>>> new
>>>>>> URI shorter than old URI
>>>>>> 
>>>>>> 
>>>>>> I think it's good idea to include at least Call-ID in error messages in
>>>>>> general.
>>>>>> 
>>>>>> Currently errors format is OpenSIPS suitable for the developer that makes
>>>>>> a
>>>>>> single call and wants to debug it.
>>>>>> But is not so friendly for the production environment with big amount of
>>>>>> traffic. Although I have all SIP traces it's impossible to find that
>>>>>> specific
>>>>>> call without any reference.
>>>>>> 
>>>>>> --
>>>>>> Best Regards,
>>>>>> Alex Massover
>>>>>> VoIP R&D TL
>>>>>> Jajah Inc.
>>>>>> 
>>>>>>   
>>>>>>       
>>>>>>> -----Original Message-----
>>>>>>> From: users-bounces at lists.opensips.org [mailto:users-
>>>>>>> bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
>>>>>>> Sent: Tuesday, November 24, 2009 8:35 AM
>>>>>>> To: OpenSIPS users mailling list
>>>>>>> Subject: Re: [OpenSIPS-Users] dialog - failed to get From header
>>>>>>> 
>>>>>>> Hi Jeff,
>>>>>>> 
>>>>>>> Do you think it will help if I send you a small patch to explicitly log
>>>>>>> the error case and the FROM header?
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Bogdan
>>>>>>> 
>>>>>>> Jeff Pyle wrote:
>>>>>>>     
>>>>>>>         
>>>>>>>> Hi Bogdan,
>>>>>>>> 
>>>>>>>> There were no previous errors.  So I can only conclude it's the
>>>>>>>>       
>>>>>>>>           
>>>>>>> second.
>>>>>>>     
>>>>>>>         
>>>>>>>> Unfortunately I have a substantial amount of traffic flowing through
>>>>>>>>       
>>>>>>>>           
>>>>>>> this
>>>>>>>     
>>>>>>>         
>>>>>>>> proxy and this error pops up so infrequently I don't have a trace to
>>>>>>>> reference.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> - Jeff
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 11/23/09 4:23 PM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro>
>>>>>>>>       
>>>>>>>>           
>>>>>>> wrote:
>>>>>>>     
>>>>>>>         
>>>>>>>>       
>>>>>>>>           
>>>>>>>>> Hi Jeff,
>>>>>>>>> 
>>>>>>>>> This error is generated in two cases:
>>>>>>>>>     1) FROM hdr failed - you should see some previous related errors
>>>>>>>>> 
>>>>>>>>>     2) there is no TAG param for the FROM hdr
>>>>>>>>> 
>>>>>>>>> I guess it is the second .... Could you confirm?
>>>>>>>>> 
>>>>>>>>> Regards,
>>>>>>>>> Bogdan
>>>>>>>>> 
>>>>>>>>> Jeff Pyle wrote:
>>>>>>>>> 
>>>>>>>>>         
>>>>>>>>>          
>>>>>>>>>> Hello,
>>>>>>>>>> 
>>>>>>>>>> I'm seeing messages like this from time to time on Opensips 1.5.3:
>>>>>>>>>> 
>>>>>>>>>>   ERROR:dialog:pre_match_parse: failed to get From header
>>>>>>>>>> 
>>>>>>>>>> My dialog config is as follows:
>>>>>>>>>> 
>>>>>>>>>> modparam("dialog", "dlg_flag", 4)
>>>>>>>>>> modparam("dialog", "dlg_match_mode", 2)
>>>>>>>>>> modparam("dialog", "db_url", [functioning db_uri])
>>>>>>>>>> modparam("dialog", "db_mode", 1)
>>>>>>>>>> modparam("dialog", "profiles_with_value", "inbound; outbound")
>>>>>>>>>> 
>>>>>>>>>> This proxy took over for an old Openser 1.3.2 box who didn't
>>>>>>>>>>         
>>>>>>>>>>         
>>>>>>> complain about
>>>>>>>     
>>>>>>>         
>>>>>>>>>> any From header problems.  I can't imagine I'm receiving INVITEs
>>>>>>>>>>         
>>>>>>>>>>         
>>>>>>> without
>>>>>>>     
>>>>>>>         
>>>>>>>>>>> From headers.  Unfortunately it's too sporadic to enable full
>>>>>>>>>>>        
>>>>>>>>>>>        
>>>>>>> debugging.
>>>>>>>     
>>>>>>>         
>>>>>>>>>> Any thoughts?
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Thanks,
>>>>>>>>>> Jeff
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>>         
>>>>>>>>>>         
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>> 
>>>>   
>>> 
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list