[OpenSIPS-Users] need advice on B2b

ha do haloha201 at yahoo.com
Wed Jan 6 09:21:06 CET 2010


HI Anca

i am trying to use the b2b_request + b2b_reply

route{
...
if(is_method("INVITE") &&  !(src_ip == 192.168.1.249 && src_port ==5060)) 
        {
                if (! t_newtran()){
                        sl_reply_error();
                        exit;
                };

                b2b_init_request("top hiding");
                exit;
        };
....
route("1");
}
route[1] {
        if(is_method("INVITE")) {
                route("b2b_request");
                t_on_reply("2");
        }
        else
                if(status=="200")
                        route("b2b_reply");
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}
route[b2b_request] {
  xlog("b2b_request cucku ($ci)\n");
        force_rtp_proxy();
}
route[b2b_reply] {
  xlog("b2b_reply cucku ($ci)\n");
        force_rtp_proxy();
}

i get the errors :  
ERROR:nathelper:force_rtp_proxy: Unable to parse body 
and
 DBG:tm:utimer_routine: timer routine:4,tl=0xb615e9a8 next=(nil), timeout=29000000
 DBG:tm:timer_routine: timer routine:3,tl=0xb615c6f4 next=(nil), timeout=29
 DBG:tm:delete_handler: removing 0xb615c690
 DBG:tm:delete_cell: delete_cell 0xb615c690: can't delete -- still reffed (1)


=======
 DBG:core:get_hdr_field: cseq <CSeq>: <2> <INVITE>
 DBG:core:parse_headers: flags=8
 DBG:tm:t_reply_matching: hash 21530 label 76806763 branch 0
 DBG:tm:t_reply_matching: REF_UNSAFE: after is 2
 DBG:tm:t_reply_matching: reply matched (T=0xb615e85c)!
 DBG:tm:t_check: end=0xb615e85c
 DBG:tm:reply_received: org. status uas=0, uac[0]=100 local=2 is_invite=1)
 DBG:tm:t_should_relay_response: T_code=0, new_code=180
 DBG:tm:local_reply: branch=0, save=0, winner=0
 DBG:tm:local_reply: Passing provisional reply 180 to FIFO application
 DBG:tm:run_trans_callbacks: trans=0xb615e85c, callback type 1024, id 0 entered
 DBG:b2b_entities:b2b_parse_key: hash_index = [111]  - local_index= [0]
 DBG:core:parse_headers: flags=ffffffffffffffff
 DBG:core:get_hdr_field: content_length=0
 DBG:core:get_hdr_field: found end of header
 DBG:b2b_entities:b2b_tm_cback: Received a reply with statuscode = 180
 DBG:core:parse_headers: flags=ffffffffffffffff
 DBG:b2b_entities:b2b_new_dlg: 'To' header ALREADY PARSED: <sip:1012 at 192.168.1.249>
 DBG:b2b_entities:b2b_new_dlg: Not an initial request
 DBG:core:parse_to_param: tag=bfad35cdb22f09f741816636d344f54b-19f0
 DBG:core:parse_to: end of header reached, state=29
 DBG:core:parse_to: display={}, ruri={sip:0873000003 at 192.168.1.249;user=phone}
 DBG:core:print_rr_body: current rr is <sip:192.168.1.249;lr=on>
 DBG:core:print_rr_body: out rr [<sip:192.168.1.249;lr=on>]
 DBG:core:print_rr_body: we have 1 records
 DBG:b2b_entities:b2b_tm_cback: Created new dialog structure 0xb61618c0
 DBG:core:print_rr_body: current rr is <sip:192.168.1.249;lr=on>
 DBG:core:print_rr_body: out rr [<sip:192.168.1.249;lr=on>]
 DBG:core:print_rr_body: we have 1 records
 DBG:b2b_logic:b2bl_parse_key: hash_index = [623]  - local_index= [0]
 DBG:core:parse_headers: flags=ffffffffffffffff
 DBG:b2b_entities:b2b_parse_key: hash_index = [346]  - local_index= [0]
 DBG:core:parse_headers: flags=ffffffffffffffff
 DBG:core:check_ip_address: params 192.168.1.4, 192.168.1.4, 0
 DBG:tm:t_reply_with_body: buffer computed
 DBG:tm:_reply_light: reply sent out. buf=0x81c70b8: SIP/2.0 1..., shmem=0xb615e534: SIP/2.0 1
 DBG:tm:_reply_light: finished
 b2b_reply cucku (B2B.111.0.1262765386)
 DBG:core:parse_headers: flags=ffffffffffffffff
 DBG:core:parse_headers: flags=1000
 DBG:core:parse_content_type_hdr: missing Content-Type header
 ERROR:nathelper:force_rtp_proxy: Unable to parse body

Thank you
Ha`
--- On Mon, 1/4/10, Anca Vamanu <anca at opensips.org> wrote:

From: Anca Vamanu <anca at opensips.org>
Subject: Re: [OpenSIPS-Users] need advice on B2b
To: "OpenSIPS users mailling list" <users at lists.opensips.org>
Date: Monday, January 4, 2010, 3:04 AM

Hi Ha`,

There is a very simple example in the documentation:

route[b2b_request] {
  xlog("b2b_request ($ci)\n");
}


route[b2b_reply] {
  xlog("b2b_reply ($ci)\n");
}


You can call in these routes any function that you call in a request route.

Regards,

-- 
Anca Vamanu
www.voice-system.ro



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100106/fb1931a1/attachment-0001.htm 


More information about the Users mailing list