[OpenSIPS-Users] OpenSIPS Unable to parse msg received from

Abdul Basit basit.engg at gmail.com
Thu Aug 23 10:25:27 EDT 2018


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 <basit.engg at gmail.com> 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:yyyyyy at x.x.x.x>;tag=1c1737546331#015#012To:
> <sip:yyyyyy at x.x.x.x>#015#012Call-ID: ccccc at x.x.x.x#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:yyyyyy at x.x.x.x;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 <bogdan at opensips.org>
> 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 <alain.bieuzent at free.fr>
>> 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 <users-bounces at lists.opensips.org> au nom de Abdul Basit <
>>> basit.engg at gmail.com>
>>> *Répondre à : *OpenSIPS users mailling list <users at lists.opensips.org>
>>> *Date : *jeudi 9 août 2018 à 14:18
>>> *À : *OpenSIPS users mailling list <users at lists.opensips.org>
>>> *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:yyyyyyyy at 192.168.1.17;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:yyyyyyyy at x.x.x.x>;tag=1c1134760571#015#012To:
>>> <sip:yyyyyyyy at x.x.x.x>#015#012Call-ID:
>>> 943343231120001012 at 192.168.1.17#015#012CSeq
>>> <http://943343231120001012@192.168.1.17#015%23012CSeq>: 50295
>>> REGISTER#015#012Contact: <sip:yyyyyyyy at 192.168.1.17;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:yyyyyyyy at x.x.x.x>;tag=1c1134884593#015#012To:
>>> <sip:zzzzzzzz at x.x.x.x>#015#012Call-ID:
>>> 943363361120001012 at 192.168.1.17#015#012CSeq
>>> <http://943363361120001012@192.168.1.17#015%23012CSeq>: 50295
>>> REGISTER#015#012Contact: <sip:yyyyyyyy at 192.168.1.17;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
>>> 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 listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180823/dd85c56f/attachment-0001.html>


More information about the Users mailing list