Hi

For me it's look like obviously fragmentation issue - you get decoupled parts of one large message. You can check via tcpdump IP headers correctly formatted. Try to make messages smaller or/and switch to TCP.

On 23/08/18 17:25, Abdul Basit wrote:
I upgraded home proxy server opensips just in case it may help resolving the issues.

# opensips -V
version: *opensips 2.4.2* (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
main.c compiled on  with gcc 6.3.0

But result is same. I am continuously getting parse_mgs errors.
any idea about fixation of the issue?

--
regards,

abdul basit


On Thu, 23 Aug 2018 at 16:52, Abdul Basit <[email protected] <mailto:[email protected]>> wrote:

    Hi Alain Bieuzent,

    I added sip msg validate code in start of main route but i didn't
    get these additional log lines.
    Still getting messages from opensips core:

    Aug 23 13:22:24 homer-proxy /usr/sbin/opensips[25568]:
    ERROR:core:receive_msg: Unable to parse msg received from
    [x.x.x.x:61648]
    Aug 23 13:22:27 homer-proxy /usr/sbin/opensips[25568]:
    ERROR:core:parse_msg:
    message=<nch=z9hG4bKac1737859538;alias#015#012Max-Forwards:
    70#015#012From: <sip:[email protected]>;tag=1c1737546331#015#012To:
    <sip:[email protected]>#015#012Call-ID: [email protected]#015#012CSeq:
    63697 REGISTER#015#012Authorization: Digest
    
username="yyyyyy",realm="x.x.x.x",nonce="5b7e99110000db6acf694065c578ff32fa51ce24bb374d67",uri="sip:x.x.x.x",algorithm=MD5,response="debec3f66d2ac1ec488138871ffa1d60"#015#012Contact:
    <sip:[email protected];transport=tcp>;expires=360#015#012Supported:
    em,timer,replaces,path,resource-priority#015#012Allow:
    
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
    360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
    FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

    Hi Bogdan,

    Yes, I did it as per cfg in shared link. But again i am getting the
    parse error messages. Looks like request is initiating from some
    buggy sip client.

    Aug 23 13:43:39 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_first_line: bad request first line
    Aug 23 13:43:39 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_first_line: at line 0 char 34:
    Aug 23 13:43:39 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_first_line: parsed so far: AudiocodesGW 1372031417
    1372031297
    Aug 23 13:43:39 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_msg: message=<AudiocodesGW 1372031417 1372031297 IN
    IP4 x.x.x.x#015#012s=Phone-Call#015#012c=IN IP4 x.x.x.x#015#012t=0
    0#015#012m=audio 6070 RTP/AVP 8 96#015#012a=rtpmap:8
    PCMA/8000#015#012a=rtpmap:96 telephone-event/8000#015#012a=fmtp:96
    0-15#015#012a=ptime:20#015#012a=sendrecv#015#012a=rtcp:6071 IN
    IP4 x.x.x.x#015#012>
    Aug 23 13:43:39 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:receive_msg: Unable to parse msg received from
    [x.x.x.x:64443]
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_to_param: unexpected char [C] in status 13:
    <<;tag=#015#012>> .
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_to: unexpected end of header in state 13
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:get_hdr_field: bad to header
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_to_param: unexpected char [C] in status 13:
    <<;tag=#015#012>> .
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:parse_to: unexpected end of header in state 13
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:core:get_hdr_field: bad to header
    Aug 23 13:43:40 homer-proxy /usr/sbin/opensips[26027]:
    ERROR:tm:t_check: reply cannot be parsed

    The impact I am getting is the homer UI is not showing complete sip
    ladder.
    --
    regards,

    abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445


    On Thu, 9 Aug 2018 at 19:02, Bogdan-Andrei Iancu
    <[email protected] <mailto:[email protected]>> wrote:

        Hi Abdul,

        have you checked the tutorial on HEP switching ?
        https://blog.opensips.org/2017/10/12/opensips-as-hep-proxyswitch/

        Maybe you are using the wrong routes in the script.

        Regards,

        Bogdan-Andrei Iancu

        OpenSIPS Founder and Developer
           http://www.opensips-solutions.com
        OpenSIPS Bootcamp 2018
           http://opensips.org/training/OpenSIPS_Bootcamp_2018/

        On 08/09/2018 04:40 PM, Abdul Basit wrote:
        Hi Alain,

        Thank you for your suggestion.
        I will update cfg and get back with results.

        Do i need to upgrade opensips to 2.4 as well?

        --
        regards,

        abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445


        On Thu, 9 Aug 2018 at 17:35, Alain Bieuzent
        <[email protected] <mailto:[email protected]>> wrote:

            Hi Abdul,

            try to add this part of code at the begining of your
            routing code to add more logs :

            if(!sipmsg_validate(""))

                {

            xlog("L_WARN", "Dropping mal formed Messages Retcode :
            $retcode ");

            xlog("L_WARN","--- error from [$si:$sp]\n+++++\n$mb\n++++\n");

                    exit;

                }

            then you can find the retcode value there :
            
http://www.opensips.org/html/docs/modules/2.4.x/sipmsgops.html#func_sipmsg_validate

            *De : *Users <[email protected]
            <mailto:[email protected]>> au nom de Abdul
            Basit <[email protected] <mailto:[email protected]>>
            *Répondre à : *OpenSIPS users mailling list
            <[email protected] <mailto:[email protected]>>
            *Date : *jeudi 9 août 2018 à 14:18
            *À : *OpenSIPS users mailling list
            <[email protected] <mailto:[email protected]>>
            *Objet : *[OpenSIPS-Users] OpenSIPS Unable to parse msg
            received from

            Hi Team,

            I am using opensips as hep proxy to distribute traffic to
            multiple homer noes for trace capturing.

            # opensips -V

            version: opensips 2.3.2 (x86_64/linux)

            flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP,
            PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT

            ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144,
            MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535

            poll method support: poll, epoll_lt, epoll_et, sigio_rt,
            select.

            main.c compiled on  with gcc 6.3.0

            Host operating system is

            # lsb_release -a

            No LSB modules are available.

            Distributor ID: Debian

            Description:   Debian GNU/Linux 9.3 (stretch)

            Release:       9.3

            Codename:      stretch

            I am continuously getting error on opensips logs. I have
            changed CLI as yyyyyyy and IPs as x.x.x.x

            Aug 9 13:47:00 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:39169]

            Aug 9 13:47:07 homer-proxy /usr/sbin/opensips[6847]:
            ERROR:core:parse_msg:
            message=<ER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-114
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:47:07 homer-proxy /usr/sbin/opensips[6847]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:53693]

            Aug 9 13:47:07 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_msg:
            message=<ER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-114
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:47:07 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:33715]

            Aug 9 13:47:50 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_msg:
            message=<E,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-114
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:47:50 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:33715]

            Aug 9 13:48:15 homer-proxy /usr/sbin/opensips[6848]:
            ERROR:core:parse_method: invalid character =

            Aug 9 13:48:15 homer-proxy /usr/sbin/opensips[6848]:
            ERROR:core:parse_msg: message=<a=rtpmap:0
            PCMU/8000#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18
            annexb=no#015#012a=rtpmap:97 iLBC/8000#015#012a=fmtp:97
            mode=30#015#012a=rtpmap:110 speex/8000#015#012a=rtpmap:117
            speex/16000#015#012a=rtpmap:9 G722/8000#015#012a=rtpmap:4
            G723/8000#015#012a=fmtp:4 annexa=no#015#012a=rtpmap:101
            telephone-event/8000#015#012a=fmtp:101
            
0-16#015#012a=ptime:20#015#012a=sendrecv#015#012a=nortpproxy:yes#015#012>

            Aug 9 13:48:15 homer-proxy /usr/sbin/opensips[6848]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:5060]

            Aug 9 13:48:24 homer-proxy /usr/sbin/opensips[6846]:
            ERROR:core:parse_msg:
            message=<RACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:48:39 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:37979]

            Aug 9 13:48:40 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_msg:
            message=<TIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:48:40 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:37979]

            Aug 9 13:48:44 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_method: invalid character :

            Aug 9 13:48:44 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_msg: message=<Allow:
            
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:48:44 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:46187]

            Aug 9 13:48:44 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_method: invalid character :

            Aug 9 13:48:44 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_msg: message=<Allow:
            
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.005#015#012Content-Length: 0#015#012#015#012>

            Aug 9 13:48:44 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:receive_msg: Unable to parse msg received from
            [x.x.x.x:46187]

            Aug 9 13:49:37 homer-proxy /usr/sbin/opensips[6845]:
            ERROR:core:parse_msg: message=<ntact:
            <sip:[email protected]
            
<mailto:sip%[email protected]>;transport=tcp>;expires=360#015#012Supported:
            em,timer,replaces,path,resource-priority#015#012Allow:
            
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.005#015#012Content-Length:
            0#015#012#015#012REGISTER sip:x.x.x.x SIP/2.0#015#012Via:
            SIP/2.0/TCP
            192.168.1.17;branch=z9hG4bKac1134765850;alias#015#012Max-Forwards:
            70#015#012From:
            <sip:[email protected]>;tag=1c1134760571#015#012To:
            <sip:[email protected]>#015#012Call-ID:
            [email protected]#015#012CSeq
            <http://[email protected]#015%23012CSeq>:
            50295 REGISTER#015#012Contact: <sip:[email protected]
            
<mailto:sip%[email protected]>;transport=tcp>;expires=360#015#012Supported:
            em,timer,replaces,path,resource-priority#015#012Allow:
            
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.005#015#012Content-Length:
            0#015#012#015#012REGISTER sip:x.x.x.x SIP/2.0#015#012Via:
            SIP/2.0/TCP
            192.168.1.17;branch=z9hG4bKac1134889896;alias#015#012Max-Forwards:
            70#015#012From:
            <sip:[email protected]>;tag=1c1134884593#015#012To:
            <sip:[email protected]>#015#012Call-ID:
            [email protected]#015#012CSeq
            <http://[email protected]#015%23012CSeq>:
            50295 REGISTER#015#012Contact: <sip:[email protected]
            
<mailto:sip%[email protected]>;transport=tcp>;expires=360#015#012Supported:
            em,timer,replaces,path,resource-priority#015#012Allow:
            
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE#015#012Expires:
            360#015#012User-Agent: Audiocodes-Sip-Gateway-MP-118
            FXS/v.5.20A.043.0>

            Opensip is simply distributing the received hep traffic to
            the homer server in the pool and not doing any processing
            by itself.

            Can you suggest whats the cause of these errors and how
            can I correct them?

            Where should I look for correction?

            Thank you in advance.


            --
            regards,


            abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445

            _______________________________________________ Users
            mailing list [email protected]
            <mailto:[email protected]>
            http://lists.opensips.org/cgi-bin/mailman/listinfo/users

            _______________________________________________
            Users mailing list
            [email protected] <mailto:[email protected]>
            http://lists.opensips.org/cgi-bin/mailman/listinfo/users



        _______________________________________________
        Users mailing list
        [email protected] <mailto:[email protected]>
        http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to