Re: [OpenSIPS-Users] Unable to parse msg -- weird
Yes, opensips is a bit strict on the message received. Opensips does not try to fix broken messages (just like broken xml, throw fire) as soon as it is not what it should really look like, it will error. More specifically this is what bites you https://github.com/OpenSIPS/opensips/blob/master/parser/parse_fline.c#L1179 Try capturing all data without any filters and look with a hex editor. I don't think this is a bug. Hope this helps. On Sun, Jul 12, 2015 at 1:12 PM, John Nash wrote: > With one SIP Client opensips logs show me messages like > > ERROR:core:receive_msg: Unable to parse msg received from [XX.XX.XX.XX] > Jul 12 16:41:06 centos opensips[7455]: INFO:core:parse_first_line: method > not followed by SP > Jul 12 16:41:06 centos opensips[7455]: INFO:core:parse_first_line: bad > message > Jul 12 16:41:06 centos opensips[7455]: ERROR:core:parse_msg: > message=<#010g|#016P]*ê#015wh#"<0#002ARiL#034*#177Is#027WZ]b#011#020}i*²Z©C#026+#015#002js#027#024#031zs#031 > ôj#02186;<#021j#026#036}#013WähÈf#0011#031ULFb#025#033ja*±D¬BPkPPM#001%IB]\rîQ$I#027#016s{|#016'mn#017(¾> > > > But when i trace messages from wireshark i see correct SIP messages. > > I am using pike and sipmsg_validate functions. If I disable both I no > longer see error messages? > > where should I check to find out root cause ? > > John > > > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Aron Podrigal - //Be happy :-) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips 1.11 on Centos 6.6, running but not listening?
>From what I have seen in the past, I believe that your client has some garbage in the beginning of the message, so opensips would say that it could't parse the first line. Whereas wireshark is a bit smarter to skip over it. On Sun, Jul 12, 2015 at 2:30 PM, John Nash wrote: > Hello Frank, > > I saw your message > http://lists.opensips.org/pipermail/users/2015-March/031296.html Did you > get any head or tail of this issue?..I also face the same situation where > in wireshark I see perfect messages but opensips log shows unable to parse > and shows junk characters > > John > > On Thu, Mar 26, 2015 at 7:37 PM, Bogdan-Andrei Iancu > wrote: > >> Hi, >> >> First check if opensips actually started : run "ps auxw | grep opensips" >> >> If it didn't , check the logs (messages or syslog) for errors. >> >> If you see the process, check with "netstat -lnp | grep opensips" to see >> the listening interfaces of OpenSIPS. >> >> Regards, >> >> Bogdan-Andrei Iancu >> OpenSIPS Founder and Developer >> http://www.opensips-solutions.com >> >> On 25.03.2015 17:41, bluerain wrote: >> >>> I am currently running Opensips 1.9 on Debian Whizzy, but as stated on my >>> other thread, I am getting some weird error which opensips would suddenly >>> stop working. >>> >>> So, I am starting a new installation of Opensips 1.11 on Centos 6.6 using >>> the yum install method: >>> >>> 1. I was able to install yum opensips install with no issue, but there >>> are >>> some module it didn't install which I need (e.g. db_unixodbc and db_mysql >>> and httpd) >>> >>> 2. So I went ahead download the source and all the dependency files >>> needed >>> and re-complie the oepnsips to get those .so files >>> >>> 3. After some tweaking of the database table structure and some other >>> stuff, >>> I was able to get opensips 1.11 running without error (on the message.log >>> file) using my 1.9 config file. >>> >>> So I did opensipsctl restart (just to make sure opensips starts) >>> I see: >>> >>> INFO: Restarting OpenSIPS : >>> INFO: stopped >>> >>> INFO: Starting OpenSIPS : >>> INFO: Removing stale PID file /var/run/opensips.pid. >>> INFO: started (pid: 2079) >>> >>> but when I try to use a VoIP device to register to it, it doesn't >>> response. >>> thus I did: >>> "sudo netstat -plnt" >>> >>> The only think I see that opensips is listening on is port by PID >>> 2080 >>> (I don't see 2079 at all) >>> >>> So what is happening? why no error and it seems opensips running but >>> yet is >>> not listsening on port 5060? >>> >>> I have 2 nic card and eth0 is the one with public IP and the default >>> route >>> where as the eth1 is the one with private IP and no default route. Thus >>> I >>> am sure everything is route out of the eth0 (public IP). >>> >>> When I do simply the command "opensips", it would simply return: >>> >>> Listening on >>> udp: xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx]:5060 >>> Aliases: >>> *: (my FQDN):* >>> >>> So it looks like it think is listening on port 5060 but is not? >>> >>> Any help would be appreciated greatly! >>> >>> Thank you! >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-11-on-Centos-6-6-running-but-not-listening-tp7596152.html >>> Sent from the OpenSIPS - Users mailing list archive at Nabble.com. >>> >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >>> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Aron Podrigal - //Be happy :-) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] No Route headers found
The captures you provided does not contain any useful information, there was no sip headers in there. you should provide something like the file attached. Here is a command that you can extract the sip info from a tshark pcap tshark -r /hello.pcap -V -T fields -e ip -e udp.port -e tcp.port -e sip.Request-Line -e sip.msg_hdr -e sip.msg_body -w world.pcap -E separator=" " | tee > pcap.txt (Notice the newline for the separator, thats required if yu want the fields on new lines.) Here is a un-encrypted version of a pcap, and you should get something similar after decrypting with your private key. On Sun, Jul 12, 2015 at 1:49 PM, Nabeel wrote: > The one attached has a bit more information after I set up Wireshark > correctly with the server's private key. > > On 12 July 2015 at 17:20, Nabeel wrote: > >> Please find the decoded 'plain text' version exported from Wireshark >> attached to this Email. >> >> I am still unclear how to add this 'route header' or whatever else is >> required to make a call connect over TLS. >> >> Why must there be so many configurations just to set the correct port? >> >> On 12 July 2015 at 13:38, Podrigal, Aron >> wrote: >> >>> >>> https://wiki.freeswitch.org/wiki/Packet_Capture#Analyze_a_packet_capture_with_SIP_TLS_on_port_5061 >>> On Jul 12, 2015 8:05 AM, "Nabeel" wrote: >>> Well, that was the output of that command. How do I decrypt it? On 12 Jul 2015 13:03, "Podrigal, Aron" wrote: > Encrypted :) > On Jul 12, 2015 3:17 AM, "Nabeel" wrote: > >> I have attached the output of "# ngrep -tqd any -W byline port 5061" >> as you suggested. >> >> Please let me know how I can add transport=tls to contact, because >> in my config file I see nothing about contact header. >> >> On 12 July 2015 at 05:10, Podrigal, Aron >> wrote: >> >>> Hello Nabeel, >>> >>> I was expecting to get a textual file with all sip headers like the >>> output of ngrep -tqd any -W byline I did not have a pc to be able to >>> decode this pcap with tshark. I'll try to give a look at it tomorrow. >>> >>> Just a note, try adding a transport=tls to contact. >>> On Jul 11, 2015 2:59 AM, "Nabeel" wrote: >>> In the log, I see that 'uri' does not have ';transport=tls', but the 'ruri' does have ';transport=tls' : DBG:core:parse_msg: uri: DBG:core:parse_to: display={}, ruri={sip:usern...@mydomain.com ;transport=tls} On 11 July 2015 at 07:33, Nabeel wrote: > I checked the SIP capture in Wireshark and it seems the client is > using the wrong port: > > "Src port 3921 (3921) [Client IP] > > Dst port 5061 (5061) [OpenSIPS IP]" > > The client is set to use port 5061 in its settings and I have the > following in OpenSIPS config: > > $rp = 5061 > add_uri_param("transport=tls"); > force_send_socket("tls:ip:port"); > > So how can I add the route header to fix this? > > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >> >> > -- Aron Podrigal - //Be happy :-) sample.pcap Description: application/vnd.tcpdump.pcap ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Switching from repro to OpenSIPS
I am currently running repro SIP server as backend for my mobile VoIP application (https://www.resiprocate.org/About_Repro). Due to some bugs in the TLS code of repro, I decided to switch to OpenSIPS, but unfortunately having difficulty configuring it to work in the same way. If anyone has experience with repro and is able to provide an equivalent OpenSIPS configuration, please post a sample configuration file. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips 1.11 on Centos 6.6, running but not listening?
Hello Frank, I saw your message http://lists.opensips.org/pipermail/users/2015-March/031296.html Did you get any head or tail of this issue?..I also face the same situation where in wireshark I see perfect messages but opensips log shows unable to parse and shows junk characters John On Thu, Mar 26, 2015 at 7:37 PM, Bogdan-Andrei Iancu wrote: > Hi, > > First check if opensips actually started : run "ps auxw | grep opensips" > > If it didn't , check the logs (messages or syslog) for errors. > > If you see the process, check with "netstat -lnp | grep opensips" to see > the listening interfaces of OpenSIPS. > > Regards, > > Bogdan-Andrei Iancu > OpenSIPS Founder and Developer > http://www.opensips-solutions.com > > On 25.03.2015 17:41, bluerain wrote: > >> I am currently running Opensips 1.9 on Debian Whizzy, but as stated on my >> other thread, I am getting some weird error which opensips would suddenly >> stop working. >> >> So, I am starting a new installation of Opensips 1.11 on Centos 6.6 using >> the yum install method: >> >> 1. I was able to install yum opensips install with no issue, but there are >> some module it didn't install which I need (e.g. db_unixodbc and db_mysql >> and httpd) >> >> 2. So I went ahead download the source and all the dependency files needed >> and re-complie the oepnsips to get those .so files >> >> 3. After some tweaking of the database table structure and some other >> stuff, >> I was able to get opensips 1.11 running without error (on the message.log >> file) using my 1.9 config file. >> >> So I did opensipsctl restart (just to make sure opensips starts) >> I see: >> >> INFO: Restarting OpenSIPS : >> INFO: stopped >> >> INFO: Starting OpenSIPS : >> INFO: Removing stale PID file /var/run/opensips.pid. >> INFO: started (pid: 2079) >> >> but when I try to use a VoIP device to register to it, it doesn't >> response. >> thus I did: >> "sudo netstat -plnt" >> >> The only think I see that opensips is listening on is port by PID >> 2080 >> (I don't see 2079 at all) >> >> So what is happening? why no error and it seems opensips running but yet >> is >> not listsening on port 5060? >> >> I have 2 nic card and eth0 is the one with public IP and the default route >> where as the eth1 is the one with private IP and no default route. Thus I >> am sure everything is route out of the eth0 (public IP). >> >> When I do simply the command "opensips", it would simply return: >> >> Listening on >> udp: xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx]:5060 >> Aliases: >> *: (my FQDN):* >> >> So it looks like it think is listening on port 5060 but is not? >> >> Any help would be appreciated greatly! >> >> Thank you! >> >> >> >> >> -- >> View this message in context: >> http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-11-on-Centos-6-6-running-but-not-listening-tp7596152.html >> Sent from the OpenSIPS - Users mailing list archive at Nabble.com. >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Unable to parse msg -- weird
With one SIP Client opensips logs show me messages like ERROR:core:receive_msg: Unable to parse msg received from [XX.XX.XX.XX] Jul 12 16:41:06 centos opensips[7455]: INFO:core:parse_first_line: method not followed by SP Jul 12 16:41:06 centos opensips[7455]: INFO:core:parse_first_line: bad message Jul 12 16:41:06 centos opensips[7455]: ERROR:core:parse_msg: message=<#010g|#016P]*ê#015wh#"<0#002ARiL#034*#177Is#027WZ]b#011#020}i*²Z©C#026+#015#002js#027#024#031zs#031 ôj#02186;<#021j#026#036}#013WähÈf#0011#031ULFb#025#033ja*±D¬BPkPPM#001%IB]\rîQ$I#027#016s{|#016'mn#017(¾> But when i trace messages from wireshark i see correct SIP messages. I am using pike and sipmsg_validate functions. If I disable both I no longer see error messages? where should I check to find out root cause ? John ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] No Route headers found
Well, that was the output of that command. How do I decrypt it? On 12 Jul 2015 13:03, "Podrigal, Aron" wrote: > Encrypted :) > On Jul 12, 2015 3:17 AM, "Nabeel" wrote: > >> I have attached the output of "# ngrep -tqd any -W byline port 5061" as >> you suggested. >> >> Please let me know how I can add transport=tls to contact, because in my >> config file I see nothing about contact header. >> >> On 12 July 2015 at 05:10, Podrigal, Aron >> wrote: >> >>> Hello Nabeel, >>> >>> I was expecting to get a textual file with all sip headers like the >>> output of ngrep -tqd any -W byline I did not have a pc to be able to >>> decode this pcap with tshark. I'll try to give a look at it tomorrow. >>> >>> Just a note, try adding a transport=tls to contact. >>> On Jul 11, 2015 2:59 AM, "Nabeel" wrote: >>> In the log, I see that 'uri' does not have ';transport=tls', but the 'ruri' does have ';transport=tls' : DBG:core:parse_msg: uri: DBG:core:parse_to: display={}, ruri={sip:usern...@mydomain.com ;transport=tls} On 11 July 2015 at 07:33, Nabeel wrote: > I checked the SIP capture in Wireshark and it seems the client is > using the wrong port: > > "Src port 3921 (3921) [Client IP] > > Dst port 5061 (5061) [OpenSIPS IP]" > > The client is set to use port 5061 in its settings and I have the > following in OpenSIPS config: > > $rp = 5061 > add_uri_param("transport=tls"); > force_send_socket("tls:ip:port"); > > So how can I add the route header to fix this? > > > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >> ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] No Route headers found
I have attached the output of "# ngrep -tqd any -W byline port 5061" as you suggested. Please let me know how I can add transport=tls to contact, because in my config file I see nothing about contact header. On 12 July 2015 at 05:10, Podrigal, Aron wrote: > Hello Nabeel, > > I was expecting to get a textual file with all sip headers like the output > of ngrep -tqd any -W byline I did not have a pc to be able to decode this > pcap with tshark. I'll try to give a look at it tomorrow. > > Just a note, try adding a transport=tls to contact. > On Jul 11, 2015 2:59 AM, "Nabeel" wrote: > >> In the log, I see that 'uri' does not have ';transport=tls', but the >> 'ruri' does have ';transport=tls' : >> >> DBG:core:parse_msg: uri: >> >> DBG:core:parse_to: display={}, ruri={sip:usern...@mydomain.com >> ;transport=tls} >> >> >> On 11 July 2015 at 07:33, Nabeel wrote: >> >>> I checked the SIP capture in Wireshark and it seems the client is using >>> the wrong port: >>> >>> "Src port 3921 (3921) [Client IP] >>> >>> Dst port 5061 (5061) [OpenSIPS IP]" >>> >>> The client is set to use port 5061 in its settings and I have the >>> following in OpenSIPS config: >>> >>> $rp = 5061 >>> add_uri_param("transport=tls"); >>> force_send_socket("tls:ip:port"); >>> >>> So how can I add the route header to fix this? >>> >>> >>> >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > # ngrep -tqd any -W byline port 5061 interface: any filter: (ip or ip6) and ( port 5061 ) T 2015/07/12 08:08:11.144578 94.197.121.49:30755 -> 87.xx.xxx.42:5061 [AP] .:..>..Y.~Z!.;..$Q. ...].&..,..o@.. f..&.`ASj.?..S.S]...bH..K.k_.m..Q_(.E'.m.D..H^...d..,.9.../.-.L.."M..].t..Qc:.R.h.i.Am..}vY0D..d.x.q...ax...ld.60is.u..T.L oW.E.`..w.#7...O3K...[u$.e).?.2 ..~...=..B..!Ky.dI.e|.it..|y.<... ... .!zc..0...gh.~..;/..P...d..O...F>.KTH.IO..#...{.`...i"Uz.i.~...:.x.+...^.(Q`..3D..[...ql.Y%...c.~.y...e.},.J...@Z.d.1..@.c...t...)r.. ..=m...*Yn{Kd.sI/N.f~B..Q.H...r^E.SB..B..=z.i..VL..Y.x.$..#..UV5..]..on..E.{..6.H:..r..U...(*.f.wG..iI..?..W...]$. T 2015/07/12 08:08:11.166782 87.xx.xxx.42:5061 -> 94.197.121.49:30755 [AP] ...A..U.3x..DN...G#r.1.Z...>...&..1.6.}?...Q.~zEf.ds~)..-d...$..1..-...2P*Z41%..B..0..=.M~._L.. C..\..v...*.<../..ZQ..N:...2{../...y.R..XH.*...K..9-f.j.5z.M.q..7.V..>..k#...8R.t;...+..Xh.X.X]...+U.~@w.g.8..a.^VO..tDi.6.C..4..\..A.!a... ..Z.{..Eq.t..i.5..8..~.V.^.U.Y.<...l8)mR?~...0s...t0.ms.*z.>...pY.|S.C..&.. T 2015/07/12 08:08:12.423007 94.197.121.49:30755 -> 87.xx.xxx.42:5061 [AP] ..f...Mm.XsR9.8.d..z.iz?Sp... ...M]-w..@._.s#.N'|...tMp/..;'#1..u.2Q..4pG.fd..n..4@^..I...7(.V.m.>*.*...{.$.0.ArG..&S.).P..#B..b.(io..P..,n...z".../...g8..i!.(..e...\9O..x...WtNH<"w...V_...,.H.;.p .h'..%..)?5!..V..L..-. .x*%..\.PPG...eW9Y..%.2.6K^=.. ..s. f.q..M...h..<.[...xH'N..s.r..=,...<.".I.l... .k ...:{.B.SW..$'0W.Ko..pR..g..tc...n.a.#.*.-.r0.$.J...r.S.t.bZ.u/=s..QP...l.._!.p..*.]X.i.=U..1i;zS.C..$!..f.d.5{.5h...M.~...!Jf...oi.8..!r..h.m.aB..[..ef..Z/sy...;<`.a.*/...G.{.E...[R.K...s.[9T.O..."...F..X..bG0&.a!..X.i/.+. eP.Y...=.leqv.F...w..iJ.l.%yj.u..p./.X4T...C..[.neu...C\.[1v.77.PAbX2..,.F...M...:).M.1~.L.n...h..~.[.t...|.. p.79d.P. 9...7.)$ia...R_m..<.x_Ri|.L.-..7..2H...j.,z.'.g...K.%..;!..:qt..l$. +.ale&..Q..?.n...5bg.+^... q.vr..Qw... ..s}...V]...D.`..5^}oXQ8e..s.>`...kV...rdi..&1]Db^..E.)..H.3.8.jJB0.. 94.197.121.49:30755 [AP] `..N.>SA.nZ.xiu.(@xb..ZC..U...!D..4.. j...Y...E.y>.HHJn..b.X~g&..>E&...y.V.(.M.fu.9.g.f..|).m..G.W.Do..u..].[...:>WzHsN..>...}.B./z.q.\#..s.[.+>wI.Ly"..l..(,.y.7Y(.qYI.B..UOw.S`.V.t.-...I.Qf^%.?..-.f.X...+.P>Eg...=. .$. .<...3.N.@f|...>c.T~.j|Eut...%.._.. T 2015/07/12 08:08:12.607628 87.xx.xxx.42:5061 -> 94.197.121.49:30755 [AP] ...ZL...V~.h..e..l...Vrj..!n.C.w...m..I.y.T...f..D.DG.pal.x4s.keo%..v/..F.E...l.u4j.;.h...y*..g.B.5u..\HV9Ic..P&L&..hx.lf2..n)r a4..<..D.`8..M.S.f..%g7..9ZN..lVT.}&.`u..`..u