<html>
<head>
<meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix"><span id="result_box" class=""
lang="en"><span class="hps">Thanks, Jordan!<br>
<br>
I tried</span> <span class="hps">the following structure</span><span>:</span>
<br>
---8<-----------------------------------------------------------------------------------------------------------------------<br>
<br>
if (db_is_user_in("$fu", "asterisk"))<br>
{<br>
$rd=$var(asterisk_ip);<br>
} <br>
<br>
if(!dp_translate("0","$rU/$rU")){ <br>
send_reply("420", "Invalid Destination");<br>
exit;<br>
}<br>
<br>
if (db_is_user_in("$fu", "asterisk"))<br>
{ <br>
$avp(dest)="media";<br>
} <br>
<br>
xlog("$avp(dest)"); <br>
<br>
if ($avp(dest)=="usrloc") {<br>
route(m4_USRLOC);<br>
}<br>
<br>
if ($avp(dest)=="pstn") {<br>
route(m4_PSTN);<br>
}<br>
<br>
# route to Asterisk<br>
if ($avp(dest)=="media") { <br>
route(m4_MEDIA);<br>
}<br>
<br>
---8<-----------------------------------------------------------------------------------------------------------------------<br>
<span class="hps">Unfortunately,</span> <span class="hps">it
did not help</span><span>.</span> <br>
<span class="hps"><br>
In the picture</span> <span class="hps">chart</span> <span
class="hps">calls</span> <span class="hps">for this approach</span><span
class="">:<br>
<br>
<a class="moz-txt-link-freetext" href="http://tinypic.com/r/27zb0qb/5">http://tinypic.com/r/27zb0qb/5</a><br>
</span></span><br>
*.*.3.1 - UAC (2)<br>
*.*.1.4 - OpenSIPS [as UAC(1)] - extension on Asterisk<br>
*.*.1.5 - Asterisk<br>
<br>
<div id="gt-src-tools">
<div id="gt-src-tools-l">
<div style="display: inline-block;" id="gt-input-tool">
<div id="itamenu"><span class="ita-kd-inputtools-div"></span></div>
</div>
</div>
</div>
<div id="gt-res-content" class="almost_half_cell">
<div dir="ltr" style="zoom:1">
<div id="tts_button" style="" class=""><object
type="application/x-shockwave-flash"
data="//ssl.gstatic.com/translate/sound_player2.swf"
id="tts" height="18" width="18"></object></div>
<span id="result_box" class="short_text" lang="en"><span
class="hps">What else</span> <span class="hps">can I do?</span></span></div>
</div>
<br>
<br>
22.01.2014 14:16, Justin Zondagh - MWEB :<br>
</div>
<blockquote cite="mid:68B2C46A-87B7-4DBA-8EF2-4649DBC6E3E5@mweb.com"
type="cite">
<pre wrap="">Set $rd to asterisk ip and then route
Sent from my iPhone
</pre>
<blockquote type="cite">
<pre wrap="">On 22 Jan 2014, at 12:12, " " <a class="moz-txt-link-rfc2396E" href="mailto:mailex@poig.ru"><mailex@poig.ru></a> 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 :
</pre>
<blockquote type="cite">
<pre wrap="">When the call is coming in for UAC (1) you need to perform a lookup for UAC (2).
See: <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/devel/registrar#id294037">http://www.opensips.org/html/docs/modules/devel/registrar#id294037</a>
You need to set the AOR to UAC (2).
Regards,
Ovidiu Sas
2014/1/21 <a class="moz-txt-link-rfc2396E" href="mailto:mailex@poig.ru"><mailex@poig.ru></a>:
</pre>
<blockquote type="cite">
<pre wrap="">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: <a class="moz-txt-link-freetext" href="http://www.schelkovo-net.ru">http://www.schelkovo-net.ru</a>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
--
,
,
,
.: +7(496) 569-24-24 .. 255;
"" (- . )
: +7(496) 569-24-24 . 103;
: 141108, .., ., ., .11;
WEB: <a class="moz-txt-link-freetext" href="http://www.schelkovo-net.ru">http://www.schelkovo-net.ru</a>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap="">Connect with South Africas leading Internet Service Provider and discover the magic of the Internet and all its possibilities.
Call 087 700 5000 or click here(<a class="moz-txt-link-freetext" href="http://www.mweb.co.za/productspricing/Home.aspx">http://www.mweb.co.za/productspricing/Home.aspx</a>) 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 - <a class="moz-txt-link-freetext" href="http://www.mweb.co.za/disclaimer">http://www.mweb.co.za/disclaimer</a>.
If you are unable to view the disclaimer, please contact <a class="moz-txt-link-abbreviated" href="mailto:abuse@mweb.com">abuse@mweb.com</a> for a copy.
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
</hl><br>
<b>Александр Пучков,<br>Системный администратор,<br>Тел.: +7(496) 569-24-24 доб.тел. 255;<br></b>ООО "ПОИГ" (Интернет-провайдер г. Щелково)<br>Факс: +7(496) 569-24-24 доб. 103;<br>Адрес: 141108, М.О., г.Щелково, Пролетарский пр., д.11;<br>WEB: <a href="http://www.schelkovo-net.ru">http://www.schelkovo-net.ru</a><br>
<br>
</body>
</html>