This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth 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 " | case " | ||
- | /* don't touch any locally initiated calls */ | + | // don't touch any locally initiated calls |
break; | break; | ||
case " | case " | ||
Line 141: | Line 141: | ||
id, struct_get(call, | id, struct_get(call, | ||
- | /* route any incoming calls to audio device | + | // route any incoming calls to audio device |
if (nb_voice_call_route(call, | if (nb_voice_call_route(call, | ||
nb_syslog(" | nb_syslog(" | ||
Line 148: | Line 148: | ||
nb_syslog(" | nb_syslog(" | ||
nb_voice_call_hangup(call); | nb_voice_call_hangup(call); | ||
- | | + | // no signaling |
} | } | ||
break; | break; | ||
case " | case " | ||
- | /* accept calls if DI1 closes | + | // accept calls if DI1 closes |
nb_syslog(" | nb_syslog(" | ||
Line 161: | Line 161: | ||
nb_syslog(" | nb_syslog(" | ||
} else { | } else { | ||
- | /* wait until IN1 has been closed | + | // wait until IN1 has been closed |
nb_syslog(" | nb_syslog(" | ||
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(" | nb_syslog(" | ||
- | /* nb_voice_call_volume(call, | + | // nb_voice_call_volume(call, |
return; /* call established */ | return; /* call established */ | ||
} else { | } else { | ||
Line 180: | Line 180: | ||
} | } | ||
} | } | ||
- | /* otherwise hangup | + | // otherwise hangup |
nb_syslog(" | nb_syslog(" | ||
nb_voice_call_hangup(call); | nb_voice_call_hangup(call); | ||
- | nb_dio_set(" | + | nb_dio_set(" |
} | } | ||
break; | break; | ||
Line 209: | Line 209: | ||
d = new dispatcher(); | d = new dispatcher(); | ||
- | nb_dio_set(" | + | nb_dio_set(" |
dump(d); | dump(d); | ||
d.run(); | d.run(); |