Re: how to Register with OpenSIPS?: help needed!!

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

Re: how to Register with OpenSIPS?: help needed!!

Christian Cambier

Hi.

Here's what i try to do: I have a SipPhone with extension 5006
Without proxy i register at a PBX with address (10.1.2.3). Ok, no problem

What I'm struggling with is, how can i have this phone register at that PBX when every SIP request has to pass via a OpenSIPS proxy first.
Somehow the proxy must know how to forward REGISTER messages to the PBX no? I'd say, It must know the existence of the PBX.
Or don't I need the PBX for REGISTER? 
But surely, INVITE must pass the PBX no?

Anyway, how do I have a cooporate OpenSIPS proxy with a PBX?
Where to configure what?

Please help!!!

thx
Chris


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

Re: how to Register with OpenSIPS?: help needed!!

Ali Pey
Your sip phones only register to the opensips servers. Your pbx dosen't need to sip registrations.
Your sip phones only talk to the opensips servers, opensips then will forward the calls to the pbx.
The pbx only talks to the opensips servers, then opensips will send the call to the sip phones based on the registration server.
Basically opensips would be your proxy server. It keeps and digests all the registration info and will handle the routing between your sip clients/trunks and your pbxs.
You need some reading and some help. This is the general idea.

Regards,
Ali Pey



On Thu, Nov 15, 2012 at 7:59 AM, Christian Cambier <[hidden email]> wrote:

Hi.

Here's what i try to do: I have a SipPhone with extension 5006
Without proxy i register at a PBX with address (10.1.2.3). Ok, no problem

What I'm struggling with is, how can i have this phone register at that PBX when every SIP request has to pass via a OpenSIPS proxy first.
Somehow the proxy must know how to forward REGISTER messages to the PBX no? I'd say, It must know the existence of the PBX.
Or don't I need the PBX for REGISTER? 
But surely, INVITE must pass the PBX no?

Anyway, how do I have a cooporate OpenSIPS proxy with a PBX?
Where to configure what?

Please help!!!

thx
Chris


_______________________________________________
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: how to Register with OpenSIPS?: help needed!!

Christian Cambier
In reply to this post by Christian Cambier

Hello.

>"Your sip phones only register to the opensips servers. Your pbx dosen't

>need to sip registrations."
But what do you do then with the account-settings that were created on the PBX?
Account-settings like username and password, do you need to redefine them on the proxy then and not anymore on the PBX?

>Your sip phones only talk to the opensips servers, opensips then will
>forward the calls to the pbx.

But how does the opensips know to which PBX to forward the call to.
Is has to be defined somewhere? But where and how please?


regards


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

Re: how to Register with OpenSIPS?: help needed!!

SamyGo
I really suggest you to first go through the opensips.org pages. Read some basic tutorials from there. If possible read the opensips book too. There areplenty of blog posts our there as well on exactly what you are saying and want.

Just follow a few and you'll start understanding what you need to do in order to tell opensips what to do on which conditions and where to route the calls based on those decisions.

BR
Sammy




On Thu, Nov 15, 2012 at 7:46 PM, Christian Cambier <[hidden email]> wrote:

Hello.


>"Your sip phones only register to the opensips servers. Your pbx dosen't

>need to sip registrations."
But what do you do then with the account-settings that were created on the PBX?
Account-settings like username and password, do you need to redefine them on the proxy then and not anymore on the PBX?

>Your sip phones only talk to the opensips servers, opensips then will
>forward the calls to the pbx.

But how does the opensips know to which PBX to forward the call to.
Is has to be defined somewhere? But where and how please?


regards


_______________________________________________
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: how to Register with OpenSIPS?: help needed!!

Ali Pey
In reply to this post by Christian Cambier
Yes, all the account info would be in opensips. Your pbx's configuration will be quite simpler.
There are many ways that opensips can distribute the calls to PBXs. You can use the load balancer, drouting or dispatcher modules. If you don't have many pbxs, you can simply include the ip addresses in your opensips.cfg file. The call will be forwarded to those ip addresses.

Have a look at registrar, authentication, load balancer, drouting, dispatcher and dial plan modules. Also there are three sample opensips.cfg files created by opensips installation that you can use as a reference.

Regards,
Ali Pey


On Thu, Nov 15, 2012 at 9:46 AM, Christian Cambier <[hidden email]> wrote:

Hello.


>"Your sip phones only register to the opensips servers. Your pbx dosen't

>need to sip registrations."
But what do you do then with the account-settings that were created on the PBX?
Account-settings like username and password, do you need to redefine them on the proxy then and not anymore on the PBX?

>Your sip phones only talk to the opensips servers, opensips then will
>forward the calls to the pbx.

But how does the opensips know to which PBX to forward the call to.
Is has to be defined somewhere? But where and how please?


regards


_______________________________________________
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: how to Register with OpenSIPS?: help needed!!

Alex Ionescu-2
In reply to this post by Christian Cambier
Hi Christian,

It would be interesting if you could describe a little bit more the scenario that you are trying to setup. From what you've told us until now this is what I understand:
- you have a PBX where you used to register your phones
- you want to use OpenSIPS as a proxy ... here things are getting a bit blurry

So, a few main ideas:
- if you register your phones on OpenSIPS there is no need to register them also on the PBX
- if you use this PBX in order to terminate calls then it is very simple to make it work with Opensips, this is what you must do:
    a) register your phones on OpenSIPS
    b) configure a routing rule in OpenSIPS to instruct OpenSIPS to send all calls from your phones to your PBX(s)
    c) configure your PBX to accept traffic from OpenSIPS

In order to configure a routing rule use OpenSIPS Control Panel >System -> Dynamic Routing and do the following:
    a) Use the Gateways tool to define your PBX as a gateway for OpenSIPS
    b) Use the Rules tool to define rule that will send all the calls to your newly defined carrier
    c) Apply your changes and your are ready to go - is that simple

Now, let me know if this is what you want to do and if we can assist in doing this.

Regards,
Alex Ionescu

On 11/15/2012 04:46 PM, Christian Cambier wrote:

Hello.

>"Your sip phones only register to the opensips servers. Your pbx dosen't

>need to sip registrations."
But what do you do then with the account-settings that were created on the PBX?

Account-settings like username and password, do you need to redefine them on the proxy then and not anymore on the PBX? 



>Your sip phones only talk to the opensips servers, opensips then will
>forward the calls to the pbx.

But how does the opensips know to which PBX to forward the call to.
Is has to be defined somewhere? But where and how please?


regards



_______________________________________________
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: how to Register with OpenSIPS?: help needed!!

Christian Cambier
In reply to this post by Christian Cambier

Hello.

>… you can simply include the ip addresses in your opensips.cfg

>file. The call will be forwarded to those ip addresses.

I know I'll have to read more about it (and I will) but in order to save some time now

could you show some sample code about how to include the ip addresses in a opensips.cfg?

 

regards
Chris


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

Re: how to Register with OpenSIPS?: help needed!!

Christian Cambier
In reply to this post by Christian Cambier
Hello Alex.

Thank you Alexe and Ali and Samy for your feedback.

> - if you register your phones on OpenSIPS there is no need to register

>them also on the PBX

Ok, I forget about the PBX for my registration. but trying to registrate on openSIPS doesn't work.
It would be really if this problem could be solved!!!

So, I don't manage to register my sipphone.
Here's what I do.

Domain used on opensips-server (ip=10.0.4.34) is added in the mysql table
mysql> select * from domain;

+----+-----------+---------------------+

| id | domain    | last_modified       |

+----+-----------+---------------------+

|  1 | 10.0.4.34 | 2012-11-13 15:24:23 |

+----+-----------+---------------------+

I have 1 user registered in OpenSIPS (in the subscribe-table, is this the correct table to add users?)
mysql> select * from subscriber;

+----+----------+-----------+----------+---------------+----------------------------------+----------------------------------+------+

| id | username | domain    | password | email_address | ha1                              | ha1b                             | rpid |

+----+----------+-----------+----------+---------------+----------------------------------+----------------------------------+------+

|  1 | 5006     | 10.0.4.34 |          |               | 9d576f5a62c6bc6e46b20d1b6d9e2ad7 | c33ca435f9c3c8b87a11b013c32df2c8 | NULL |

+----+----------+-----------+----------+---------------+----------------------------------+----------------------------------+------+


Here's what I send from UAC
                username/extension: 5006
                no password
                registrar: 10.0.4.34

REGISTER sip:10.0.4.34:5060 SIP/2.0 
Via: SIP/2.0/TCP 10.0.46.1:50666;rport;branch=z9hG4bKPj5be69cb0d02144bdb9d2777431d88264 
Route: <sip:10.0.4.34:5060;transport=TCP;lr> 
Max-Forwards: 70 
From: "cid5006" <sip:5006@10.0.4.34>;tag=2992022966fa4dca862118d12678d4a1 
To: "cid5006" <sip:5006@10.0.4.34> 
Call-ID: 56966ef0ba474bca919ef8a67db0659b 
CSeq: 27976 REGISTER 
User-Agent: VoxtronSipPhone_01.00.009.002 
Supported: outbound, path 
Contact: "cid5006" <sip:5006@10.0.46.1:5081;transport=TCP;ob>;reg-id=1;+sip.instance="<urn:uuid:00000000-0000-0000-0000-000064bc79c6>" 
Expires: 300 
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS 
Content-Length: 0 

here's the response

SIP/2.0 403 Preload Route denied
Via: SIP/2.0/TCP 10.0.46.1:50666;received=10.0.46.1;rport=50666;branch=z9hG4bKPj5be69cb0d02144bdb9d2777431d88264 
From: "cid5006" <sip:5006@10.0.4.34>;tag=2992022966fa4dca862118d12678d4a1 
To: "cid5006" <sip:5006@10.0.4.34>;tag=cb89901742d7fa34dfcce4fffa472cde.5c91 
Call-ID: 56966ef0ba474bca919ef8a67db0659b 
CSeq: 27976 REGISTER 
Server: OpenSIPS (1.8.0-notls (x86_64/linux)) 
Content-Length: 0 


The response comes from following code that is executred in my config file

       # preloaded route checking

        if (loose_route()) {

                xlog("L_ERR",

                "Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci] );

                if (!is_method("ACK"))

                        sl_send_reply("403","Preload Route denied");

                exit;

        }


How to solve this?

regards
CHris


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