Hello,
Script-wise, what are you trying to do right now by the db_is_user_in()
? If you explain the actual idea you try to implement, I can guide you
with the script.
So, when comes to the incoming REGISTER, what you want to change now ?
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 21.03.2014 10:37, Александр Пучков wrote:
11.02.2014 19:44, Bogdan-Andrei Iancu пишет:
Hello,
Please keep the list CC'ed all the time !
You did no inserted the topo hiding triggering in the write place -
you need to do it only for initial INVITEs ; for sequential requests
you need the be sure to invoke the match_dialog() function. See:
http://www.opensips.org/html/docs/modules/1.10.x/dialog.html#id295144
It will be helpful to provide more info on what "it is not working" -
like do you see any changes on the INVITE sent out by OpenSIPS, any
script errors, etc
I 'm trying to use your proposed function, but ran into a problem - I
have not triggered the authorization and I can not make an outgoing call .
After making some changes :
if (!db_is_user_in("$fu", "asterisk")) # +++ I ADDED THIS STRING
if (!(method=="REGISTER") && from_uri==myself) /*НЕ multidomain
версия*/
{
if(!check_source_address("0")){
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
exit;
}
if (!db_check_from()) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
consume_credentials();
}
}
I like making progress , but the analysis of messages using the
program "wireshark", I saw that I had not sent a request "ACK" to the
asterisk. The challenge does not pass.
Briefly remind you that I 'm trying to achieve :
I would like to make opensips acted as UAC to asterisk , but it was a
server for opensips UAC. This will allow me to introduce UAC,
registered in OpenSIPS like an extension on the asterisk.
Please, write a little piece of code for deciding my problem.
My configuration file:
http://pastebin.com/39vV4eYT
Hello,
Use the dialog based topology hiding
http://www.opensips.org/html/docs/modules/1.10.x/dialog.html#id296001
when forwarding the INVITE to Asterisk (in OpenSIPS).
Thank you.
I tried it like this code fragment:
#--8<----------------------------------------------------------------------------------
route {
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
#force_rport();
if(avp_db_load("$fu","$avp(trace)")) {
$avp(traceuser)=$fu;
setflag(22);
sip_trace();
xlog("L_INFO","User $fu being traced");
}
#...................................................................
if (db_is_user_in("$fu", "asterisk"))
{
if(!has_totag() && is_method("INVITE")) {
topology_hiding();
}
}
if (has_totag()) {
...
}
...
#--8<----------------------------------------------------------------------------------
But it not worked :( Perhaps, this code is wrong.
Could you indicate where the error? Could you indicate where the
error? Or do I need to follow the documentation on the function
topology_hiding()?
On 11.02.2014 10:12, Александр Пучков wrote:
10.02.2014 13:24, Bogdan-Andrei Iancu пишет:
Hello,
In this scenario:
Astеrisk <-- 3 -- OpenSIPS <-- 4 -- UAC
What SIP requests the UAC is sending ? REGISTER ? INVITES ?
Hello!
UAC registered to Opensips, Opensips registered as UAC on
Asterisk. When the INVITE request comes from the UAC, Opensips
need to sent INVITE to Asterisk as UAC.
Note that the UAC does not know about Asterisk and Asterisk does
not know about UAC. Asterisk know about only Opensips.
It is necessary to any UAC registered on Opensips could imagine
how extension on Asterisk, without changing the configuration of UAC.
Thank you.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 20.01.2014 13:05, Александр Пучков wrote:
Hi!
OpenSIPS version 1.8.
We have the following diagram:
PSTN <-- 1 --> OpenSIPS <-- 2 --> Astеrisk <-- 3
--> UAC
192.168.1.1 <-- 1 --> 192.168.1.2 <-- 2 --> 192.168.1.3 <-- 3
--> 192.168.1.*
I would like to make the following scheme:
PSTN <-- 1 --> OpenSIPS <-- 2 --> Astеrisk <-- 3
--> OpenSIPS <-- 4 --> UAC
192.168.1.1 <-- 1 --> 192.168.1.2 <-- 2 --> 192.168.1.3 <-- 3
--> 192.168.1.2 <-- 4 --> 192.168.1.*
Interestingly the following schema fragment:
Astеrisk <-- 3 --> OpenSIPS <-- 4 --> UAC
Here OpenSIPS need to increase control over the services for
UAC. UAC should not know about the existence of Asterisk and UAC
must be registered on the server OpenSIPS, and any SIP request
OpenSIPS should redirect to Asterisk.
I tried to use the module in UAC_REGISTRANT OpenSIPS, it works
fine in the direction:
Astеrisk -- 3 --> OpenSIPS -- 4 --> UAC
But how to implement the scheme in the direction:
Astеrisk <-- 3 -- OpenSIPS <-- 4 -- UAC
I do not really imagine. Please tell me how it can be implemented.
Thank!
*Александр Пучков,
Системный администратор,
Тел.: +7(496) 569-24-24 доб.тел. 255;
*ООО "ПОИГ" (Интернет-провайдер г. Щелково)
Факс: +7(496) 569-24-24 доб. 103;
Адрес: 141108, М.О., г.Щелково, Пролетарский пр., д.11;
WEB: http://www.schelkovo-net.ru
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users