[OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-30 Thread David Cunningham
Hi all,

We have an Asterisk server sending INVITEs via OpenSIPS with a "Contact:
" header where 123.456.789.012 is the Asterisk
server IP. I want the INVITE's Contact as it leaves OpenSIPS to say the
OpenSIPS IP address instead.

How can I do this? From my understanding of the docs, this is the opposite
of fix_nated_contact.

Thanks for any advice.

-- 
David Cunningham, Voisonics
http://voisonics.com/
US toll-free: +1 888 842 2720
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-31 Thread federico cabiddu
Hi,
I guess that what you want is that the endpoint receiving the INVITE
sends the 200 OK reply and the subsequent in-dialog messages to
OpenSIPs
For the first point you need to do nothing as the reply should be sent
to the address in the topmost Via header (in this case OpenSIPs'
address). For the second, call record_route() in OpenSIPs script
before sending out the INVITE. The endpoint will then send in-dialog
messages (BYE, re-INVITE) to OpenSIPs.
Hope thsi can help you.

Regards,

Federico

2011/3/31 David Cunningham :
> Hi all,
>
> We have an Asterisk server sending INVITEs via OpenSIPS with a "Contact:
> " header where 123.456.789.012 is the Asterisk
> server IP. I want the INVITE's Contact as it leaves OpenSIPS to say the
> OpenSIPS IP address instead.
>
> How can I do this? From my understanding of the docs, this is the opposite
> of fix_nated_contact.
>
> Thanks for any advice.
>
> --
> David Cunningham, Voisonics
> http://voisonics.com/
> US toll-free: +1 888 842 2720
> UK: +44 (0) 20 3298 1642
> Australia: +61 (0) 2 8063 9019
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-31 Thread David Cunningham
Hello,

Thanks for the advice, although I don't think it will help my issue. The 200
OK and other packets are returned to the OpenSIPS server perfectly fine.

The problem is that the destination phone is showing the call with the
Asterisk IP address in it's history, and so if the user chooses to place a
return call to that address (eg returning a missed call) it goes directly to
Asterisk, bypassing OpenSIPS.
I'm not actually sure if the phone is displaying the From address or the
Contact address so it would be useful to make both mention the OpenSIPS IP.

Thanks,

On 31 March 2011 18:41, federico cabiddu  wrote:

> Hi,
> I guess that what you want is that the endpoint receiving the INVITE
> sends the 200 OK reply and the subsequent in-dialog messages to
> OpenSIPs
> For the first point you need to do nothing as the reply should be sent
> to the address in the topmost Via header (in this case OpenSIPs'
> address). For the second, call record_route() in OpenSIPs script
> before sending out the INVITE. The endpoint will then send in-dialog
> messages (BYE, re-INVITE) to OpenSIPs.
> Hope thsi can help you.
>
> Regards,
>
> Federico
>
> 2011/3/31 David Cunningham :
> > Hi all,
> >
> > We have an Asterisk server sending INVITEs via OpenSIPS with a "Contact:
> > " header where 123.456.789.012 is the Asterisk
> > server IP. I want the INVITE's Contact as it leaves OpenSIPS to say the
> > OpenSIPS IP address instead.
> >
> > How can I do this? From my understanding of the docs, this is the
> opposite
> > of fix_nated_contact.
> >
> > Thanks for any advice.
> >
> > --
> > David Cunningham, Voisonics
> > http://voisonics.com/
> > US toll-free: +1 888 842 2720
> > UK: +44 (0) 20 3298 1642
> > Australia: +61 (0) 2 8063 9019
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
David Cunningham, Voisonics
http://voisonics.com/
US toll-free: +1 888 842 2720
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-31 Thread Stanisław Pitucha
On 31 March 2011 12:11, David Cunningham  wrote:
> The problem is that the destination phone is showing the call with the
> Asterisk IP address in it's history, and so if the user chooses to place a
> return call to that address (eg returning a missed call) it goes directly to
> Asterisk, bypassing OpenSIPS.

Most phones take the address from the "From" header - you might want
to change that instead. To do this, look at the "uac" module.

-- 
KTHXBYE,

Stanisław Pitucha

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-31 Thread David Cunningham
Thanks for the suggestion. It looks like textops should be able to do
something similar, but my subst isn't actually having any effect on the
packet sent out. For example if I have:

if( subst('/Foo/Bar/ig') ) {
xlog( "Done" );
}

Then I get "Done" logged, but no change in the output packet and Foo is
still mentioned. Can anyone help?

Thanks,


2011/3/31 Stanisław Pitucha 

> On 31 March 2011 12:11, David Cunningham 
> wrote:
> > The problem is that the destination phone is showing the call with the
> > Asterisk IP address in it's history, and so if the user chooses to place
> a
> > return call to that address (eg returning a missed call) it goes directly
> to
> > Asterisk, bypassing OpenSIPS.
>
> Most phones take the address from the "From" header - you might want
> to change that instead. To do this, look at the "uac" module.
>
> --
> KTHXBYE,
>
> Stanisław Pitucha
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
David Cunningham, Voisonics
http://voisonics.com/
US toll-free: +1 888 842 2720
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-31 Thread Stanisław Pitucha
On 1 April 2011 00:25, David Cunningham  wrote:
> Then I get "Done" logged, but no change in the output packet and Foo is
> still mentioned. Can anyone help?

Are you sure you're doing it on the right packet, before you send it out, etc.?
Also, to change "From" headers you should use the uac module and

uac_replace_from("somebody", "sip:number@host");

Otherwise, you're in a world of pain to get all the rewriting correct
in both ways (answers, subsequent requests, detecting direction, etc.)

-- 
KTHXBYE,

Stanisław Pitucha

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opposite of fix_nated_contact?

2011-03-31 Thread David Cunningham
Hi,

I had it in the wrong place which is why it didn't change anything, and have
worked it out using uac_replace_from.

Thanks for your assistance!


2011/4/1 Stanisław Pitucha 

> On 1 April 2011 00:25, David Cunningham  wrote:
> > Then I get "Done" logged, but no change in the output packet and Foo is
> > still mentioned. Can anyone help?
>
> Are you sure you're doing it on the right packet, before you send it out,
> etc.?
> Also, to change "From" headers you should use the uac module and
>
> uac_replace_from("somebody", "sip:number@host");
>
> Otherwise, you're in a world of pain to get all the rewriting correct
> in both ways (answers, subsequent requests, detecting direction, etc.)
>
> --
> KTHXBYE,
>
> Stanisław Pitucha
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
David Cunningham, Voisonics
http://voisonics.com/
US toll-free: +1 888 842 2720
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users