Thanks, Jordan!

I tried the following structure:
---8<-----------------------------------------------------------------------------------------------------------------------

if (db_is_user_in("$fu", "asterisk"))
    {
        $rd=$var(asterisk_ip);
    }

    if(!dp_translate("0","$rU/$rU")){
        send_reply("420", "Invalid Destination");
        exit;
    }

    if (db_is_user_in("$fu", "asterisk"))
        {
        $avp(dest)="media";
        }

    xlog("$avp(dest)");

    if ($avp(dest)=="usrloc") {
        route(m4_USRLOC);
    }

    if ($avp(dest)=="pstn") {
            route(m4_PSTN);
    }

    # route to Asterisk
    if ($avp(dest)=="media") {
        route(m4_MEDIA);
    }

---8<-----------------------------------------------------------------------------------------------------------------------
Unfortunately, it did not help.

In the picture chart calls for this approach:

http://tinypic.com/r/27zb0qb/5

*.*.3.1 - UAC (2)
*.*.1.4 - OpenSIPS [as UAC(1)] - extension on Asterisk
*.*.1.5 - Asterisk

What else can I do?


22.01.2014 14:16, Justin Zondagh - MWEB пишет:
Set $rd to asterisk ip and then route

Sent from my iPhone

On 22 Jan 2014, at 12:12, "Александр Пучков"<[email protected]>  wrote:

Ovidiu, thanks for your answer.

There is some misunderstanding.
I'm probably not very well formulated goal I want to achieve.
Try to describe in more detail:

UAC (1): OpenSIPs registered as a UAC on Asterisk (sip:100@asterisk).
UAC (2): UAC (2) is registered to OpenSIPs (sip:100@opensips).

Everything works well when there is a call : PSTN --> Asterisk --> UAC (1) --> 
UAC (2).

I would like to learn how to make a call : UAC (2) ---> UAC (1) --> Asterisk 
--> PSTN

I tried to replace roughly FROM header for OUTGOING calls with UAC (2):

if (db_is_user_in ("$ fu", "asterisk"))
    {
    $var(masking_number) = "sip:" + $fU + "@" + $var(asterisk_ip);
    uac_replace_from ("", "$var(masking_number)");
    }
but it did not help.

Why it need: the client (UAC) registered to OpenSIPS, could provide services 
Asterisk, without reconfiguring the client equipment.

It would be great if a piece of code, as I'm no guru in Opensips.

Thanks!

21.01.2014 20:41, Ovidiu Sas пишет:
When the call is coming in for UAC (1) you need to perform a lookup for UAC (2).
See:http://www.opensips.org/html/docs/modules/devel/registrar#id294037
You need to set the AOR to UAC (2).

Regards,
Ovidiu Sas

2014/1/21 Александр Пучков<[email protected]>:
Hi!

I use the module UAC_REGISTRANT. OpenSIPS registered on Asterisk as UAC (1).
There are UAC (2) that is registered on OpenSIPS. When calling with Asterisk
to UAC (1) there is a call UAC (2)
as UAC (2) is registered in the "binding_URI", table "registrant".

How to make an outgoing call UAC (2) a call came from the UAC (1)?

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
--
С уважением,
Александр Пучков,
Системный администратор,
Тел.:      +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
Connect with South Africa▓s leading Internet Service Provider and discover the 
magic of the Internet and all its possibilities.
Call 087 700 5000 or click 
here(http://www.mweb.co.za/productspricing/Home.aspx) for more.

MWEB :-)  CONNECT AND YOU CAN.

This electronic communication and the attached file(s) are subject to a 
disclaimer which can be accessed on the following link:
Disclaimer - or copy the following URL into your browser 
-http://www.mweb.co.za/disclaimer.
If you are unable to view the disclaimer, please [email protected]  for a 
copy.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
п║ я┐п╡п╟п╤п╣п╫п╦п╣п╪,
п░п╩п╣п╨я│п╟п╫п╢я─ п÷я┐я┤п╨п╬п╡,
п║п╦я│я┌п╣п╪п╫я▀п╧ п╟п╢п╪п╦п╫п╦я│я┌я─п╟я┌п╬я─,
п╒п╣п╩.:      +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

Reply via email to