<div dir="ltr">Fala Pessoal blz?<div><br></div><div>Estou estudando a implementação do chan_dongle e Não estou conseguindo obter as informações das variáveis do dongle.</div><div><br></div><div>Meu cenário é o seguinte: </div><div>Linux: CentOS 6.6</div><div>Asterisk: 11.18</div><div>Driver Chan_Dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 16</div><div><br></div><div>extensions.conf</div><div><br></div><div><p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(213,59,211);background-color:rgb(0,0,0)">[from-teste]</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)"><span style="color:#c33720">exten => </span><span style="color:#34bd26">_X.</span>,<span style="color:#d53bd3">1</span>,<span style="color:#ce7924">Noop</span>( Inicio da Chamada )</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">same => n,<span style="color:#ce7924">Noop</span>(NUM_A <span style="color:#c33720">${EXTEN}</span> )</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(195,55,32);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Noop</span><span style="color:#fffb00">(</span>${NAME_OF_PROVIDER}<span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(195,55,32);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Noop</span><span style="color:#fffb00">(</span>${IMEI_OF_DEVICE}<span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">same => n,<span style="color:#ce7924">Dial</span>(Dongle/r1/<span style="color:#c33720">${EXTEN}</span>)</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">same => n,<span style="color:#ce7924">Noop</span>( <span style="color:#c33720">${DIALSTATUS}</span>)</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(195,55,32);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Noop</span><span style="color:#fffb00">( </span>${HANGUPCAUSE}<span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">same => n,<span style="color:#ce7924">Hangup</span>()</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0);min-height:15px"><br></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(195,55,32);background-color:rgb(0,0,0)">exten => <span style="color:#34bd26">h</span><span style="color:#fffb00">,</span><span style="color:#d53bd3">1</span><span style="color:#fffb00">,</span><span style="color:#ce7924">Set</span><span style="color:#fffb00">(</span><span style="color:#34bbc7">CDR(userfield)</span><span style="color:#fffb00">=REL.</span>ISDN<span style="color:#fffb00">=</span>${HANGUPCAUSE}<span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(52,187,199);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Set</span><span style="color:#fffb00">(</span>CDR(NAME_OF_DEVICE)<span style="color:#fffb00">=</span><span style="color:#c33720">${DONGLENAME}</span><span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(52,187,199);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Set</span><span style="color:#fffb00">(</span>CDR(NAME_OF_PROVIDE)<span style="color:#fffb00">=</span><span style="color:#c33720">${DONGLEPROVIDER}</span><span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(52,187,199);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Set</span><span style="color:#fffb00">(</span>CDR(IMEI_OF_DEVICE)<span style="color:#fffb00">=</span><span style="color:#c33720">${DONGLEIMEI}</span><span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(52,187,199);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Set</span><span style="color:#fffb00">(</span>CDR(IMSI_OF_SIMCARD)<span style="color:#fffb00">=</span><span style="color:#c33720">${DONGLEIMSI}</span><span style="color:#fffb00">)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(52,187,199);background-color:rgb(0,0,0)"><span style="color:#fffb00">same => n,</span><span style="color:#ce7924">Set</span><span style="color:#fffb00">(</span>CDR(CNUM_NUMBER)<span style="color:#fffb00">=</span><span style="color:#c33720">${DONGLENUMBER}</span><span style="color:#fffb00">)</span></p></div><div><span style="color:#fffb00"><br></span></div><div><br></div><div>dongle.conf</div><div><br></div><div><p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(213,59,211);background-color:rgb(0,0,0)">[general]</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">interval</span><span style="color:#fffb00">=15 </span>; Number of seconds between trying to connect to devices</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0);min-height:15px"><br></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(213,59,211);background-color:rgb(0,0,0)">[defaults]</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">context</span><span style="color:#fffb00">=nada </span>; context for incoming calls</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)"><span style="color:#c33720">group</span>=0 <span style="color:#5330e1">; calling group</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">rxgain</span><span style="color:#fffb00">=0 </span>; increase the incoming volume; may be negative</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">txgain</span><span style="color:#fffb00">=0 </span>; increase the outgoint volume; may be negative</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">autodeletesms</span><span style="color:#fffb00">=yes </span>; auto delete incoming sms</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">resetdongle</span><span style="color:#fffb00">=yes </span>; reset dongle during initialization with ATZ command</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">u2diag</span><span style="color:#fffb00">=-1 </span>; set ^U2DIAG parameter on device (0 = disable everything except modem function) ; -1 not use ^U2DIAG command</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">usecallingpres</span><span style="color:#fffb00">=yes </span>; use the caller ID presentation or not</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">callingpres</span><span style="color:#fffb00">=allowed_passed_screen </span>; set caller ID presentation by default use default network settings</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">disablesms</span><span style="color:#fffb00">=no </span>; disable of SMS reading from device when received</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">language</span><span style="color:#fffb00">=en </span>; set channel default language</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">smsaspdu</span><span style="color:#fffb00">=yes </span>; if 'yes' send SMS in PDU mode, feature implementation incomplete and we strongly recommend say 'yes'</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">mindtmfgap</span><span style="color:#fffb00">=45 </span>; minimal interval from end of previews DTMF from begining of next in ms</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">mindtmfduration</span><span style="color:#fffb00">=80 </span>; minimal DTMF tone duration in ms</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">mindtmfinterval</span><span style="color:#fffb00">=200 </span>; minimal interval between ends of DTMF of same digits in ms</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">callwaiting</span><span style="color:#fffb00">=auto </span>; if 'yes' allow incoming calls waiting; by default use network settings</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">disable</span><span style="color:#fffb00">=no </span>; OBSOLETED by initstate: if 'yes' no load this device and just ignore this section</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">initstate</span><span style="color:#fffb00">=start </span>; specified initial state of device, must be one of 'stop' 'start' 'remote'</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">exten</span><span style="color:#fffb00">=+1234567890 </span>; exten for start incoming calls, only in case of Subscriber Number not available!, also set to CALLERID(ndid)</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)"><span style="color:#c33720">dtmf</span><span style="color:#fffb00">=relax </span>; control of incoming DTMF detection, possible values:</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0);min-height:15px"><br></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)">; discovered device</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(213,59,211);background-color:rgb(0,0,0)">[dc_8562_3823]<span style="color:#fffb00;background-color:#e6e600">(defaults)</span></p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)">;audio=/dev/ttyUSB1</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(83,48,225);background-color:rgb(0,0,0)">;data=/dev/ttyUSB2</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)"><span style="color:#c33720">imei</span>=xxxxxxxxxxxxxx(imei suprimido para o topico)</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)"><span style="color:#c33720">imsi</span>=xxxxxxxxxxxxxx<span style="background-color:#00e6e5">(</span>imsi suprimido para o topico<span style="background-color:#00e6e5">)</span></p></div><div><br></div><div>Resultado na cli</div><div><p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] == Spawn extension (from-teste, 971101304, 6) exited non-zero on 'Console/dsp'</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] -- Executing [h@from-teste:1] <span style="color:#34bbc7">Set</span>("<span style="color:#d53bd3">Console/dsp</span>", "<span style="color:#d53bd3">CDR(userfield)=REL.ISDN=16</span>") in new stack</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] -- Executing [h@from-teste:2] <span style="color:#34bbc7">Set</span>("<span style="color:#d53bd3">Console/dsp</span>", "<span style="color:#d53bd3">CDR(NAME_OF_DEVICE)=</span>") in new stack</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] -- Executing [h@from-teste:3] <span style="color:#34bbc7">Set</span>("<span style="color:#d53bd3">Console/dsp</span>", "<span style="color:#d53bd3">CDR(NAME_OF_PROVIDE)=</span>") in new stack</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] -- Executing [h@from-teste:4] <span style="color:#34bbc7">Set</span>("<span style="color:#d53bd3">Console/dsp</span>", "<span style="color:#d53bd3">CDR(IMEI_OF_DEVICE)=</span>") in new stack</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] -- Executing [h@from-teste:5] <span style="color:#34bbc7">Set</span>("<span style="color:#d53bd3">Console/dsp</span>", "<span style="color:#d53bd3">CDR(IMSI_OF_SIMCARD)=</span>") in new stack</p>
<p style="margin:0px;font-size:13px;font-family:'Andale Mono';color:rgb(255,251,0);background-color:rgb(0,0,0)">[2015-08-03 21:30:28] -- Executing [h@from-teste:6] <span style="color:#34bbc7">Set</span>("<span style="color:#d53bd3">Console/dsp</span>", "<span style="color:#d53bd3">CDR(CNUM_NUMBER)=</span>") in new stack</p></div><div><br></div><div><br></div><div>Está tudo funcionando corretamente e consigo enviar chamadas sem problema, mas quando tento utilizar as informações das variáveis elas aparecem com campo em branco ou NULL.</div><div><br></div><div>Li apenas as informações oficiais no wiki:</div><div><a href="http://wiki.e1550.mobi/doku.php?id=usage">http://wiki.e1550.mobi/doku.php?id=usage</a><br></div><div><br></div><div><br></div><div>Valeu Galera,</div><div>Abs</div><div>Artur M.</div></div>