[SR-Users] Placing ds_select_dst in kamailio.cfg, where?

Henrik Aagaard Sørensen henrikaagaardsorensen at gmail.com
Thu Sep 29 15:40:48 CEST 2011


Hi Daniel.

I appreciate all the help I can get, very much.

This is my configuration so far: http://pastebin.com/AYprC7Rm

Where would you put it?

Best regards,
Henrik

On Thu, Sep 29, 2011 at 10:47 AM, Daniel-Constantin Mierla <
miconda at gmail.com> wrote:

>  Hello,
>
> please keep the mainling list cc-ed.
>
> Calling ds_select_dst() first in the main route block is not really a good
> place. First you have to handle sanity checks, within dialog requests a.s.o.
> Of course it is a matter of your purpose, but as general hint, selecting the
> destination should be done just (or as close as possible) before relaying.
>
> If you take default config and you have only load balancing, then you can
> replace location lookup part with load balancing. Other parts may be
> stripped as well, just giving some direction here.
>
> Cheers,
> Daniel
>
>
> On 9/28/11 11:11 PM, Henrik Aagaard Sørensen wrote:
>
> That did the job.
>
> I just placed the ds_select_dst-code at the very first thing after route{
>
> Thank you for your help!
>
> 2011/9/28 Daniel-Constantin Mierla <miconda at gmail.com>
>
>>  Hello,
>>
>> the devel version of dispatcher module README has a different config
>> example, maybe it helps you more:
>>
>> http://kamailio.org/docs/modules/devel/modules_k/dispatcher.html#id2522847
>>
>> I am considering to update it again soon to be a bit more complete and
>> follow the structure of the default config file shipped with kamailio.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 9/28/11 6:30 PM, Henrik Aagaard Sørensen wrote:
>>
>> Hi Carsten.
>>
>> The configuration works. It's actually where (which line) in the
>> configuration I should put:
>> ds_select_dst("1", "0");
>>
>> :) I'm not strong in Kamailio and just want it to load balance between
>> Freswitch servers. So I have a basic installation of Kamailio, without
>> MySQL, NAT, Auth etc.
>>
>> On Wed, Sep 28, 2011 at 5:09 PM, Carsten Bock <carsten at ng-voice.com>wrote:
>>
>>> Hi,
>>>
>>> When you've got problems with placing "ds_select_dst()" in your
>>> config, you should do the following:
>>> - Open an Editor of your choice
>>> - go to the line, where you want to place it
>>> - type: ds_select_dst("1", "0");
>>> - save & exit
>>>
>>> Just kidding! You should do the following with your config:
>>> kamailio -f <path-to-your-config> -c
>>>
>>> What error is displayed? If none, then check your syslog for errors.
>>> Could you post your config? It is better to put a full path in the
>>> config to the dispatcher-file... otherwise it might be dependent of,
>>> where you are running the init.d-skript/kamailio....
>>>
>>> I am using dispatcher in Kamailio 1.5, 3.1 and 3.2, everythings works
>>> fine with me.
>>>
>>> Kind regards,
>>> Carsten
>>>
>>> 2011/9/28 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>:
>>>  > I've installed 2 Freeswitch on different servers and would like to
>>> have
>>> > Kamailio load balance between them.
>>> >
>>> > I've installed Kamailio following:
>>> >
>>> http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
>>> >
>>> > I've created dispatcher.list and added:
>>> >
>>> > loadmodule "dispatcher.so"
>>> >
>>> > modparam("dispatcher", "list_file", "../etc/dispatcher.list")
>>> >
>>> > in the kamailio.cfg.
>>> >
>>> > But looking at:
>>> > http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html
>>> > I'm having difficulties to placing:
>>> >
>>> > ds_select_dst("1", "0");
>>> >
>>> > in the kamailio.cfg that was created originally.
>>> >
>>> > Can anyone help me?
>>> >
>>>  > _______________________________________________
>>> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> > sr-users at lists.sip-router.org
>>> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Carsten Bock
>>> CEO (Geschäftsführer)
>>>
>>> ng-voice GmbH i. Gr.
>>> Schomburgstr. 80
>>> D-22767 Hamburg / Germany
>>>
>>> http://www.ng-voice.com
>>> mailto:carsten at ng-voice.com
>>>
>>> Mobile +49 179 2021244 <%2B49%20179%202021244>
>>> Office +49 40 34927219 <%2B49%2040%2034927219>
>>> Fax +49 40 34927220 <%2B49%2040%2034927220>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>   --
>> Daniel-Constantin Mierla -- http://www.asipto.com
>> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
>>
>>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110929/ce96cc81/attachment.htm>


More information about the sr-users mailing list