Number portability

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

Number portability

Paul Mancheno H.
Hello.

I have a project to do a system to implement numerical portability, the calls
go out from my Softswitch and they would go directly to OpenSIPs and I look in
a database (Postgresql or MySql) for the route that I must take, return a
message with code 302 using a prefix depending on the route and this way my
Softswtich, on having reanalyzed the number now, sends it on the other hand.

Can I do that with OpenSIP?
Can I have a pool of connections to the database so that one is not gaining
access all the time?
Perhaps is it better to use a project as Sailfin?

A lot of thanks.

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

Re: Number portability

Alex Balashov
Yes, you can.

Just beware that you will _have_ to use something like 302s.  If you  
send the INVITE request back to the switch, it will be considered a  
call loop.

--
Sent from mobile device

On Jul 10, 2009, at 2:09 PM, "Paul Mancheno H." <[hidden email]>  
wrote:

> Hello.
>
> I have a project to do a system to implement numerical portability,  
> the calls
> go out from my Softswitch and they would go directly to OpenSIPs and  
> I look in
> a database (Postgresql or MySql) for the route that I must take,  
> return a
> message with code 302 using a prefix depending on the route and this  
> way my
> Softswtich, on having reanalyzed the number now, sends it on the  
> other hand.
>
> Can I do that with OpenSIP?
> Can I have a pool of connections to the database so that one is not  
> gaining
> access all the time?
> Perhaps is it better to use a project as Sailfin?
>
> A lot of thanks.
>
> _______________________________________________
> 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: Number portability

Victor Pascual Avila
On Fri, Jul 10, 2009 at 8:12 PM, Alex Balashov<[hidden email]> wrote:
> Yes, you can.
>
> Just beware that you will _have_ to use something like 302s.  If you
> send the INVITE request back to the switch, it will be considered a
> call loop.

Unless you added ;npdi or ;rn parameters to the RURI
--
Victor Pascual Ávila

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

Re: Number portability

Alex Balashov
Victor Pascual Avila wrote:
> On Fri, Jul 10, 2009 at 8:12 PM, Alex Balashov<[hidden email]> wrote:
>> Yes, you can.
>>
>> Just beware that you will _have_ to use something like 302s.  If you
>> send the INVITE request back to the switch, it will be considered a
>> call loop.
>
> Unless you added ;npdi or ;rn parameters to the RURI

I am not sure how adding those parameters would circumvent the
fundamental problem.

   Softswitch --> call leg 1 --> proxy --> still call leg 1 --> softswitch

--
Alex Balashov
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

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

Re: Number portability

Victor Pascual Avila
On Fri, Jul 10, 2009 at 8:42 PM, Alex Balashov<[hidden email]> wrote:

> Victor Pascual Avila wrote:
>>
>> On Fri, Jul 10, 2009 at 8:12 PM, Alex Balashov<[hidden email]>
>> wrote:
>>>
>>> Yes, you can.
>>>
>>> Just beware that you will _have_ to use something like 302s.  If you
>>> send the INVITE request back to the switch, it will be considered a
>>> call loop.
>>
>> Unless you added ;npdi or ;rn parameters to the RURI
>
> I am not sure how adding those parameters would circumvent the fundamental
> problem.
>
>  Softswitch --> call leg 1 --> proxy --> still call leg 1 --> softswitch

The idea was not creating a loop but an spiral instead.

In such scenario, one could be using the following routing options (I
don't really know whether they are all implementable using opensips or
not):
- Direct routing: get invite, npdb dip, route the invite based on the
result (npdi, rn).
- Redirect routing: get invite, npdb dip, send back 302 (npdi, rn)
- Route updated invite back (spiral): get invite, npdb dip, send back
the updated invite (npdi, rn).

Cheers,
--
Victor Pascual Ávila

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

Re: Number portability

Iñaki Baz Castillo
In reply to this post by Alex Balashov
El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
> Victor Pascual Avila wrote:
> > On Fri, Jul 10, 2009 at 8:12 PM, Alex Balashov<[hidden email]>
wrote:

> >> Yes, you can.
> >>
> >> Just beware that you will _have_ to use something like 302s.  If you
> >> send the INVITE request back to the switch, it will be considered a
> >> call loop.
> >
> > Unless you added ;npdi or ;rn parameters to the RURI
>
> I am not sure how adding those parameters would circumvent the
> fundamental problem.
>
>    Softswitch --> call leg 1 --> proxy --> still call leg 1 --> softswitch

npdi and rp are *userinfo* parameters (in fact they are TEL URI paremeters so
when converting to SIP URI they become part of the userinfo part).
  http://www.tech-invite.com/Ti-sip-abnf.html#teluri

So, if the original RURI is:
  sip:+[hidden email]

and OpenSIPS modifies it to:
  sip:+12345678;npdi=123;rn=[hidden email]

then both RURI's are differents and the softsiwtch won't consider it a loop.

However, if the parameters are added as SIP URI parameters (after the
hostpart) the it would be a loop (except if they are maddr, user, ttl).


--
Iñaki Baz Castillo <[hidden email]>

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

Re: Number portability

Alex Balashov
Iñaki Baz Castillo wrote:

> El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
>> Victor Pascual Avila wrote:
>>> On Fri, Jul 10, 2009 at 8:12 PM, Alex Balashov<[hidden email]>
> wrote:
>>>> Yes, you can.
>>>>
>>>> Just beware that you will _have_ to use something like 302s.  If you
>>>> send the INVITE request back to the switch, it will be considered a
>>>> call loop.
>>> Unless you added ;npdi or ;rn parameters to the RURI
>> I am not sure how adding those parameters would circumvent the
>> fundamental problem.
>>
>>    Softswitch --> call leg 1 --> proxy --> still call leg 1 --> softswitch
>
> npdi and rp are *userinfo* parameters (in fact they are TEL URI paremeters so
> when converting to SIP URI they become part of the userinfo part).
>   http://www.tech-invite.com/Ti-sip-abnf.html#teluri
>
> So, if the original RURI is:
>   sip:+[hidden email]
>
> and OpenSIPS modifies it to:
>   sip:+12345678;npdi=123;rn=[hidden email]
>
> then both RURI's are differents and the softsiwtch won't consider it a loop.
>
> However, if the parameters are added as SIP URI parameters (after the
> hostpart) the it would be a loop (except if they are maddr, user, ttl).

How does that change the other logical attributes of a call leg, i.e.
Call ID GUID, From tag, CSeq, etc?


--
Alex Balashov
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

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

Re: Number portability

Iñaki Baz Castillo
El Viernes, 10 de Julio de 2009, Alex Balashov escribió:

> > npdi and rp are *userinfo* parameters (in fact they are TEL URI
> > paremeters so when converting to SIP URI they become part of the userinfo
> > part). http://www.tech-invite.com/Ti-sip-abnf.html#teluri
> >
> > So, if the original RURI is:
> >   sip:+[hidden email]
> >
> > and OpenSIPS modifies it to:
> >   sip:+12345678;npdi=123;rn=[hidden email]
> >
> > then both RURI's are differents and the softsiwtch won't consider it a
> > loop.
> >
> > However, if the parameters are added as SIP URI parameters (after the
> > hostpart) the it would be a loop (except if they are maddr, user, ttl).
>
> How does that change the other logical attributes of a call leg, i.e.
> Call ID GUID, From tag, CSeq, etc?

If the RURI changes, then it's *not* a loop, but a spiral. Re-read the
appropiate section in RFC 3261 :)


--
Iñaki Baz Castillo <[hidden email]>

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

Re: Number portability

Brett Nemeroff
Just throwing this out.. Not all equipment can handle SIP Spiral properly. <cough> asterisk <cough> (although I know there was work done on Asterisk+SIP Sprial, I don't know where that ended up)

so be careful before you spend a lot of time on that.  I'd love to hear how all of that works for you. I've got plans to do something similar in the LNP space..
-Brett

On Fri, Jul 10, 2009 at 2:02 PM, Iñaki Baz Castillo <[hidden email]> wrote:
El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
> > npdi and rp are *userinfo* parameters (in fact they are TEL URI
> > paremeters so when converting to SIP URI they become part of the userinfo
> > part). http://www.tech-invite.com/Ti-sip-abnf.html#teluri
> >
> > So, if the original RURI is:
> >   [hidden email]
> >
> > and OpenSIPS modifies it to:
> >   sip:+12345678;npdi=123;rn=[hidden email]
> >
> > then both RURI's are differents and the softsiwtch won't consider it a
> > loop.
> >
> > However, if the parameters are added as SIP URI parameters (after the
> > hostpart) the it would be a loop (except if they are maddr, user, ttl).
>
> How does that change the other logical attributes of a call leg, i.e.
> Call ID GUID, From tag, CSeq, etc?

If the RURI changes, then it's *not* a loop, but a spiral. Re-read the
appropiate section in RFC 3261 :)


--
Iñaki Baz Castillo <[hidden email]>

_______________________________________________


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

Re: Number portability

Alex Balashov
In reply to this post by Iñaki Baz Castillo
Iñaki Baz Castillo wrote:

> El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
>>> npdi and rp are *userinfo* parameters (in fact they are TEL URI
>>> paremeters so when converting to SIP URI they become part of the userinfo
>>> part). http://www.tech-invite.com/Ti-sip-abnf.html#teluri
>>>
>>> So, if the original RURI is:
>>>   sip:+[hidden email]
>>>
>>> and OpenSIPS modifies it to:
>>>   sip:+12345678;npdi=123;rn=[hidden email]
>>>
>>> then both RURI's are differents and the softsiwtch won't consider it a
>>> loop.
>>>
>>> However, if the parameters are added as SIP URI parameters (after the
>>> hostpart) the it would be a loop (except if they are maddr, user, ttl).
>> How does that change the other logical attributes of a call leg, i.e.
>> Call ID GUID, From tag, CSeq, etc?
>
> If the RURI changes, then it's *not* a loop, but a spiral. Re-read the
> appropiate section in RFC 3261 :)

Ah, I see.  I had just thought that something else must change also
besides just the RURI to make a legitimate spiral.  Thank you and Victor
for clarifying that.

--
Alex Balashov
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

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

Re: Number portability

Victor Pascual Avila
In reply to this post by Brett Nemeroff
On Fri, Jul 10, 2009 at 9:06 PM, Brett Nemeroff<[hidden email]> wrote:
> Just throwing this out.. Not all equipment can handle SIP Spiral properly.

Fully agree with that.

> so be careful before you spend a lot of time on that.  I'd love to hear how
> all of that works for you. I've got plans to do something similar in the LNP
> space..

Well, we actually had to implement the three different solutions I've
listed in my previous message in order to interop with different
boxes.

Cheers,
--
Victor Pascual Ávila

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

Re: Number portability

Iñaki Baz Castillo
In reply to this post by Brett Nemeroff
El Viernes, 10 de Julio de 2009, Brett Nemeroff escribió:
> Just throwing this out.. Not all equipment can handle SIP Spiral properly.
> <cough> asterisk <cough> (although I know there was work done on
> Asterisk+SIP Sprial, I don't know where that ended up)

That ended on "hummm, forget these complex scenarios, we just care about SIP
for local networks and ISDN for PSTN".

The suggested path is not tested, and being the comments in the bug report
(comments from Asterisk deevlopers) I expect they are not caapble to solve so
"difficult" issue.

--
Iñaki Baz Castillo <[hidden email]>

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

Re: Number portability

Alex Balashov
In reply to this post by Brett Nemeroff
Brett is very right.   I think one of the reasons I reacted
instinctively to this scenario was because I tried to implement
something similar with a well-known switch once (I think it was a
Metaswitch) and the signaling agent reacted to my "spiral" (which I
didn't know to be such) as though it were a "loop."

Brett Nemeroff wrote:

> Just throwing this out.. Not all equipment can handle SIP Spiral
> properly. <cough> asterisk <cough> (although I know there was work done
> on Asterisk+SIP Sprial, I don't know where that ended up)
>
> so be careful before you spend a lot of time on that.  I'd love to hear
> how all of that works for you. I've got plans to do something similar in
> the LNP space..
> -Brett
>
> On Fri, Jul 10, 2009 at 2:02 PM, Iñaki Baz Castillo <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
>      > > npdi and rp are *userinfo* parameters (in fact they are TEL URI
>      > > paremeters so when converting to SIP URI they become part of
>     the userinfo
>      > > part). http://www.tech-invite.com/Ti-sip-abnf.html#teluri
>      > >
>      > > So, if the original RURI is:
>      > >   sip:+[hidden email]
>     <mailto:sip%3A%[hidden email]>
>      > >
>      > > and OpenSIPS modifies it to:
>      > >   sip:+12345678;npdi=123;rn=[hidden email]
>     <mailto:[hidden email]>
>      > >
>      > > then both RURI's are differents and the softsiwtch won't
>     consider it a
>      > > loop.
>      > >
>      > > However, if the parameters are added as SIP URI parameters
>     (after the
>      > > hostpart) the it would be a loop (except if they are maddr,
>     user, ttl).
>      >
>      > How does that change the other logical attributes of a call leg, i.e.
>      > Call ID GUID, From tag, CSeq, etc?
>
>     If the RURI changes, then it's *not* a loop, but a spiral. Re-read the
>     appropiate section in RFC 3261 :)
>
>
>     --
>     Iñaki Baz Castillo <[hidden email] <mailto:[hidden email]>>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[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


--
Alex Balashov
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

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

Re: Number portability

Iñaki Baz Castillo
El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
> Brett is very right.   I think one of the reasons I reacted
> instinctively to this scenario was because I tried to implement
> something similar with a well-known switch once (I think it was a
> Metaswitch) and the signaling agent reacted to my "spiral" (which I
> didn't know to be such) as though it were a "loop."

Just curiosity: Did the proxy changed the RURI? or what?


--
Iñaki Baz Castillo <[hidden email]>

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

Re: Number portability

Brett Nemeroff
In reply to this post by Alex Balashov
On a really bad day, you can make it work with a B2BUA in the middle. But really, the technology shouldn't act so dumb, right? :)

On Fri, Jul 10, 2009 at 2:13 PM, Alex Balashov <[hidden email]> wrote:
Brett is very right.   I think one of the reasons I reacted instinctively to this scenario was because I tried to implement something similar with a well-known switch once (I think it was a Metaswitch) and the signaling agent reacted to my "spiral" (which I didn't know to be such) as though it were a "loop."

Brett Nemeroff wrote:

Just throwing this out.. Not all equipment can handle SIP Spiral properly. <cough> asterisk <cough> (although I know there was work done on Asterisk+SIP Sprial, I don't know where that ended up)

so be careful before you spend a lot of time on that.  I'd love to hear how all of that works for you. I've got plans to do something similar in the LNP space..
-Brett

On Fri, Jul 10, 2009 at 2:02 PM, Iñaki Baz Castillo <[hidden email] <mailto:[hidden email]>> wrote:

   El Viernes, 10 de Julio de 2009, Alex Balashov escribió:
    > > npdi and rp are *userinfo* parameters (in fact they are TEL URI
    > > paremeters so when converting to SIP URI they become part of
   the userinfo
    > > part). http://www.tech-invite.com/Ti-sip-abnf.html#teluri
    > >
    > > So, if the original RURI is:
    > >   [hidden email]
   <mailto:[hidden email]>

    > >
    > > and OpenSIPS modifies it to:
    > >   sip:+12345678;npdi=123;rn=[hidden email]
   <mailto:[hidden email]>

    > >
    > > then both RURI's are differents and the softsiwtch won't
   consider it a
    > > loop.
    > >
    > > However, if the parameters are added as SIP URI parameters
   (after the
    > > hostpart) the it would be a loop (except if they are maddr,
   user, ttl).
    >
    > How does that change the other logical attributes of a call leg, i.e.
    > Call ID GUID, From tag, CSeq, etc?

   If the RURI changes, then it's *not* a loop, but a spiral. Re-read the
   appropiate section in RFC 3261 :)


   --
   Iñaki Baz Castillo <[hidden email] <mailto:[hidden email]>>

   _______________________________________________
   Users mailing list
   [hidden email] <mailto:[hidden email]> ------------------------------------------------------------------------


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


--
Alex Balashov
Evariste Systems
Web     : http://www.evaristesys.com/
Tel     : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671


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