A few words about the structure of my network.
I have a very simple structure:
UAC <---> OpenSIPS <---> PSTN
This allows a regular customer to make and receive calls.
I want to provide SOME customers extended service using an asterisk, for
example - voicemail.
At the moment, I found a way out for these customers (with extended
service) :
UAC <---> OpenSIPS <---> ASTERISK <---> PSTN
Accordingly , customers (UAC), which should go to the PSTN through
Asterisk listed in the group "asterisk".
An important point: OpenSIPS must be registered as UAC on how asterisk
extension, otherwise the service will not be extended to provide.
Also, much easier to make the user to the "asterisk" group, than tweak
its SIP-client.
In order to do this I used the module "uac_registrant", it allows you to
register as OpenSIPS to UAC asterisk.
With it, I can make a call :
UAC <--- OpenSIPS <--- ASTERISK <--- PSTN
But such a call can not do :
UAC ---> OpenSIPS ---> ASTERISK ---> PSTN
I tried using topology_hiding () and match_dialog (),
but it does not forward the request "ACK" from OpenSIPS to Asterisk .
24.03.2014 14:50, Bogdan-Andrei Iancu пишет:
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<----------------------------------------------------------------------------------
--
С уважением,
Александр Пучков,
Системный администратор,
Тел.: +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