<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: Разрушительный сбой ActiveX компоненты]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=7446</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7446&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: Разрушительный сбой ActiveX компоненты».]]></description>
		<lastBuildDate>Fri, 10 Aug 2012 20:53:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62688#p62688</link>
			<description><![CDATA[<p>Спасибо огромное. Буду пробовать.</p>]]></description>
			<author><![CDATA[null@example.com (moobi)]]></author>
			<pubDate>Fri, 10 Aug 2012 20:53:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62688#p62688</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62687#p62687</link>
			<description><![CDATA[<p>Твоя задача решается с помощью </p><div class="codebox"><pre><code>    АктивИкс = СоздатьОбъект(&quot;АктивИкс&quot;);
    АктивИкс.УстановитьАтрибут(Форма,&quot;sip&quot;); 
    АктивИкс.СоздатьЭУ(&quot;GTSIPCTRL.GTSIPAPICtrl.1&quot;);
    АктивИкс.ОбработкаСобытий = 1;</code></pre></div><p>и класса Таймер.</p><p>События прилетают в форму, так что сможешь работать с активИксом напрямую, без использования доп. компонент (1С++ required).</p>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 20:39:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62687#p62687</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62686#p62686</link>
			<description><![CDATA[<p>Хм...прикол, в 7.7, если id метода &lt; 0, то 1С его тупо не воспринимает (void AboutBox(); у [id(0xfffffdd8)]), считает, что это ошибка.<br />С другой стороны, только у AboutBox отрицательный id, зачем так сделано?</p>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 20:12:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62686#p62686</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62685#p62685</link>
			<description><![CDATA[<div class="codebox"><pre><code>        GTSIPAPI1.CreateEnv
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.server.model&quot;, &quot;0&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.ip.address&quot;, &quot;&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.ip.port&quot;, &quot;5076&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.rtpstartrange&quot;, &quot;17400&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.rtpendrange&quot;, &quot;17800&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.log.level&quot;, &quot;4&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.boardnum.per.server&quot;, &quot;1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.spannum.per.board&quot;, &quot;1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.channum.per.span&quot;, &quot;1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.log.filename&quot;, &quot;c:\simplephone.txt&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.prefered.codec&quot;, &quot;0,8&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.net.port&quot;, &quot;8914&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg.client.num&quot;, &quot;1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.DisplayName&quot;, &quot;user1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.username&quot;, &quot;1111&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.domain&quot;, &quot;127.0.0.1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.proxy&quot;, &quot;127.0.0.1&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.authorization&quot;, &quot;1111&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.password&quot;, &quot;1111&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.expire&quot;, &quot;3600&quot;
        GTSIPAPI1.CFGSetValue &quot;gtsrv.sip.reg1.register&quot;, &quot;0&quot;
        
        GTSIPAPI1.StartServer
        GTSIPAPI1.StopServer   
        GTSIPAPI1.DestroyEnv

        GTSIPAPI1.SendTransfer 0, &quot;&lt;sip:8888@pcbest.net&gt;&quot;

        GTSIPAPI1. ProcessGTAPIEvent()

                События

        GTSIPAPI1_OnCallIdle(ByVal ChanID As Long)
        GTSIPAPI1_OnCallOffered(ByVal ChanID As Long, ByVal Caller As String, ByVal Callee As String, ByVal DestAddr As String, ByVal ViaAddr As String, ByVal IPAddr As String, ByVal IPPort As Long)</code></pre></div><p>Наверное все. Мне нужно из 1с открыть порт SIP без SIP сервера, ждать звонка, узнать Caller ID и ничего не делать. </p><p>Хотелось бы получить доступ ко все функциям и событиям, тогда можно было бы что-нибудь крутое потом додумать. Но на первоначальном этапе этого достаточно.</p>]]></description>
			<author><![CDATA[null@example.com (moobi)]]></author>
			<pubDate>Fri, 10 Aug 2012 19:41:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62685#p62685</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62684#p62684</link>
			<description><![CDATA[<p>А какие именно методы и события хотелось бы вызывать?</p>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 18:51:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62684#p62684</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62683#p62683</link>
			<description><![CDATA[<p>7.7</p>]]></description>
			<author><![CDATA[null@example.com (moobi)]]></author>
			<pubDate>Fri, 10 Aug 2012 18:35:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62683#p62683</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62682#p62682</link>
			<description><![CDATA[<p>7.7 или 8.x?</p>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 18:31:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62682#p62682</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62680#p62680</link>
			<description><![CDATA[<p>Вы правильно уловили ход моей мысли, этот активикс мне нужно использовать как com-компонент, для вызова из 1c. Запускаю, из vbs, просто из-за удобства отладки. Потом код перенесу в 1с.</p><p>Существует внешняя компонента 1с &quot;Обеликс&quot; <a href="http://mshapkin.narod.ru/obeliks/obelisk_r.rar">http://mshapkin.narod.ru/obeliks/obelisk_r.rar</a>, она вызывает методы и события GTSIPCtrl.ocx, но набор событий и методов, который через нее можно вызвать далеко не весь, который&nbsp; есть в компоненте активикс. В частности мне нужно нужно открыть порт 5060 для приема звонков в режиме peer-to-peer, без регистрации на sip сервере.</p><p>Собственно поэтому мне хотелось ее вызвать напрямую, как com компонент, минуя обеликс.</p>]]></description>
			<author><![CDATA[null@example.com (moobi)]]></author>
			<pubDate>Fri, 10 Aug 2012 17:40:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62680#p62680</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62671#p62671</link>
			<description><![CDATA[<p>На сколько я понимаю, контейнер требуется в первую очередь для ловли событий от активИкса. В vbs&#039;е (стандартным образом) мы их поймать никак не сможем (может я ошибаюсь? Может в JavaScript есть обработка событий?).</p><p><strong>moobi</strong>, расскажи, как ты видишь использование этого АктивИкса (последовательность действий пользователя, интерфейс, чем не устраивает web-интерфейс и т.д.).</p>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 14:00:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62671#p62671</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62670#p62670</link>
			<description><![CDATA[<p><strong>chessman</strong>, спасибо, ты нереально крут. Жалко, я поздно увидел твой пост и целый день изголялся над вызовом компоненты. Последняя супермысль, после HTA (который к слову работает), и его оригинальных вызовов, типа:</p><div class="codebox"><pre><code>Set wshExec = CreateObject(&quot;WScript.Shell&quot;).Exec(&quot;mshta about:&quot;&quot;&lt;script&gt;moveTo(-1000,-1000);resizeTo(0,0);&lt;/script&gt;&quot; &amp;_
                            &quot;&lt;hta:application showintaskbar=no /&gt;&quot; &amp;_
                            &quot;&lt;object id=&quot; &amp; id &amp; &quot; classid=&#039;clsid:8856F961-340A-11D0-A96B-00C04FD705A2&#039;&gt;&lt;param name=RegisterAsBrowser value=1&gt;&lt;/object&gt;&quot;&quot;&quot;)</code></pre></div><p>Пришел к варианту, сделать com-сервер WSC, по примеру <a href="http://forum.script-coding.com/viewtopic.php?id=1037">http://forum.script-coding.com/viewtopic.php?id=1037</a>, который бы уже вызывал функции SIP компоненты, но план мой провалился, скрипт выпадает с той же ошибкой.</p><p>Может мой план не безнадежен, я что-то упустил и com компонента позволит обойти ограничение запуска из контейнера? Просто из любопытства, решение chessman, безусловно лучше.</p><p>Так я делал:</p><p>Test.wsc</p><div class="codebox"><pre><code>&lt;?xml version=&#039;1.0&#039; encoding=&#039;windows-1251&#039; standalone=&#039;yes&#039;?&gt;
&lt;component&gt;
&lt;registration progid=&#039;TestWSC&#039;/&gt;
&lt;public&gt;
    &lt;method name=&#039;AboutBox&#039;/&gt;
&lt;/public&gt;

&lt;object id=&quot;GTSIPObj&quot; classid=&quot;{FF888D2E-39C2-42CC-879E-2D7BA36480E7}&quot;/&gt;

&lt;script language=&quot;JScript&quot;&gt;&lt;![CDATA[

function AboutBox(){
return GTSIPObj.AboutBox();
}

]]&gt;&lt;/script&gt;
&lt;/component&gt;</code></pre></div><p>А вызывал соответственно:</p><div class="codebox"><pre><code>Set com=CreateObject(&quot;TestWSC&quot;)
com.AboutBox()</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (moobi)]]></author>
			<pubDate>Fri, 10 Aug 2012 13:25:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62670#p62670</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62658#p62658</link>
			<description><![CDATA[<p>Вот такой код у меня работает в 1С-ке - слышна музыка.</p><div class="codebox"><pre><code>Set Obj  = CreateObject(&quot;&quot;GTSIPCTRL.GTSIPAPICtrl.1&quot;&quot;)
Set Wrap = CreateObject(&quot;&quot;DynamicWrapperX&quot;&quot;)

&#039;Немного поправим объект
pObj  = Wrap.GetIDispatch(Obj)
&#039;MsgBox Hex(pObj)
pObj1 = pObj - &amp;h10
Wrap.NumPut -1, pObj1, &amp;hAC

Obj.AboutBox
Obj.CreateEnv 
Obj.CFGSetValue &quot;&quot;gtsrv.sip.server.model&quot;&quot;, &quot;&quot;0&quot;&quot;                     &#039;0 = client phone 1 = sip server app
Obj.CFGSetValue &quot;&quot;gtsrv.sip.ip.port&quot;&quot;, &quot;&quot;5076&quot;&quot;


&#039;RTP PORT
Obj.CFGSetValue &quot;&quot;gtsrv.sip.rtpstartrange&quot;&quot;, &quot;&quot;17400&quot;&quot;
Obj.CFGSetValue &quot;&quot;gtsrv.sip.rtpendrange&quot;&quot;, &quot;&quot;17800&quot;&quot;

&#039;Log
Obj.CFGSetValue &quot;&quot;gtsrv.log.level&quot;&quot;, &quot;&quot;4&quot;&quot;
Obj.CFGSetValue &quot;&quot;gtsrv.log.filename&quot;&quot;, &quot;&quot;c:\Temp\simplephone.txt&quot;&quot;

&#039;channnel numbers, here we only use 1 channel
Obj.CFGSetValue &quot;&quot;gtsrv.sip.boardnum.per.server&quot;&quot;, &quot;&quot;1&quot;&quot;
Obj.CFGSetValue &quot;&quot;gtsrv.sip.spannum.per.board&quot;&quot;, &quot;&quot;1&quot;&quot;
Obj.CFGSetValue &quot;&quot;gtsrv.sip.channum.per.span&quot;&quot;, &quot;&quot;1&quot;&quot;

&#039;Internal communication port
Obj.CFGSetValue &quot;&quot;gtsrv.net.port&quot;&quot;, &quot;&quot;8914&quot;&quot;
    
Obj.CFGSetValue &quot;&quot;gtsrv.sip.prefered.codec&quot;&quot;, &quot;&quot;0,8&quot;&quot;

res = Obj.StartServer()
&#039;MsgBox res

res = Obj.SendMake (0, &quot;&quot;&lt;sip:8888@pcbest.net&gt;&quot;&quot;, &quot;&quot;&quot;&quot;)
&#039;MsgBox res

Obj.SendStartDXAudio 0
&#039;codec = Obj.GetChanAudioCodec(0)
&#039;MsgBox codec</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 06:51:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62658#p62658</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62656#p62656</link>
			<description><![CDATA[<p>Еще бы какой-нить &quot;рабочий&quot; пример на vbs-е, который должен работать, потому как код из 1-го поста запустить удалось, после небольших&nbsp; доп. манипуляций.</p>]]></description>
			<author><![CDATA[null@example.com (chessman)]]></author>
			<pubDate>Fri, 10 Aug 2012 05:57:33 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62656#p62656</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62642#p62642</link>
			<description><![CDATA[<p>Да, некоторые activex-компоненты завязаны на оконный контейнер, вот пример:<br /><a href="http://habrahabr.ru/post/149277/">http://habrahabr.ru/post/149277/</a></p>]]></description>
			<author><![CDATA[null@example.com (max7)]]></author>
			<pubDate>Thu, 09 Aug 2012 19:21:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62642#p62642</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62623#p62623</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>что значит &quot;внутри контейнера&quot;?</p></blockquote></div><p>WebBrowser, форма VB/VBA и т.п.</p><p><a href="http://msdn.microsoft.com/en-us/library/aa768175(v=vs.85).aspx">Introduction to ActiveX Control Containers</a></p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Thu, 09 Aug 2012 14:12:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62623#p62623</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Разрушительный сбой ActiveX компоненты]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=62617#p62617</link>
			<description><![CDATA[<p>Я не совсем в теме, что значит &quot;внутри контейнера&quot;?</p>]]></description>
			<author><![CDATA[null@example.com (moobi)]]></author>
			<pubDate>Thu, 09 Aug 2012 14:03:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=62617#p62617</guid>
		</item>
	</channel>
</rss>
