[Asterisk-Dev] SIP INVITE vs TO URI
Kevin P. Fleming
kpfleming at digium.com
Wed Sep 14 12:26:57 MST 2005
William Lloyd wrote:
> The provider sends the destination as part of the TO field. In the
> example the asterisk host is behind NAT.
>
> For example
> INVITE sip:s at 192.168.100.20
> TO: <sip:15145551213 at 69.23.45.200>
>
> or
>
> INVITE sip:s at 192.168.100.20
> TO: <sip:15145551212 at 69.23.45.200>
>
> Both get handled by Asterisk s destination.
The target URI of the call is what is presented in the INVITE request
line of the SIP packet. The To: header is _not_ used for call routing.
If you are running CVS HEAD or a 1.2 beta release, you can use the
SIPHEADER() function to read the To: header in the dialplan and decide
where to send the call from there.
More information about the asterisk-dev
mailing list