For the redirect use the uac_redirect module. It should take care of
fetching the URI from the Contact: header and use the proper protocol.
regards
klaus
Ingmar Kliche wrote:
Hi all,
I'm very new to OpenSER and I would like to ask for your advice to find
a solution for my problem:
I have a SIP gateway (A) which uses UDP transport and a SIP endpoint (B)
which only supports TCP. I'd like to use OpenSER to convert UDP to TCP.
The second issue is that the TCP endpoint (B) will redirect the incoming
INVITE to itself to another TCP port using a "302 Moved temporarily"
containing a CONTACT header.
Here is my approach:
My current understanding is that I would have to add something to the
routing block to select the traffic for my TCP endpoint. Then I would
have to add route where I would have to handle the TCP forwarding,
something like:
if (uri=~"...") {
t_relay_to_tcp("<ip>", "5060");
}
This looks very straight forward and should solve the UDP to TCP issue
as I understand it. Is this approach correct?
For the second issue I don't have a solution right now. As described
above the TCP endpoint (B) will answer something like
SIP/2.0 302 Moved Temporarily
FROM: <sip:tel@HOST_A>;tag=1c552078080
TO: <sip:tel@HOST_B>;tag=7189e7deae
CSEQ: 1 INVITE
CALL-ID: 552077216117200615500@HOST_A <mailto:552077216117200615500@HOST_A>
MAX-FORWARDS: 70
VIA: SIP/2.0/TCP HOST_A;branch=z9hG4bKac552089789;alias
CONTENT-LENGTH: 0
SERVER: RTCC/2.0.6011.0
CONTACT:
<sip:tel@HOST_B:1223;transport=tcp;maddr=HOST_B;x-mss-call-id=552077216117200615500%40HOST_B>
I want OpenSER now to send out another INVITE via TCP to HOST_B Port
1223 (but the port changes for each call). In principle I would need a
possiblity to extract the host and the port out of the CONTACT header of
the message to send another t_relay_to_tcp("<host>",
"<port>"). But how
to do that?
Or is there another possibility to tell OpenSER to take the target info
out of the CONTACT header?
Thanks in advance!
Ingmar
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users