<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">HI Anca<br><br>i am trying to use the b2b_request + b2b_reply<br><br>route{<br>...<br>if(is_method("INVITE") && !(src_ip == 192.168.1.249 && src_port ==5060)) <br> {<br> if (! t_newtran()){<br> sl_reply_error();<br> exit;<br> };<br><br> b2b_init_request("top
hiding");<br> exit;<br> };<br>....<br>route("1");<br>}<br>route[1] {<br> if(is_method("INVITE")) {<br> route("b2b_request");<br> t_on_reply("2");<br> }<br> else<br> if(status=="200")<br> route("b2b_reply");<br> if (!t_relay())
{<br> sl_reply_error();<br> };<br> exit;<br>}<br>route[b2b_request] {<br> xlog("b2b_request cucku ($ci)\n");<br> force_rtp_proxy();<br>}<br>route[b2b_reply] {<br> xlog("b2b_reply cucku ($ci)\n");<br> force_rtp_proxy();<br>}<br><br>i get the errors : <br>ERROR:nathelper:force_rtp_proxy: Unable to parse body <br>and<br> DBG:tm:utimer_routine: timer routine:4,tl=0xb615e9a8 next=(nil), timeout=29000000<br> DBG:tm:timer_routine: timer routine:3,tl=0xb615c6f4 next=(nil), timeout=29<br> DBG:tm:delete_handler: removing 0xb615c690<br> DBG:tm:delete_cell: delete_cell 0xb615c690: can't delete -- still reffed (1)<br><br><br>=======<br> DBG:core:get_hdr_field: cseq
<CSeq>: <2> <INVITE><br> DBG:core:parse_headers: flags=8<br> DBG:tm:t_reply_matching: hash 21530 label 76806763 branch 0<br> DBG:tm:t_reply_matching: REF_UNSAFE: after is 2<br> DBG:tm:t_reply_matching: reply matched (T=0xb615e85c)!<br> DBG:tm:t_check: end=0xb615e85c<br> DBG:tm:reply_received: org. status uas=0, uac[0]=100 local=2 is_invite=1)<br> DBG:tm:t_should_relay_response: T_code=0, new_code=180<br> DBG:tm:local_reply: branch=0, save=0, winner=0<br> DBG:tm:local_reply: Passing provisional reply 180 to FIFO application<br> DBG:tm:run_trans_callbacks: trans=0xb615e85c, callback type 1024, id 0 entered<br> DBG:b2b_entities:b2b_parse_key: hash_index = [111] - local_index= [0]<br> DBG:core:parse_headers: flags=ffffffffffffffff<br> DBG:core:get_hdr_field: content_length=0<br> DBG:core:get_hdr_field: found end of header<br> DBG:b2b_entities:b2b_tm_cback:
Received a reply with statuscode = 180<br> DBG:core:parse_headers: flags=ffffffffffffffff<br> DBG:b2b_entities:b2b_new_dlg: 'To' header ALREADY PARSED: <sip:1012@192.168.1.249><br> DBG:b2b_entities:b2b_new_dlg: Not an initial request<br> DBG:core:parse_to_param: tag=bfad35cdb22f09f741816636d344f54b-19f0<br> DBG:core:parse_to: end of header reached, state=29<br> DBG:core:parse_to: display={}, ruri={sip:0873000003@192.168.1.249;user=phone}<br> DBG:core:print_rr_body: current rr is <sip:192.168.1.249;lr=on><br> DBG:core:print_rr_body: out rr [<sip:192.168.1.249;lr=on>]<br> DBG:core:print_rr_body: we have 1 records<br> DBG:b2b_entities:b2b_tm_cback: Created new dialog structure 0xb61618c0<br> DBG:core:print_rr_body: current rr is <sip:192.168.1.249;lr=on><br> DBG:core:print_rr_body: out rr [<sip:192.168.1.249;lr=on>]<br> DBG:core:print_rr_body: we have 1
records<br> DBG:b2b_logic:b2bl_parse_key: hash_index = [623] - local_index= [0]<br> DBG:core:parse_headers: flags=ffffffffffffffff<br> DBG:b2b_entities:b2b_parse_key: hash_index = [346] - local_index= [0]<br> DBG:core:parse_headers: flags=ffffffffffffffff<br> DBG:core:check_ip_address: params 192.168.1.4, 192.168.1.4, 0<br> DBG:tm:t_reply_with_body: buffer computed<br> DBG:tm:_reply_light: reply sent out. buf=0x81c70b8: SIP/2.0 1..., shmem=0xb615e534: SIP/2.0 1<br> DBG:tm:_reply_light: finished<br> b2b_reply cucku (B2B.111.0.1262765386)<br> DBG:core:parse_headers: flags=ffffffffffffffff<br> DBG:core:parse_headers: flags=1000<br> DBG:core:parse_content_type_hdr: missing Content-Type header<br> ERROR:nathelper:force_rtp_proxy: Unable to parse body<br><br>Thank you<br>Ha`<br>--- On <b>Mon, 1/4/10, Anca Vamanu <i><anca@opensips.org></i></b> wrote:<br><blockquote
style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Anca Vamanu <anca@opensips.org><br>Subject: Re: [OpenSIPS-Users] need advice on B2b<br>To: "OpenSIPS users mailling list" <users@lists.opensips.org><br>Date: Monday, January 4, 2010, 3:04 AM<br><br><div class="plainMail">Hi Ha`,<br><br>There is a very simple example in the documentation:<br><br>route[b2b_request] {<br> xlog("b2b_request ($ci)\n");<br>}<br><br><br>route[b2b_reply] {<br> xlog("b2b_reply ($ci)\n");<br>}<br><br><br>You can call in these routes any function that you call in a request route.<br><br>Regards,<br><br>-- <br>Anca Vamanu<br>www.voice-system.ro<br></div></blockquote></td></tr></table><br>