[OpenSER-Users] Avoid Loops between Openser and Asterisk

Cosimo Fadda cosimo.fadda at klarya.it
Fri Apr 4 15:29:12 CEST 2008


Hi everybody and thank you for your interest,

Juha Heinanen ha scritto:
> Cosimo Fadda writes:
>
>  > But maybe I'm still making some little mistake: this is the route I'm
>  > using:
>
> did you try my proposal?  i said to call rewrite_uri and then
> sl_send_reply.  i didn't say anything about manipulating contact
> header.
>
>   
I finally followed your proposal and now it works,

route[11]
{
    xlog("L_INFO", "Forwarding request to VM\n");
    prefix("vm");
    rewritehost("asteriskgw");
    sl_send_reply("302", "Moved Temporalily ");
    exit;
}

<-- SIP read from openser:5060:
SIP/2.0 302 Moved Temporalily
Via: SIP/2.0/UDP 217.199.19.212:5060;branch=z9hG4bK5f777042;rport=5060
From: "0MXXXXXX" <sip:0MXXXXXX at asteriskgw>;tag=as1c030a33
To: <sip:matteo at openser>;tag=26501d74ed63701b338d7e605938b7cb.54a5
Call-ID: 7eb5e5ea03c57c900b45052c28701977 at asteriskgw
CSeq: 102 INVITE
Contact: sip:vmmatteo at asteriskgw
Server: OpenSER (1.3.1-notls (i386/linux))
Content-Length: 0

Iñaki Baz Castillo ha scritto:
> El Friday 04 April 2008 12:21:12 Juha Heinanen escribió:
>   
>> Cosimo Fadda writes:
>>  > But maybe I'm still making some little mistake: this is the route I'm
>>  > using:
>>
>> did you try my proposal?  i said to call rewrite_uri and then
>> sl_send_reply.  i didn't say anything about manipulating contact
>> header.
>>     
>
> You said:
>
> "try rewriting the uri and then calling sl_send_reply("302", "Moved
>  Temporalily")."
>
> Do you mean that if OpenSer receives a request, changes the RURI and isntead 
> of forwarding the request creates a reply "302" then the Contact header will 
> be the new RURI? Why it shouldn't work?
>   
I haven't found anything in the docs about this.

Thank you again,

Regards,

Cosimo
____________




More information about the sr-users mailing list