Hi everybody, thanks to your tips now the voicemail route works without loop detection from asterisk; But maybe I'm still making some little mistake: this is the route I'm using:
route[11] { xlog("L_INFO", "Forwarding request to VM\n"); #remove_hf("Contact"); append_to_reply("Contact: sip:vm$rU@asteriskgw"); remove_hf("Contact"); sl_send_reply("302", "Moved Temporalily "); exit;
}
I've tried both removing the original "Contact" before and after the append, but I always have this 302 Message:
<-- SIP read from OPENSERIP:5060: SIP/2.0 302 Moved Temporalily Via: SIP/2.0/UDP asteriskgw:5060;branch=z9hG4bK1262b98d;rport=5060 From: "0MXXXXXX" sip:0MXXXXX@asteriskgw;tag=as13654251 To: sip:cosimo@OPENSERIP;tag=26501d74ed63701b338d7e605938b7cb.11ac Call-ID: 52e6481a1dd8674c559c477c36558c19@asteriskgw CSeq: 102 INVITE Contact: sip:vmcosimo@asteriskgwContact: sip:cosimo@OPENSERIP Server: OpenSER (1.3.1-notls (i386/linux)) Content-Length: 0
There are two Contact headers!! This is not a problem for me since Asterisk ignore the second, but I'd like to avoid this behavior.. Maybe I have to rewrite the contact without appending another one. Thanks in advance,
Cosimo
Cosimo Fadda ha scritto:
Thank you everybody, I'll try it immediatly!
Regards,
Cosimo
OT: Greetings to Daniel from Dario Busso
Daniel-Constantin Mierla ha scritto:
On 04/03/08 13:50, Iñaki Baz Castillo wrote:
El Thursday 03 April 2008 10:49:19 Juha Heinanen escribió:
Cosimo Fadda writes:
My first thought was to send a 302 from Openser to Asterisk, but I don't know how..
try rewriting the uri and then calling sl_send_reply("302", "Moved Temporalily").
And add the mandatory "Contact" header with the URI of the voicemail URI (I don't remember the function adding headers to the reply but it does exist).
append_to_reply(...) in textops module
http://www.openser.org/docs/modules/1.3.x/textops.html#AEN276
Cheers, Daniel
____________________