Hi
Is it possible to replicate incoming SIP requests (eg. REGISTER) to another remote user SIP URI instead of host URI:
For instance I want to do (having previously registered to OpenSER the user pascal.maugeri@company.com):
t_replicate("sip:pascal@company.com sip%3Apascal@company.com");
instead of
t_replicate("sip:10.2.3.4:5060");
I tried it with OpenSER 1.3 but I get the error message when it tries to replicate:
3(8113) Main routing block. Method [REGISTER] 3(8113) ERROR: mk_proxy: could not resolve hostname: "company.com" 3(8113) ERROR: uri2proxy: bad host name in URI <sip:pascal@company.netsip%3Apascal@company.net
3(8113) ERROR:tm:t_forward_nonack: failure to add branches
I'm just wondering if what I want to do is possible ...
Regards, Pascal
El Wednesday 16 July 2008 14:59:51 Pascal Maugeri escribió:
Hi
Is it possible to replicate incoming SIP requests (eg. REGISTER) to another remote user SIP URI instead of host URI:
For instance I want to do (having previously registered to OpenSER the user pascal.maugeri@company.com):
t_replicate("sip:pascal@company.com sip%3Apascal@company.com");
instead of
t_replicate("sip:10.2.3.4:5060");
I tried it with OpenSER 1.3 but I get the error message when it tries to replicate:
3(8113) Main routing block. Method [REGISTER] 3(8113) ERROR: mk_proxy: could not resolve hostname: "company.com" 3(8113) ERROR: uri2proxy: bad host name in URI <sip:pascal@company.netsip%3Apascal@company.net
I don't know if t_replicate generates a request than runs into "on_branch_route", but if that works then you could process on_branch_route, so both request run it separately and match the set URI, something as:
t_replicate("sip:1.1.1.1:5060"); <-- facked URI
on_branch_route[X] {
if $ru == "sip:1.1.1.1:5060" { $ru = sip%3Apascal@company.com }
}
but not sure if it would work.
Hum it does not look to work...
If I keep the t_replicate("sip:pascal@company.com sip%3Apascal@company.com") it will try resolve the destination with DNS server. I believe I should resolve first the user SIP URI with the location using USRLOC and then replicate using the location (eg.: sip:pascal@<host>:<port>) but I don't know how to do that. I haven't found anything in the module documentation for that purpose.
Regards, Pascal
On Wed, Jul 16, 2008 at 3:08 PM, Iñaki Baz Castillo ibc@in.ilimit.es wrote:
El Wednesday 16 July 2008 14:59:51 Pascal Maugeri escribió:
Hi
Is it possible to replicate incoming SIP requests (eg. REGISTER) to
another
remote user SIP URI instead of host URI:
For instance I want to do (having previously registered to OpenSER the
user
pascal.maugeri@company.com):
t_replicate("sip:pascal@company.com sip%3Apascal@company.com <
sip%3Apascal@company.com sip%253Apascal@company.com>");
instead of
t_replicate("sip:10.2.3.4:5060");
I tried it with OpenSER 1.3 but I get the error message when it tries to replicate:
3(8113) Main routing block. Method [REGISTER] 3(8113) ERROR: mk_proxy: could not resolve hostname: "company.com" 3(8113) ERROR: uri2proxy: bad host name in URI <sip:pascal@company.net sip%3Apascal@company.net<
sip%3Apascal@company.net sip%253Apascal@company.net>
I don't know if t_replicate generates a request than runs into "on_branch_route", but if that works then you could process on_branch_route, so both request run it separately and match the set URI, something as:
t_replicate("sip:1.1.1.1:5060"); <-- facked URI
on_branch_route[X] {
if $ru == "sip:1.1.1.1:5060" { $ru = sip%3Apascal@company.com <sip%253Apascal@company.com> }
}
but not sure if it would work.
-- Iñaki Baz Castillo ibc@in.ilimit.es
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
t_replicate specifies the destination and it does not change the request, so you can not modify the user part with the t_replicate call.
You may try to change the user part of ther req-URI (rewriteuser,avps,...) and afterwards issuing the replication.
Hope it help,
Samuel.
2008/7/16 Pascal Maugeri pascal.maugeri@gmail.com:
Hum it does not look to work...
If I keep the t_replicate("sip:pascal@company.comsip%3Apascal@company.com") it will try resolve the destination with DNS server. I believe I should resolve first the user SIP URI with the location using USRLOC and then replicate using the location (eg.: sip:pascal@<host>:<port>) but I don't know how to do that. I haven't found anything in the module documentation for that purpose.
Regards, Pascal
On Wed, Jul 16, 2008 at 3:08 PM, Iñaki Baz Castillo ibc@in.ilimit.es wrote:
El Wednesday 16 July 2008 14:59:51 Pascal Maugeri escribió:
Hi
Is it possible to replicate incoming SIP requests (eg. REGISTER) to
another
remote user SIP URI instead of host URI:
For instance I want to do (having previously registered to OpenSER the
user
pascal.maugeri@company.com):
t_replicate("sip:pascal@company.com sip%3Apascal@company.com <
sip%3Apascal@company.com sip%253Apascal@company.com>");
instead of
t_replicate("sip:10.2.3.4:5060");
I tried it with OpenSER 1.3 but I get the error message when it tries to replicate:
3(8113) Main routing block. Method [REGISTER] 3(8113) ERROR: mk_proxy: could not resolve hostname: "company.com" 3(8113) ERROR: uri2proxy: bad host name in URI <sip:pascal@company.net sip%3Apascal@company.net<
sip%3Apascal@company.net sip%253Apascal@company.net>
I don't know if t_replicate generates a request than runs into "on_branch_route", but if that works then you could process on_branch_route, so both request run it separately and match the set URI, something as:
t_replicate("sip:1.1.1.1:5060"); <-- facked URI
on_branch_route[X] {
if $ru == "sip:1.1.1.1:5060" { $ru = sip%3Apascal@company.com<sip%253Apascal@company.com> }
}
but not sure if it would work.
-- Iñaki Baz Castillo ibc@in.ilimit.es
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
El Wednesday 16 July 2008 21:35:15 Pascal Maugeri escribió:
Hum it does not look to work...
If I keep the t_replicate("sip:pascal@company.com sip%3Apascal@company.com") it will try resolve the destination with DNS server. I believe I should resolve first the user SIP URI with the location using USRLOC and then replicate using the location (eg.: sip:pascal@<host>:<port>) but I don't know how to do that. I haven't found anything in the module documentation for that purpose.
Let me a question (since I've never tryed t_replicate): - Does t_replicate just allow as argument a IP:port and not a domain/hostname? - In the second case: does it allow a SIP URI with userinfo and so? (I think "no" due to your original mail).
In the worst case: t_replicate just allows an IP:PORT as argument you could try the following in two ways:
a) 1 - Add a new listen port to OpenSer (port=6060). 2 - Use "t_replicate(OPENSER_PUBLIC_IP:6060) 3 - In the login of OpenSer allow requests to OPENSER_PUBLIC_IP:6060 without authentication just in case it comes from OPENSER_PUBLIC_IP:5060. 4 - In the request processing change the RURI to "sip:pascal@company.com", do the "lookup" and "t_relay".
b) 1 - Before t_replicate add a header "X-Replicated: yes" 2 - "t_replicate(OPENSER_PUBLIC_IP:5060) <-- no other port needed. 3 - Because the request comes from OPENSER_PUBLIC_IP:5060 and has a "X-Replicated: yes" header: 4 - In the request processing change the RURI to "sip:pascal@company.com", do the "lookup" and "t_relay".
Could it work?