Hi,
SIP routing is not done based on SIP header, but on the RURI (first
line). So makes no sense to change to TO header.
If for whatever obscure reason you want to change the TO hdr in
opensips, see the uac_replace_to() function from the UAC module.
Regards,
Bogdan
On 08/05/2011 08:24 AM, [email protected] wrote:
Hello,
I try use OpenSips to route VoIP between SipProxy-A and SipProxy-B.
SipProxy-A -----> OpenSips ------> SipProxy-B
OpenSips send INVITE with To: section contens OpenSips_IP.
"To:<sip:5566777@OpenSips_IP:5060;user=phone> "
How to setup OpenSips when send INVITE to SipProxy-B, section To: contens
SipProxy-B_IP like this?
"To:<sip:5566777@SipProxy-B_IP:5060;user=phone> "
Here is my Route and INVITE from OpenSips.
route{
if (loose_route()) { t_relay(); exit; };
if (is_method("INVITE")) {
rewriteuri("sip:580@SipProxy-B_IP");
record_route();
}
if (!t_relay()) {
sl_reply_error();
exit;
};
}
Request-Line: INVITE sip:5566777@SipProxy-B_IP SIP/2.0
Record-Route:<sip:OpenSips_IP;lr>
Via: SIP/2.0/UDP OpenSips_IP;branch=z9hG4bK2ba.d8f73151.0
Via: SIP/2.0/UDP
SipProxy-A_IP:5060;branch=z9hG4bK-28ff320030053b10ff000015172c04ff
From:
<sip:15488@SipProxy-A_IP;user=phone>;tag=ffff320030053b10ff000015172c04ff
To:<sip:5566777@OpenSips_IP:5060;user=phone>
Call-ID: [email protected]
CSeq: 1 INVITE
Contact:<sip:15488@SipProxy-A_IP;user=phone>
Max-Forwards: 9
Regards,
Plamen Petkov
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users