[SR-Users] topoch and xHTTP

Daniel-Constantin Mierla miconda at gmail.com
Mon May 27 16:15:17 CEST 2013


Hello,

I pushed over the weekend a patch that should fix it. Practically was an 
error message, but the processing was going on further without issues. 
topoh was executed for http requests and shouldn't have been like that.

Would be appreciated if you can test and report whether is fine  now or 
not. The patch is now in branches 3.3, 4.0 and master.

Cheers,
Daniel

On 5/23/13 2:50 PM, Julia wrote:
>
> It's an incoming request
>
> Debug3 :
>
>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [ip_addr.c:247]: tcpconn_new: new tcp connection: 80.80.80.241
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [tcp_main.c:1089]: tcpconn_new: on port 51898, type 2
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [tcp_main.c:1400]: tcpconn_add: hashes: 902:996:7, 4
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [io_wait.h:390]: DBG: io_watch_add(0x82cec0, 57, 2, 0x7f8481de59a0), 
> fd_no=48
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [io_wait.h:617]: DBG: io_watch_del (0x82cec0, 57, -1, 0x0) fd_no=49 called
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [tcp_main.c:4295]: tcp: DBG: sending to child, events 1
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [tcp_main.c:3966]: selected tcp worker 3 33(29526) for activity on 
> [tcp:172.16.60.113:5060 <http://172.16.60.113:5060>], 0x7f8481de59a0
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_read.c:1354]: received n=8 con=0x7f8481de59a0, fd=11
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:624]: SIP Request:
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:626]:  method:  <GET>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:628]:  uri:     </Update>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:630]:  version: <HTTP/1.1>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:104]: found end of header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: ERROR: <core> 
> [parser/parse_from.c:60]: ERROR:parse_from_header: bad msg or missing 
> FROM header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: ERROR: topoh 
> [topoh_mod.c:215]: cannot parse FROM header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:624]: SIP Request:
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:626]:  method:  <GET>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:628]:  uri:     </Update>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:630]:  version: <HTTP/1.1>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:104]: found end of header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [receive.c:149]: After parse_msg...
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: xhttp 
> [xhttp_mod.c:345]: new fake msg created (300 bytes):#012<GET /Update 
> HTTP/1.1#015#012Via: SIP/2.0/TCP 80.80.80.241:51898#015#012Accept 
> <http://80.80.80.241:51898#015#012Accept>: text/html, 
> application/xhtml+xml, */*#015#012Accept-Language: 
> he-IL#015#012User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows 
> NT 6.1; Trident/6.0)#015#012Accept-Encoding: gzip, 
> deflate#015#012Host: 172.16.60.113:5060#015#012DNT 
> <http://172.16.60.113:5060#015#012DNT>: 1#015#012Connection: 
> Keep-Alive#015#012#015#012>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:624]: SIP Request:
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:626]:  method:  <GET>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:628]:  uri:     </Update>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:630]:  version: <HTTP/1.1>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/parse_via.c:2561]: end of header reached, state=5
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:511]: parse_headers: Via found, flags=2
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:513]: parse_headers: this is the first via
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: NOTICE: 
> <script>: HTTP HANDLER /Update
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: exec 
> [exec_mod.c:208]: executing [kamctl fifo mt_list]
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [main.c:886]: SIGCHLD received: we do not worry about grand-children
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: exec 
> [exec.c:274]: no result from kamctl fifo mt_list
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: mtree 
> [mtree.c:414]: no match for:
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: INFO: mtree 
> [mtree_mod.c:450]: no prefix found in [CAC] for []
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: sl 
> [sl.c:278]: reply in stateless mode (sl)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:104]: found end of header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [msg_translator.c:206]: check_via_address(80.80.80.241, 80.80.80.241, 0)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:624]: SIP Request:
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:626]:  method: <HTTP/1.1>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:628]:  uri:     <200>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:630]:  version: <OK>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/parse_via.c:2561]: end of header reached, state=5
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:511]: parse_headers: Via found, flags=2
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:513]: parse_headers: this is the first via
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:202]: DEBUG: get_hdr_body : content_length=61
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [parser/msg_parser.c:104]: found end of header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: ERROR: <core> 
> [parser/parse_from.c:60]: ERROR:parse_from_header: bad msg or missing 
> FROM header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: ERROR: topoh 
> [topoh_mod.c:215]: cannot parse FROM header
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_main.c:2313]: tcp_send: send from reader (29526 (33)), reusing fd
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_main.c:2549]: tcp_send: sending...
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_main.c:2583]: tcp_send: after real write: c= 0x7f8481de59a0 n=203 
> fd=11
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_main.c:2584]: tcp_send: buf=#012HTTP/1.1 200 OK#015#012Via: 
> SIP/2.0/TCP 80.80.80.241:51898#015#012Content-Type 
> <http://80.80.80.241:51898#015#012Content-Type>: 
> text/html#015#012Server: kamailio (3.3.1 
> (x86_64/linux))#015#012Content-Length: 
> 61#015#012#015#012<html><body>LastUpdated 0 result 
> <null>;<null>;</body></html>
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [usr_avp.c:644]: DEBUG:destroy_avp_list: destroying list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [usr_avp.c:644]: DEBUG:destroy_avp_list: destroying list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [tcp_main.c:3617]: handle_ser_child: read response= 7f8481de59a0, -1, 
> fd -1 from 33 (29526)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [usr_avp.c:644]: DEBUG:destroy_avp_list: destroying list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [usr_avp.c:644]: DEBUG:destroy_avp_list: destroying list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [usr_avp.c:644]: DEBUG:destroy_avp_list: destroying list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [usr_avp.c:644]: DEBUG:destroy_avp_list: destroying list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [xavp.c:365]: destroying xavp list (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [receive.c:293]: receive_msg: cleaning up
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [io_wait.h:390]: DBG: io_watch_add(0x871120, 11, 2, 0x7f8481de59a0), 
> fd_no=1
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [io_wait.h:617]: DBG: io_watch_del (0x871120, 11, -1, 0x10) fd_no=2 called
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_read.c:1281]: releasing con 0x7f8481de59a0, state -2, fd=11, id=4
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29526]: DEBUG: <core> 
> [tcp_read.c:1282]:  extra_data (nil)
> May 23 15:44:57 RNDSRV /usr/local/sbin/kamailio[29536]: DEBUG: <core> 
> [tcp_main.c:3378]: handle_tcp_child: reader response= 7f8481de59a0, -2 
> from 3
>
> Thank you,
>
> Julia
>
> ------------------------------------------------------------------------
>
> *From:*sr-users-bounces at lists.sip-router.org 
> [mailto:sr-users-bounces at lists.sip-router.org] *On Behalf Of 
> *Daniel-Constantin Mierla
> *Sent:* Thursday, May 23, 2013 3:10 PM
> *To:* Kamailio (SER) - Users Mailing List
> *Subject:* Re: [SR-Users] topoch and xHTTP
>
> Hello,
>
> iirc, topoh callbacks are executed only for incoming sip traffic. Do 
> you try to relay the http request? That doesn't work, kamailio works 
> only as http server, not proxy.
>
> If it is the case of incoming request, can you run with debug=3 and 
> send the output of such case here?
>
> Cheers,
> Daniel
>
> On 5/23/13 12:21 PM, Julia wrote:
>
>> Hello,
>>
>> I am testing the xHTTP module on kamailio-3.3 with topology hiding (topoch)/  /and
>> I get parsing error for each received HTTP message:
>>
>> /usr/local/sbin/kamailio[2937]: ERROR: <core> 
>> [parser/parse_from.c:60]: ERROR:parse_from_header: bad msg or missing 
>> FROM header
>> /usr/local/sbin/kamailio[2937]: ERROR: topoh [topoh_mod.c:215]: 
>> cannot parse FROM header
>>
>> Is it configuration issue?
>>
>
>
> -- 
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda  <http://twitter.com/#%21/miconda>  -http://www.linkedin.com/in/miconda
> Kamailio Advanced Training,San Francisco,USA  - June 24-27, 2013
>    *http://asipto.com/u/katu  *

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
   * http://asipto.com/u/katu *

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130527/192a3a10/attachment-0001.html>


More information about the sr-users mailing list