I expected at east one reply saying that the question is stupid, and the solution is simple !!<div>Any folks who can help me understand only how to achieve this in FS which is acheivable in asterisk as follows:</div><div>domain = <a href="http://mydomain.com">mydomain.com</a>, mydomain (If any call has domain as &quot;<a href="http://mydomain.com">mydomain.com</a>&quot;, the call goes to context &quot;mydomain&quot; in dialplan)</div>
<div>domain = <a href="http://yourdomain.com">yourdomain.com</a>, yourdomain (if any call has domain as &quot;<a href="http://yourdomain.com">yourdomain.com</a>&quot;, the call goes to context &quot;yourdomain&quot; in dialplan)</div>
<div><br></div><div>These calls can come from anywhere, in my case it comes from an Opensips instance !!</div><div><br></div><div>Thanks for any replies :)</div><div><br></div><div>--- Jayesh<br><br><div class="gmail_quote">
On Thu, Apr 1, 2010 at 1:35 AM, Jayesh Nambiar <span dir="ltr">&lt;<a href="mailto:jayesh.voip@gmail.com">jayesh.voip@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi All,<div>I am quite very new to freeswitch and I am kind of playing with it to understand it better.</div><div>I am primarily using Opensips as registrar and SIP Proxy and intend to use FS as media server handling voicemails, IVR, Announcements, MeetMe etc. My Opensips is a multi-domain setup and I wish to have all the configuration of media-capabilties segregated domain-wise in the FS too.</div>

<div><br></div><div>For eg: When a call for <a href="mailto:user@domain1.com" target="_blank">user@domain1.com</a> needs to go to voicemail, I redirect that call to FS IP address keeping the URI intact. I add the mailbox number as a header as X-Mailbox and have FS extract it and go to appropriate mailbox. Similarly when a call for <a href="mailto:user@domain2.com" target="_blank">user@domain2.com</a> needs to go to voicemail I do the same thing.</div>

<div>The requirement is I want to maintain the dialplans for each domains separately. Thus if call from Opensips comes to FS with domain as domain1, the call should go to dialplan context domain1 and similarly if call from Opensips comes to FS with domain2 the call handling should be mentioned in the domain2 context. </div>

<div><br></div><div>The problem is; I am not able to send the calls to respective contexts according to their domains when they come from Opensips. I&#39;ve read the examples on multi-domain setup and have tried taking some help from that example, but whenever the call comes from Opensips to FS, it tries to go into the context that is defined in the SIP Profile. If i don&#39;t mention anything in the SIP Profile, it tries to search for default context.</div>

<div>I have tried the following:</div><div>1) Created file domain1.xml and domain2.xml in the directory folder.</div><div>2) mentioned parameters in domain1.xml as follows:</div><div>&lt;include&gt;</div><div>&lt;domain name = &quot;<a href="http://domain1.com" target="_blank">domain1.com</a>&quot;</div>

<div>&lt;params&gt;</div><div>&lt;param name=&quot;user_context&quot; value &quot;<a href="http://domain1.com" target="_blank">domain1.com</a>&quot;/&gt;</div><div>&lt;/params&gt;</div><div>&lt;/domain&gt;</div><div>&lt;/include&gt;</div>

<div>3) Similarly done for file domain2.xml.</div><div><br></div><div>But I am just not able to get the calls to the required context according to the domain value in the r-uri. In asterisk something like this in sip.conf worked fine for me:</div>

<div>domain=<a href="http://domain1.com" target="_blank">domain1.com</a>, <a href="http://domain1.com" target="_blank">domain1.com</a></div><div>domain=<a href="http://domain2.com" target="_blank">domain2.com</a>, <a href="http://domain2.com" target="_blank">domain2.com</a></div>
<div>
Can someone please help me understanding where I am going wrong or have I mis-understood something?</div><div><br></div><div>Thanks in advance !!</div><div><br></div><font color="#888888"><div>--- Jayesh</div><div><br></div>
<div>                </div>
</font></blockquote></div><br></div>