[Freeswitch-users] zapata.conf immediate=yes in Asterisk - Freeswitch equivalent?
Scott Ellis
scott.ellis at novatex.com.au
Thu Jan 15 02:17:28 PST 2009
After poking around in the code, it looks like if I set <param
name="enable-callerid" value="false"/> in openzap.conf.xml, it should
skip the GET_CALLERID state, and I should get the call answered straight
away.
mod_openzap.c
} else if (!strcasecmp(var, "enable-callerid")) {
enable_callerid = val;
if (zap_configure_span("analog", span, on_analog_signal,
"tonemap", tonegroup,
"digit_timeout", &to,
"max_dialstr", &max,
"hotline", hotline,
"enable_callerid", enable_callerid,
TAG_END) != ZAP_SUCCESS) {
zap_log(ZAP_LOG_ERROR, "Error starting OpenZAP span
%d\n", span_id);
continue;
}
ozmod_analog.c
else if (!strcasecmp(var, "enable_callerid")) {
if (!(val = va_arg(ap, char *))) {
break;
}
if (zap_true(val)) {
flags |= ZAP_ANALOG_CALLERID;
} else {
flags &= ~ZAP_ANALOG_CALLERID;
}
and
case ZAP_OOB_RING_START:
{
if (event->channel->type != ZAP_CHAN_TYPE_FXO) {
zap_log(ZAP_LOG_ERROR, "Cannot get a RING_START event on
a non-fxo channel, please check your config.\n");
zap_set_state_locked(event->channel,
ZAP_CHANNEL_STATE_DOWN);
goto end;
}
if (!event->channel->ring_count && (event->channel->state ==
ZAP_CHANNEL_STATE_DOWN && !zap_test_flag(event->channel,
ZAP_CHANNEL_INTHREAD))) {
if (zap_test_flag(analog_data, ZAP_ANALOG_CALLERID)) {
zap_set_state_locked(event->channel,
ZAP_CHANNEL_STATE_GET_CALLERID);
} else {
zap_set_state_locked(event->channel,
ZAP_CHANNEL_STATE_IDLE);
}
event->channel->ring_count = 1;
zap_mutex_unlock(event->channel->mutex);
locked = 0;
zap_thread_create_detached(zap_analog_channel_run,
event->channel);
} else {
event->channel->ring_count++;
}
}
break;
2009-01-15 20:19:44 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [DOWN]
2009-01-15 20:19:44 [DEBUG] ozmod_analog.c:760 process_event() Changing
state on 1:1 from DOWN to GET_CALLERID
2009-01-15 20:19:44 [DEBUG] ozmod_analog.c:239 zap_analog_channel_run()
ANALOG CHANNEL thread starting.
2009-01-15 20:19:44 [DEBUG] ozmod_analog.c:410 zap_analog_channel_run()
Executing state handler on 1:1 for GET_CALLERID
2009-01-15 20:19:44 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:44 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:45 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:47 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:47 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:47 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:48 [DEBUG] ozmod_analog.c:744 process_event() EVENT
[RING_START][1:1] STATE [GET_CALLERID]
2009-01-15 20:19:49 [DEBUG] ozmod_analog.c:292 zap_analog_channel_run()
Changing state on 1:1 from GET_CALLERID to IDLE
2009-01-15 20:19:49 [DEBUG] ozmod_analog.c:410 zap_analog_channel_run()
Executing state handler on 1:1 for IDLE
2009-01-15 20:19:49 [DEBUG] mod_openzap.c:1165 on_fxo_signal() got FXO
sig 1:1 [START]
The code all looks right, but I am not getting what I think should
happen. Anyone with any ideas?
Scott
Scott Ellis wrote:
> Searched the wiki and mailing lists as best I can, but with no luck.
>
> How do I get OpenZap to answer a call immediately? (I do not need caller id)
>
> Scott
>
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
More information about the FreeSWITCH-users
mailing list