Hi all,<div><br></div><div>I am currently using OpenSips as an inbound loadbalancer and an outbound proxy. It does the following for me:</div><div>- Receives calls from my provider and balances them across several Freeswitch nodes. </div>
<div>- Accepts calls from the several Freeswitch nodes, and dispatches them to various providers</div><div><br></div><div>Note that I do not have to support any registration, just invites as mentioned above. </div><div>I am using the load_balancer module to balance the inbound calls to OpenSips, and I am using the drouting module to route the calls initiated at the Freeswitches and sent through OpenSips. </div>
<div><br></div><div>Most things seem to be working smoothly, except for one issue. When I make calls out of the Freeswitch -> OpenSips -> Provider -> PSTN, sometimes the OpenSips is not properly routing the BYE message when the call is hung up.</div>
<div><br></div><div>I can see the BYE message coming in from the provider, but it looks like sometimes they have changed the BYE header.</div><div><br></div><div>When it comes into me like the following, it is working fine for me, OpenSips forwards the BYE on to the correct Freeswitch node, which is located at .223</div>
<div>BYE <a href="mailto:sip%3Agw%2Bopensips_0@10.10.10.223">sip:gw+opensips_0@10.10.10.223</a>;transport=udp;gw=opensips_0 SIP/2.0</div><div><br></div><div>However, sometimes it comes in like this:</div><div>BYE sip:gw+opensips_0@PUBLIC_IP_OF_OPENSIPS:47013;transport=udp;gw=opensips_0 SIP/2.0</div>
<div><br></div><div>When this occurs, OpenSips seems to try to forward the BYE back to itself, using the PUBLIC_IP_OF_OPENSIPS.</div><div><br></div><div>I understand that I must be doing something wrong if I am exposing the private IPs of my systems externally, but I'm not understanding why the BYE message is sent differently by the provider without any changes and it is intermittently happening. </div>
<div><br></div><div>Any advice here? I am a newbie to OpenSips, so apologies if these are real basic questions.</div><div><br></div><div>Here is my route block, FYI:</div><div><br></div><div><div>route{</div><div> if (!mf_process_maxfwd_header("10")) {</div>
<div> sl_send_reply("483","Too Many Hops");</div><div> exit;</div><div> }</div><div><br></div><div> if (!has_totag()) {</div><div> # initial request</div>
<div> record_route();</div><div> }</div><div> else {</div><div> # sequential request - obey the indicated route</div><div> loose_route();</div><div> t_relay();</div>
<div> exit;</div><div> }</div><div><br></div><div> # handle cancel and re-transmissions</div><div> if ( is_method("CANCEL") ) {</div><div> if ( t_check_trans() )</div>
<div> t_relay();</div><div> exit;</div><div> }</div><div><br></div><div> if (is_method("INVITE")) {</div><div> # This is the outgoing route to the pstn if it is coming from internal</div>
<div> if(src_ip =~ "^10\.10\..*"){</div><div> setflag(1); # do accounting</div><div> route(pstn_outgoing); # Call our dynamic route.</div><div><div> } else {</div>
<div> # This is loadbalancing the incoming calls from the pstn </div><div> setflag(1);</div><div> route(lb_incoming);</div><div> }</div>
<div> }else {</div><div> send_reply("405","Method Not Allowed");</div><div> exit;</div><div> }</div><div><br></div><div> # route the request</div><div>
if (!t_relay()) {</div><div> sl_reply_error();</div><div> }</div></div></div><div>}</div><div><br></div><div><br></div>