#define MODE_FXO 3
+static VPB_TONE Dialtone = {440, 440, 440, 0, 0, 0, 5000, 0 };
+static VPB_TONE Busytone = {440, 0, 0, 0, -100, -100, 500, 500};
+static VPB_TONE Ringbacktone = {440, 0, 0, 0, -100, -100, 100, 100};
-static VPB_TONE Dialtone = {450, 425, 400, -10, -10, -10, 10000, 0 };
-static VPB_TONE Busytone = {425, 0, 0, -10, -100, -100, 500, 500};
-static VPB_TONE Ringbacktone = {425, 0, 0, -10, -100, -100, 1000, 3000};
-
#define VPB_MAX_BRIDGES 128
static struct vpb_bridge_t {
case VPB_STATION_FLASH:
f.subclass = AST_CONTROL_FLASH;
break;
-
+
+ case VPB_DIALEND:
+ f.subclass = AST_CONTROL_ANSWER;
+ break;
+
default:
f.frametype = -1;
break;
return -1;
}
if (p->mode != MODE_FXO) /* Station port, ring it. */
- res = vpb_ring_station_async(p->handle, VPB_RING_STATION_ON);
+ res = vpb_ring_station_async(p->handle, VPB_RING_STATION_ON,'1');
else {
VPB_CALL call;
if (res == 0) {
if (timeout) {
- vpb_timer_open(&p->timer, p->handle, 0, 1000*timeout);
+ vpb_timer_open(&p->timer, p->handle, 0, 100*timeout);
vpb_timer_start(p->timer);
}
p->calling = 1;
vpb_record_terminate(p->handle);
if (p->mode != MODE_FXO) { /* station port. */
- vpb_ring_station_async(p->handle, VPB_RING_STATION_OFF);
+ vpb_ring_station_async(p->handle, VPB_RING_STATION_OFF,'1');
vpb_playtone_async(p->handle, &Busytone);
} else
while (!p->stopreads && p->owner) {
int res = -1, fmt;
struct ast_channel *owner = p->owner;
- int afmt = (owner) ? owner->pvt->rawreadformat : AST_FORMAT_SLINEAR;
+ int afmt = (owner) ? owner->pvt->rawreadformat : AST_FORMAT_ALAW;
int state = (owner) ? owner->_state : AST_STATE_DOWN;
int readlen;
tmp->type = type;
tmp->nativeformats = prefformat;
- tmp->pvt->rawreadformat = AST_FORMAT_SLINEAR;
- tmp->pvt->rawwriteformat = AST_FORMAT_SLINEAR;
+ tmp->pvt->rawreadformat = AST_FORMAT_ALAW;
+ tmp->pvt->rawwriteformat = AST_FORMAT_ALAW;
ast_setstate(tmp, state);
if (state == AST_STATE_RING)
tmp->rings = 1;