[Freeswitch-users] domain-wise context

Jayesh Nambiar jayesh.voip at gmail.com
Sat Apr 3 20:47:58 PDT 2010


Hi,
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.
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".
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?

Thanks,

--- Jayesh

---------- Forwarded message ----------

> From: Anthony Minessale <anthony.minessale at gmail.com>
> To: freeswitch-users at lists.freeswitch.org
> Date: Sat, 3 Apr 2010 09:11:50 -0600
> Subject: Re: [Freeswitch-users] domain-wise context
> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_transfer
> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_execute_extension
>
> 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.
>
> You make one inbound context and use routing logic from there to decide
> which context to transfer to.
>
> 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.
>
>
>
> On Sat, Apr 3, 2010 at 1:43 AM, Jayesh Nambiar <jayesh.voip at gmail.com>wrote:
>
>> I expected at east one reply saying that the question is stupid, and the
>> solution is simple !!
>> Any folks who can help me understand only how to achieve this in FS which
>> is acheivable in asterisk as follows:
>> domain = mydomain.com, mydomain (If any call has domain as "mydomain.com",
>> the call goes to context "mydomain" in dialplan)
>> domain = yourdomain.com, yourdomain (if any call has domain as "
>> yourdomain.com", the call goes to context "yourdomain" in dialplan)
>>
>> These calls can come from anywhere, in my case it comes from an Opensips
>> instance !!
>>
>> Thanks for any replies :)
>>
>> --- Jayesh
>>
>>
>> On Thu, Apr 1, 2010 at 1:35 AM, Jayesh Nambiar <jayesh.voip at gmail.com>wrote:
>>
>>> Hi All,
>>> I am quite very new to freeswitch and I am kind of playing with it to
>>> understand it better.
>>> 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.
>>>
>>> For eg: When a call for user at domain1.com 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 user at domain2.com needs to
>>> go to voicemail I do the same thing.
>>> 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.
>>>
>>> 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.
>>> I have tried the following:
>>> 1) Created file domain1.xml and domain2.xml in the directory folder.
>>> 2) mentioned parameters in domain1.xml as follows:
>>> <include>
>>> <domain name = "domain1.com"
>>> <params>
>>> <param name="user_context" value "domain1.com"/>
>>> </params>
>>> </domain>
>>> </include>
>>> 3) Similarly done for file domain2.xml.
>>>
>>> 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:
>>> domain=domain1.com, domain1.com
>>> domain=domain2.com, domain2.com
>>>  Can someone please help me understanding where I am going wrong or have
>>> I mis-understood something?
>>>
>>> Thanks in advance !!
>>>
>>> --- Jayesh
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100404/b97417cd/attachment-0001.html 


More information about the FreeSWITCH-users mailing list