<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
yes, you're right. I am trying to take request from instance (5061) and send them out as if they came from instance (5060).<br>
I've tried using force_send_socket( ) and/or rewriteport( ) functions and still unable to resolve it.<br>
<br>
####### Global Parameters #########<br>
listen=udp:192.168.1.1:5060<br>
listen=udp:192.168.1.1:5061<br>
<br>
####### Routing Logic ########<br>
force_send_socket(192.168.1.1:5060);<br>
("5060")<br><br>
Thanks,<br>
R<br><br><br><br>&gt; Date: Tue, 27 Jul 2010 17:32:15 -0400<br>&gt; Subject: Re: [SR-Users] multiple instances on different ports<br>&gt; From: geoffreymina@gmail.com<br>&gt; To: uriel.rozenbaum@gmail.com; alex-rsm@hotmail.com; users@lists.kamailio.org<br>&gt; <br>&gt; I believe the issue is that he is trying to take requests on one<br>&gt; kamailio instance (5061) and send them out as if they came from the<br>&gt; other kamailio instance (5060) to 'normalize' the responses back<br>&gt; through just 5060.<br>&gt; <br>&gt; Either I am not interprting correctly or there is a major design flaw here.<br>&gt; <br>&gt; On 7/27/10, Uriel Rozenbaum &lt;uriel.rozenbaum@gmail.com&gt; wrote:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; As it is stated on the documentation, force_send_socket() can only<br>&gt; &gt; take a listening interface as an argument.<br>&gt; &gt;<br>&gt; &gt; Try adding<br>&gt; &gt; listen=udp:192.168.1.111:5060<br>&gt; &gt;<br>&gt; &gt; Cheers,<br>&gt; &gt; Uriel<br>&gt; &gt;<br>&gt; &gt; On Tue, Jul 27, 2010 at 10:51 AM, Alex rsm &lt;alex-rsm@hotmail.com&gt; wrote:<br>&gt; &gt;&gt; Hi,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Thanks for your response: When using the function you suggested:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; listen=udp:192.168.1.111:5061<br>&gt; &gt;&gt; listen=udp:192.168.1.111:5062<br>&gt; &gt;&gt; .....<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; force_send_socket(192.168.1.111:5060);<br>&gt; &gt;&gt; ...<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I am getting the following error message:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Jul 27 09:45:07 lab-openser01 /usr/sbin/openser[8861]:<br>&gt; &gt;&gt; ERROR:core:fix_actions: bad force_send_socket argument:<br>&gt; &gt;&gt; 209.16.123.111:5060<br>&gt; &gt;&gt; (ser doesn't listen on it)<br>&gt; &gt;&gt; Jul 27 09:45:07 lab-openser01 /usr/sbin/openser[8861]:<br>&gt; &gt;&gt; ERROR:core:fix_actions: fixing failed (code=-476) at cfg line 332<br>&gt; &gt;&gt; Jul 27 09:45:07 lab-openser01 /usr/sbin/openser[8861]: ERROR:core:main:<br>&gt; &gt;&gt; failed to fix configuration with err code -476<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; As I mentioned I am trying to run multiple instances of openser with diff<br>&gt; &gt;&gt; ports and proxy all traffic coming from diff ports to a fix port 5060.<br>&gt; &gt;&gt; Domains are set within a perl script.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; PS: I am using openser 1.3 release within ubuntu OS.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Thanks,<br>&gt; &gt;&gt; R<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; Date: Mon, 26 Jul 2010 17:55:54 -0300<br>&gt; &gt;&gt;&gt; From: uriel.rozenbaum@gmail.com<br>&gt; &gt;&gt;&gt; To: rob1485@gmail.com<br>&gt; &gt;&gt;&gt; CC: users@lists.kamailio.org<br>&gt; &gt;&gt;&gt; Subject: Re: [SR-Users] multiple instances on different ports<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Hi,<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; try using force_send_socket but you'll have to declare the socket with<br>&gt; &gt;&gt;&gt; 5060 as well<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#force_send_socket<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Cheers,<br>&gt; &gt;&gt;&gt; Uriel<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; On Mon, Jul 26, 2010 at 5:38 PM, Robert R &lt;rob1485@gmail.com&gt; wrote:<br>&gt; &gt;&gt;&gt; &gt; Hi,<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; I am trying to run multiple different instances of openser on the same<br>&gt; &gt;&gt;&gt; &gt; server using different ports.<br>&gt; &gt;&gt;&gt; &gt; Regardless of receiving INVITE on any of the ports (5061, 5062, ...)&nbsp; I<br>&gt; &gt;&gt;&gt; &gt; want<br>&gt; &gt;&gt;&gt; &gt; openser always to proxy the message to port 5060.<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; &nbsp;invite:5061 ---&gt; openser --&gt; invite:5060<br>&gt; &gt;&gt;&gt; &gt; &nbsp;invite:5062 ---&gt; openser --&gt; invite:5060<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; By adding two listen ports as follow, openser sends the traffic to the<br>&gt; &gt;&gt;&gt; &gt; same<br>&gt; &gt;&gt;&gt; &gt; outgoing port as the incoming port:<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; listen=udp:209.16.123.160:5061<br>&gt; &gt;&gt;&gt; &gt; listen=udp:209.16.123.160:5062<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; Is there a way to hard code the outgoing port? or I should overwrite<br>&gt; &gt;&gt;&gt; &gt; the<br>&gt; &gt;&gt;&gt; &gt; port?<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; Thanks,<br>&gt; &gt;&gt;&gt; &gt; R<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt; _______________________________________________<br>&gt; &gt;&gt;&gt; &gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt; &gt;&gt;&gt; &gt; sr-users@lists.sip-router.org<br>&gt; &gt;&gt;&gt; &gt; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt; &gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; _______________________________________________<br>&gt; &gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt; &gt;&gt;&gt; sr-users@lists.sip-router.org<br>&gt; &gt;&gt;&gt; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ________________________________<br>&gt; &gt;&gt; Hotmail has tools for the New Busy. Search, chat and e-mail from your<br>&gt; &gt;&gt; inbox.<br>&gt; &gt;&gt; Learn more.<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt; &gt; sr-users@lists.sip-router.org<br>&gt; &gt; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br>&gt; &gt;<br>&gt; <br>&gt; -- <br>&gt; Sent from my mobile device<br>                                               <br /><hr />Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2' target='_new'>See how.</a></body>
</html>