Hi,<br><br>You are looping once the generated Invite to IVR because you are not setting the destination host and port before you call b2b_init_request. Add the <span>rewritehostport("<a href="http://10.130.0.136:5060/" target="_blank">10.130.0.136:5060</a>");š</span> lines before calling b2b function, like this:<br>
<br><span>š if(is_method("INVITE") && !(src_ip=="10.130.0.140")) </span><br><span>š { </span><br><span>š šš š š š š šš </span><span>rewritehostport("<a href="http://10.130.0.136:5060/" target="_blank">10.130.0.136:5060</a>"); </span><span> š <br>
ššššššššššššššš b2b_init_request("top hiding"); </span><br><span>š š š š š š š š exit; </span><br><span>š }; </span><br><br>Regards,<br>Anca Vamanu<br><br><div class="gmail_quote">2011/7/18 õÈÏ× áÌÅËÓÁÎÄÒ éÌØÉÞ <span dir="ltr"><<a href="mailto:ukhov@ycc.ru">ukhov@ycc.ru</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<p><span>Hello! </span><br><span>Please help! I am ready to broke my head </span><img src=""><span>š. dont know how to solve this... </span><br><br><span>i have next: š š š š šPSTN<-------->OPENSIPS<-------->ASTERISK (IVR) </span><br>
<span>š š š š š š š š š š š š š š š š š š(10.107.10.10) š(10.130.0.140) š š š š š (10.130.0.136) </span><br><span>and all i want to do is top hiding between PSTN and ASTERISK. </span><br><br><span>So I adjusted opensips.cfg so i can hear asterisk ivr. When the caller hangs up the call everything goes as it should be (PSTN send BYE, BYE precessed by opensips and sended to asterisk. asterisk returns 200, opensips sends 200 to PSTN and call drops). </span><br>
<br><span>But when asterisk hangs up the call it sends BYE to OPENSIPS. On the next step opensips trying to process it and send BYE to PSTN. After that PSTN gives " <b>481</b> Call/Transaction Does Not Exist"... </span><br>
<span>I think I understand why it response such way. Because there are two different calls with different call-id's. So please tell me what i have to do in such situation? Do I have to keep two different call-id's and replace one to another when recive BYE from ASTERISK or there is another solution. Any advice will be appresiated. opensips.cfg is attached. </span><br>
<span>thanks! </span><br></p>
<p><span>--------------------------------------------- </span><br><span>port=5061 </span><br><span>listen=udp:<a href="http://10.130.0.140:5061" target="_blank">10.130.0.140:5061</a> </span><br><span>listen=tcp:<a href="http://10.130.0.140:5061" target="_blank">10.130.0.140:5061</a> </span><br>
<span>#modparam("dialog", "dlg_flag", 13) </span><br><span>#modparam("dialog", "db_mode", 2) </span><br><br><span>modparam("b2b_entities", "server_address", "sip:<a href="http://10.130.0.140:5061" target="_blank">10.130.0.140:5061</a>") </span><br>
<span>modparam("tm", "pass_provisional_replies", 1) </span><br><br><span>modparam("b2b_entities", "script_reply_route", "b2b_reply") </span><br><br><span>route[b2b_reply] </span><br>
<span>{ </span><br><span>š š š š xlog("\n\n\n\n-------"); </span><br><span>š š š š xlog("GOT REPLY FROM $src_ip\n"); </span><br><span>š š š š xlog("($ci)\n"); </span><br><span>š š š š xlog("-------\n\n\n\n"); </span><br>
<span>} </span><br><br><span>route </span><br><span>{ </span><br><span>š š š š xlog("\n\n\n\n-----------------------------START-----------------------------\n"); </span><br><span>š š š š if (!mf_process_maxfwd_header("10")){ </span><br>
<span>š š š š š š š š sl_send_reply("483","Too Many Hops"); </span><br><span>š š š š š š š š exit;}; </span><br><br><span>š š š š if (msg:len >= 1380 ){ </span><br><span>š š š š š š š š sl_send_reply("513", "Message too big"); </span><br>
<span>š š š š š š š š exit;}; </span><br><span>š š š š </span><br><span>š š š š if(is_method("BYE")&& (src_ip=="10.130.0.136")) </span><br><span>š š š š { </span><br><span>š š š š š š š š route(2); </span><br>
<span>š š š š } </span><br><span>š š š š š š š š </span><br><span>š š š š if (!method=="REGISTER") </span><br><span>š š š š { </span><br><span>š š š š š š š š xlog("+++++++++Recording route...\n"); </span><br>
<span>š š š š š š š š record_route(); </span><br><span>š š š š } </span><br><span>š š š š </span><br><span>š š š š if (loose_route()) </span><br><span>š š š š { </span><br><span>š š š š š š š š append_hf("P-hint: rr-enforced\r\n"); </span><br>
<span>š š š š š š š š route(1); </span><br><span>š š š š }; </span><br><span>š š š š š š š š š š š š </span><br><span>š š š š #skip Invite messages generated by the server </span><br><span>š š š š if(is_method("INVITE") && !(src_ip=="10.130.0.140")) </span><br>
<span>š š š š { </span><br><span>š š š š š š š š b2b_init_request("top hiding"); </span><br><span>š š š š š š š š exit; </span><br><span>š š š š }; </span><br><br><span>š š š š route(1); </span><br><span>} </span><br>
<br><span>route[1] </span><br><span>{ </span><br><span>š š š š š š š rewritehostport("<a href="http://10.130.0.136:5060" target="_blank">10.130.0.136:5060</a>"); </span><br><span>š š š š xlog("+++++++++++++ROUTE 1: SENDING TO ASTERISK\n"); </span><br>
<span>š š š š # send it out now </span><br><span>š š š š if (!t_relay()){ </span><br><span>š š š š š š š š sl_reply_error();}; </span><br><span>š š š š exit; </span><br><span>} </span><br><br><br><span>route[2] </span><br>
<span>{ </span><br><span>š š š š xlog("+++++++++++++SENDING TO PSTN\n"); </span><br><span>š š š š rewritehostport("<a href="http://10.107.10.10:5060" target="_blank">10.107.10.10:5060</a>"); </span><br>
<span>š š š š # send it out now </span><br><span>š š š š if (!t_relay()){ </span><br><span>š š š š š š š š sl_reply_error();}; </span><br><span>š š š š exit; </span><br><span>} </span></p></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>