[OpenSIPS-Users] Setup "To:" in INVITE
Bogdan-Andrei Iancu
bogdan at opensips.org
Mon Aug 8 21:54:15 CEST 2011
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, sip at veliko-turnovo.com 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 at 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 at 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 at SipProxy-B_IP");
> record_route();
> }
> if (!t_relay()) {
> sl_reply_error();
> exit;
> };
>
> }
>
> Request-Line: INVITE sip:5566777 at 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 at SipProxy-A_IP;user=phone>;tag=ffff320030053b10ff000015172c04ff
> To:<sip:5566777 at OpenSips_IP:5060;user=phone>
> Call-ID: aab9320030053b1080000015172c04ae at softphone.com
> CSeq: 1 INVITE
> Contact:<sip:15488 at SipProxy-A_IP;user=phone>
> Max-Forwards: 9
>
> Regards,
> Plamen Petkov
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"
More information about the Users
mailing list