<div>Hi,</div><div>Sorry for sounding so impatient, the anxiety only grew because before posting it to the list I spent a week on reading all the documentation available on and around this topic FS site and mailing lists. I really appreciate and am thankful for your suggestions.</div>
<div>I'll try out the suggestions given by you. Is there a way that we can compare the domain name in the dialplan using regular expressions. Is there a value in condition tag that can be used to compare this, something like "extension_number".</div>
<div>Or should I store the domain value in some variable(something like sip_h_<domain_name>) and compare that variable to take the call to a different context?</div><div><br></div><div>Thanks,</div><div><br></div><div>
--- Jayesh</div><br>---------- Forwarded message ----------<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">From: Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>><br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>Date: Sat, 3 Apr 2010 09:11:50 -0600<br>Subject: Re: [Freeswitch-users] domain-wise context<br><a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_transfer" target="_blank">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_transfer</a><br>
<a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_execute_extension" target="_blank">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_execute_extension</a><br>
<br>The first one transfers the call to the desired exten/dialplan/context and the 2nd one executes the specified extension in a similar manner and returns to the same point in the dp.<br><br>You make one inbound context and use routing logic from there to decide which context to transfer to.<br>
<br>Next time, please have a little more patience, I don't like it when people reply to themselves on the list asking why nobody answered when their question is only unanswered for 2 days especially during a holiday weekend.<br>
<br> <br><br><div class="gmail_quote">On Sat, Apr 3, 2010 at 1:43 AM, Jayesh Nambiar <span dir="ltr"><<a href="mailto:jayesh.voip@gmail.com" target="_blank">jayesh.voip@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
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" target="_blank">mydomain.com</a>, mydomain (If any call has domain as "<a href="http://mydomain.com" target="_blank">mydomain.com</a>", the call goes to context "mydomain" in dialplan)</div>
<div>domain = <a href="http://yourdomain.com" target="_blank">yourdomain.com</a>, yourdomain (if any call has domain as "<a href="http://yourdomain.com" target="_blank">yourdomain.com</a>", the call goes to context "yourdomain" 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><font color="#888888">--- Jayesh</font><div>
<div></div><div><br><br><div class="gmail_quote">
On Thu, Apr 1, 2010 at 1:35 AM, Jayesh Nambiar <span dir="ltr"><<a href="mailto:jayesh.voip@gmail.com" target="_blank">jayesh.voip@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;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'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'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><include></div><div><domain name = "<a href="http://domain1.com" target="_blank">domain1.com</a>"</div>
<div><params></div><div><param name="user_context" value "<a href="http://domain1.com" target="_blank">domain1.com</a>"/></div><div></params></div><div></domain></div><div></include></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></font></blockquote>
</div></div></div></div></blockquote></div></blockquote></div>