Git Product home page Git Product logo

dispatcher's Introduction

dispatcher

Simple config file of Kamailio as Loadblancer for calls and registrations

This is simple config for somebody who need to use Kamailio as Loadbalancer in front of Freeswitch or Asterisk. This particular configuration will Loadbalance not only INVITEs, but registrations too.

Following configuration I took as template: http://kamailio.org/docs/modules/5.3.x/modules/dispatcher.html#dispatcher.ex.config

On freeswitch side I added following lines to sip profile config:

<param name="all-reg-options-ping" value="true"/>

<param name="nat-options-ping" value="true"/>

Additionnally you need to configure domain in vars.xml:

<X-PRE-PROCESS cmd="set" data="domain=ip_or_domain_name_of_kamailio_server"/>

To make this configuration work you will need to add freeswitch/asterisk to list file(dispather.list as example) or to mysql db.

To make DB work you will need to uncomment lines related to DB and make sure that DB url is set properly and don't forget to remove line where list file is set).

And off cause you will need to insert related data:

INSERT INTO dispatcher(setid, destination, flags, priority) values (1, 'sip:freeswitchip1:5060', 0, 0);

INSERT INTO dispatcher(setid, destination, flags, priority) values (1, 'sip:freeswitchip2:5060', 0, 0);

Please make sure that setid is 1 for both servers.

dispatcher's People

Contributors

os11k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dispatcher's Issues

Kamailio does not start

Hi. I am trying to setup a dispatcher to my 2 Asterisk boxes (192.168.1.232 & 192.168.1.233). Kamailio has the IP 192.168.1.218. I did install Kamailio from deb repo (5.3) and it is up and running. 4 extensions (101, 102, 103, 104) have been created and can talk to each other.
I am looking for Kamailio to have all the registrations and forward the media services to the Asterisk boxes.
Once i did the changes of kamailio.cfg and added the dispatcher.list, kamailio does not start and journactl -xe shows the following errors: errors.txt

The following 2 are the kamailio.cfg and dispatcher.list
dispatcher.list.txt
kamailio.cfg.txt

In each Asterisk box i have in sip.conf

[kamailio]
host=192.168.1.218
port=5060
insecure=invite
type=friend
context=from-pstn

i would appreciate any help available to fix the issue, please.

dispatcher 2 asterisk

hi Guy,
i config my kamailio with his config, and it working 1 kamailio --> dispatcher 1 asterisk
i register 2 my sip asterisk account via kamailio work fine.
But i config my kamailio with his config, and it working 1 kamailio --> dispatcher 2 asterisk(loadbalancing), it not working , i can't register and call two between 2 device

Problem with ACK Relay

Hi Bro,

It is strange that kamailio cannot relay ACK

image

I am using default repo of Kamailio and Asterisk backend on Ubuntu 22.04.

Regards,

Getting error messages in logs

Hi,

I have recently installed kamailio on my linux debian and while making calls it is showing errors in the logs. Kindly help me with this.

Oct 30 18:11:41 balaji-Virtualbox kamailio[2781]: 27(2781) ERROR: {2 2 INVITE PS1XPCblBqE35MWzOu8awA..} db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Unknown column 'src_user' in 'field list' (1054)
Oct 30 18:11:41 balaji-Virtualbox kamailio[2781]: 27(2781) ERROR: {2 2 INVITE PS1XPCblBqE35MWzOu8awA..} [db_query.c:244]: db_do_insert_cmd(): error while submitting query
Oct 30 18:11:41 balaji-Virtualbox kamailio[2781]: 27(2781) ERROR: {2 2 INVITE PS1XPCblBqE35MWzOu8awA..} acc [acc.c:490]: acc_db_request(): failed to insert into database
Oct 30 18:12:07 balaji-Virtualbox kamailio[2783]: 29(2783) NOTICE: {2 3 BYE PS1XPCblBqE35MWzOu8awA..} acc [acc.c:287]: acc_log_request(): ACC: transaction answered: timestamp=1635597727;method=BYE;from_tag=eb9fe459;to_tag=xy0ppd4;call_id=PS1XPCblBqE35MWzOu8awA..;code=200;reason=Ok;src_user=123;src_domain=192.168.1.8;src_ip=192.168.1.3;dst_ouser=456;dst_user=456;dst_domain=192.168.1.4
Oct 30 18:12:07 balaji-Virtualbox kamailio[2783]: 29(2783) ERROR: {2 3 BYE PS1XPCblBqE35MWzOu8awA..} db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Unknown column 'src_user' in 'field list' (1054)
Oct 30 18:12:07 balaji-Virtualbox kamailio[2783]: 29(2783) ERROR: {2 3 BYE PS1XPCblBqE35MWzOu8awA..} [db_query.c:244]: db_do_insert_cmd(): error while submitting query
Oct 30 18:12:07 balaji-Virtualbox kamailio[2783]: 29(2783) ERROR: {2 3 BYE PS1XPCblBqE35MWzOu8awA..} acc [acc.c:490]: acc_db_request(): failed to insert into database

Thanks,
Balaji

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.