El Wednesday 02 April 2008 15:48:10 Jesus Rodriguez escribió:
Hola Iñaki,
El 02/04/2008, a las 17:40, Iñaki Baz Castillo escribió:
El Wednesday 02 April 2008 15:35:40 Jesus
Rodriguez escribió:
The info
about the called PSTN number is just available in "To"
header, so a
way to get different behaviour for each associated PSTN number is
matching "To" URI.
Is common to do it? which other alternatives are there?
You can also add multiple aliases to the same user. All INVITEs to
different aliases will be sent to the resolved user.
Yes, but after the "lookup" the RURI username will be definitively the
username the client sent in the REGISTER's "Contact", so the INVITE
will not
change, will it?
The RURI will be changed by the registered Contact value. The To:
header is not modified.
Exactly, but a client will have (probably) just one sip account registered, so
just one entry will appear in "location" table for him AoR.
Imagine a user "clientX@sip_proxy" using an Asterisk and registering with:
REGISTER sip:sip_proxy SIP/2.0
To: <sip:clientX@sip_proxy>
Contact: <sip:s@ip_asterisk>
It will appear in location table with "Contact=sip:clientX@IP".
Suppose clientX has two PSTN numbers associated in a ENUM entry:
+34999000111
+34999000222
When it receives a call from PSTN to +34999000222 the INVITE arriving to
Asterisk will be:
INVITE sip:s@ip_asterisk SIP/2.0
To: <sip:+34999000222@sip_proxy>
So the info about the real PSTN number dialed by the call originator just
remains in the "To" header. So the client (Asterisk) must read the
"To"
header in order to have a behaviour different for +34999000111 and
+34999000222 (or adding in OpenSer other custom header containing also dialed
number 999000222 as Juha suggests).
I can't understand how using aliases in OpenSer can help here. ¿?
Thanks a lot and regards.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es