Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
sdk:scripts:voice-dispatcher-audio [2020/03/18 09:47]
fachet
sdk:scripts:voice-dispatcher-audio [2022/08/23 13:21]
juraschek
Line 135: Line 135:
         switch (type) {         switch (type) {
             case "​outgoing":​             case "​outgoing":​
-                /don't touch any locally initiated calls */+                /don't touch any locally initiated calls 
                 break;                 break;
             case "​incoming":​             case "​incoming":​
Line 141: Line 141:
                           id, struct_get(call,​ "​calling"​),​ struct_get(call,​ "​called"​));​                           id, struct_get(call,​ "​calling"​),​ struct_get(call,​ "​called"​));​
  
-                /route any incoming calls to audio device ​*/+                /route any incoming calls to audio device ​
                 if (nb_voice_call_route(call,​ audesc) == 0) {                 if (nb_voice_call_route(call,​ audesc) == 0) {
                     nb_syslog("​routing call %d to %s", id, audesc);                     nb_syslog("​routing call %d to %s", id, audesc);
Line 148: Line 148:
                     nb_syslog("​unable to route call %d to %s", id, audesc);                     nb_syslog("​unable to route call %d to %s", id, audesc);
                     nb_voice_call_hangup(call);​                     nb_voice_call_hangup(call);​
-                    ​nb_dio_set("​out2",​ 0); /* error, no active call */+                    // no signaling ​
                 }                 }
                 break;                 break;
             case "​dispatched":​             case "​dispatched":​
-                /accept calls if DI1 closes ​*/+                /accept calls if DI1 closes ​
  
                 nb_syslog("​call %s: %s to %s got dispatched",​                 nb_syslog("​call %s: %s to %s got dispatched",​
Line 161: Line 161:
                         nb_syslog("​hanging up call %d as audio is busy", id);                         nb_syslog("​hanging up call %d as audio is busy", id);
                     } else {                     } else {
-                        /wait until IN1 has been closed ​*/+                        /wait until IN1 has been closed ​
                         nb_syslog("​waiting 10s until IN1 is closed"​);​                         nb_syslog("​waiting 10s until IN1 is closed"​);​
                         for (i = 0; i < 10; i++) {                         for (i = 0; i < 10; i++) {
Line 170: Line 170:
                                 if (nb_voice_call_accept(call) == 0) {                                 if (nb_voice_call_accept(call) == 0) {
                                     nb_syslog("​accepted call %d", id);                                     nb_syslog("​accepted call %d", id);
-                                    /nb_voice_call_volume(call,​ 7); increase volume level to max */+                                    /nb_voice_call_volume(call,​ 7); increase volume level to max //
                                     return; /* call established */                                     return; /* call established */
                                 } else {                                 } else {
Line 180: Line 180:
                         }                         }
                     }                     }
-                    /otherwise hangup ​*/+                    /otherwise hangup ​
                     nb_syslog("​hanging up call %d", id);                     nb_syslog("​hanging up call %d", id);
                     nb_voice_call_hangup(call);​                     nb_voice_call_hangup(call);​
-                    nb_dio_set("​out2",​ 0); /error, no active call */+                    nb_dio_set("​out2",​ 0); /error, no active call 
                 }                 }
                 break;                 break;
Line 209: Line 209:
  
 d = new dispatcher();​ d = new dispatcher();​
-nb_dio_set("​out1",​ 0); /clear signaling ​*/+nb_dio_set("​out1",​ 0); /clear signaling ​
 dump(d); dump(d);
 d.run(); d.run();