Opensips SIP trunk call handling

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Opensips SIP trunk call handling

Francjos
Hello,

I wish to configure Opensips that have to act as load balancer to freeswitch boxes.
When i directly connect freeswitch to the trunk, incoming calls are managed in /usr/local/freeswitch/conf/dialplan/public/ directory. What about if i use load balancing? Where do i have to manage incoming (and out ) calls? IN Freeswitch or in Opensips?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

aqsyounas

You need to manage calls in freeswitch.

On Apr 8, 2016 12:32 PM, "Francjos" <[hidden email]> wrote:
Hello,

I wish to configure Opensips that have to act as load balancer to freeswitch
boxes.
When i directly connect freeswitch to the trunk, incoming calls are managed
in /usr/local/freeswitch/conf/dialplan/public/ directory. What about if i
use load balancing? Where do i have to manage incoming (and out ) calls? IN
Freeswitch or in Opensips?

Thanks



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Francjos
Thanks .Can you please give me more details on how i have to proceed.
Thanks again
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Benjamin Cropley
Franjos,


Versions are a little out of date, but I think it looks correct still

Ben

On Fri, Apr 8, 2016 at 9:27 AM, Francjos <[hidden email]> wrote:
Thanks .Can you please give me more details on how i have to proceed.
Thanks again



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602556.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Francjos
Thank you for redirecting me to the tutorial. I picked up a part of what i need,i think i can adjust it to my needs but the problem i still have is where to include the logic of load balancing in opensips.cfg. The logic is the following:

 if (is_method("INVITE")) {
                if (!load_balance("1","pstn","1")) {
                        send_reply("503","Service Unavailable");
                        exit;
                }
        }
        else if (is_method("REGISTER")) {
                if (!ds_select_dst("1", "0")) {
                        send_reply("503","Service Unavailable");
                        exit;
                }
        }
        else {
                send_reply("405","Method Not Allowed");
                exit;
        }

So that Opensips can routes calls to the write Freeswitch.

Thanks again.
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Benjamin Cropley
No problem.

If that's all you want to do, then just include it within a route{} block and you should be good to go.

I will say, of that's all you want to do, when you 'load balance the invite to FS', FS will respond with a 100 trying - and at the minute your script will reply to FS with a 405..

Perhaps you should spend some time reading about SIP, as it'll help you more easily implement stuff on OpenSIPS

On Fri, Apr 8, 2016 at 10:12 AM, Francjos <[hidden email]> wrote:
Thank you for redirecting me to the tutorial. I picked up a part of what i
need,i think i can adjust it to my needs but the problem i still have is
where to include the logic of load balancing in opensips.cfg. The logic is
the following:

 if (is_method("INVITE")) {
                if (!load_balance("1","pstn","1")) {
                        send_reply("503","Service Unavailable");
                        exit;
                }
        }
        else if (is_method("REGISTER")) {
                if (!ds_select_dst("1", "0")) {
                        send_reply("503","Service Unavailable");
                        exit;
                }
        }
        else {
                send_reply("405","Method Not Allowed");
                exit;
        }

So that Opensips can routes calls to the write Freeswitch.

Thanks again.



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602558.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Francjos
First, I'm gonna  test the simple case without load balancing , i'll do changes after i success the simple routing.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Francjos
In reply to this post by Benjamin Cropley
To tell Freeswitch that calls come from Opensips proxy, do i have to create a new external profile in sip_profiles directory or add an extension in dialplan/public.xml or both of two?

Second question, in this file :/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml , i read that i have to specify the CIDR, is the ip address the one of Opensips?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

aqsyounas

You better ask this question on freeswitch list.

Anyway you need to handle call in public.xml and add ip in acl too.

On Apr 8, 2016 6:51 PM, "Francjos" <[hidden email]> wrote:
To tell Freeswitch that calls come from Opensips proxy, do i have to create a
new external profile in sip_profiles directory or add an extension in
dialplan/public.xml or both of two?

Second question, in this file
:/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml , i read that i
have to specify the CIDR, is the ip address the one of Opensips?

Thank you



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602562.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Francjos
Thank you for your reply
Reply | Threaded
Open this post in threaded view
|

Re: Opensips SIP trunk call handling

Francjos
In reply to this post by aqsyounas
Hello,
I sent you invitation on skype,nduwayezu Joselyne on skype,  i'm waiting for your reply.I still have problems with the incoming call throught Opensips.
I rely on your help please!!