@ -1223,12 +1223,9 @@ static int pri_fixup_principle(struct sig_pri_span *pri, int principle, q931_cal
new_chan - > waiting_for_aoce = old_chan - > waiting_for_aoce ;
new_chan - > holding_aoce = old_chan - > holding_aoce ;
# endif /* defined(HAVE_PRI_AOC_EVENTS) */
new_chan - > alerting = old_chan - > alerting ;
new_chan - > alreadyhungup = old_chan - > alreadyhungup ;
new_chan - > isidlecall = old_chan - > isidlecall ;
new_chan - > proceeding = old_chan - > proceeding ;
new_chan - > progress = old_chan - > progress ;
new_chan - > setup_ack = old_chan - > setup_ack ;
new_chan - > outgoing = old_chan - > outgoing ;
new_chan - > digital = old_chan - > digital ;
# if defined(HAVE_PRI_CALL_WAITING)
@ -1240,12 +1237,9 @@ static int pri_fixup_principle(struct sig_pri_span *pri, int principle, q931_cal
old_chan - > waiting_for_aoce = 0 ;
old_chan - > holding_aoce = 0 ;
# endif /* defined(HAVE_PRI_AOC_EVENTS) */
old_chan - > alerting = 0 ;
old_chan - > alreadyhungup = 0 ;
old_chan - > isidlecall = 0 ;
old_chan - > proceeding = 0 ;
old_chan - > progress = 0 ;
old_chan - > setup_ack = 0 ;
old_chan - > outgoing = 0 ;
old_chan - > digital = 0 ;
# if defined(HAVE_PRI_CALL_WAITING)
@ -1253,6 +1247,8 @@ static int pri_fixup_principle(struct sig_pri_span *pri, int principle, q931_cal
# endif /* defined(HAVE_PRI_CALL_WAITING) */
/* More stuff to transfer to the new channel. */
new_chan - > call_level = old_chan - > call_level ;
old_chan - > call_level = SIG_PRI_CALL_LEVEL_IDLE ;
# if defined(HAVE_PRI_REVERSE_CHARGE)
new_chan - > reverse_charging_indication = old_chan - > reverse_charging_indication ;
# endif /* defined(HAVE_PRI_REVERSE_CHARGE) */
@ -1637,12 +1633,28 @@ static void *pri_ss_thread(void *data)
/* Start the real PBX */
ast_copy_string ( chan - > exten , exten , sizeof ( chan - > exten ) ) ;
sig_pri_dsp_reset_and_flush_digits ( p ) ;
if ( p - > pri - > overlapdial & DAHDI_OVERLAPDIAL_INCOMING ) {
# if defined(ISSUE_16789)
/*
* Conditionaled out this code to effectively revert the Mantis
* issue 16789 change . It breaks overlap dialing through
* Asterisk . There is not enough information available at this
* point to know if dialing is complete . The
* ast_exists_extension ( ) , ast_matchmore_extension ( ) , and
* ast_canmatch_extension ( ) calls are not adequate to detect a
* dial through extension pattern of " _9! " .
*
* Workaround is to use the dialplan Proceeding ( ) application
* early on non - dial through extensions .
*/
if ( ( p - > pri - > overlapdial & DAHDI_OVERLAPDIAL_INCOMING )
& & ! ast_matchmore_extension ( chan , chan - > context , exten , 1 , p - > cid_num ) ) {
sig_pri_lock_private ( p ) ;
if ( p - > pri - > pri ) {
if ( p - > pri - > pri ) {
if ( ! pri_grab ( p , p - > pri ) ) {
if ( p - > call_level < SIG_PRI_CALL_LEVEL_PROCEEDING ) {
p - > call_level = SIG_PRI_CALL_LEVEL_PROCEEDING ;
}
pri_proceeding ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 0 ) ;
p - > proceeding = 1 ;
pri_rel ( p - > pri ) ;
} else {
ast_log ( LOG_WARNING , " Unable to grab PRI on span %d \n " , p - > pri - > span ) ;
@ -1650,6 +1662,7 @@ static void *pri_ss_thread(void *data)
}
sig_pri_unlock_private ( p ) ;
}
# endif /* defined(ISSUE_16789) */
sig_pri_set_echocanceller ( p , 1 ) ;
ast_setstate ( chan , AST_STATE_RING ) ;
@ -4837,13 +4850,14 @@ static void *pri_dchannel(void *vpri)
/* Setup law */
if ( e - > ring . complete | | ! ( pri - > overlapdial & DAHDI_OVERLAPDIAL_INCOMING ) ) {
/* Just announce proceeding */
pri - > pvts [ chanpos ] - > proceeding = 1 ;
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_PROCEEDING ;
pri_proceeding ( pri - > pri , e - > ring . call , PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 0 ) ;
} else if ( pri - > switchtype = = PRI_SWITCH_GR303_TMC ) {
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_CONNECT ;
pri_answer ( pri - > pri , e - > ring . call , PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 1 ) ;
} else {
if ( pri - > switchtype ! = PRI_SWITCH_GR303_TMC )
pri_need_more_info ( pri - > pri , e - > ring . call , PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 1 ) ;
else
pri_answer ( pri - > pri , e - > ring . call , PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 1 ) ;
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_OVERLAP ;
pri_need_more_info ( pri - > pri , e - > ring . call , PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 1 ) ;
}
/* Start PBX */
@ -4927,6 +4941,21 @@ static void *pri_dchannel(void *vpri)
sig_pri_handle_subcmds ( pri , chanpos , e - > e , e - > ring . channel ,
e - > ring . subcmds , e - > ring . call ) ;
if ( ! pri - > pvts [ chanpos ] - > digital
& & ! pri - > pvts [ chanpos ] - > no_b_channel ) {
/*
* Call has a channel .
* Indicate that we are providing dialtone .
*/
pri - > pvts [ chanpos ] - > progress = 1 ; /* No need to send plain PROGRESS again. */
# ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause ( pri - > pri , e - > ring . call ,
PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 1 , - 1 ) ; /* no cause at all */
# else
pri_progress ( pri - > pri , e - > ring . call ,
PVT_TO_CHANNEL ( pri - > pvts [ chanpos ] ) , 1 ) ;
# endif
}
}
if ( c & & ! ast_pthread_create_detached ( & threadid , NULL , pri_ss_thread , pri - > pvts [ chanpos ] ) ) {
ast_verb ( 3 , " Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d \n " ,
@ -5085,7 +5114,9 @@ static void *pri_dchannel(void *vpri)
sig_pri_cc_generic_check ( pri , chanpos , AST_CC_CCNR ) ;
sig_pri_set_echocanceller ( pri - > pvts [ chanpos ] , 1 ) ;
pri_queue_control ( pri , chanpos , AST_CONTROL_RINGING ) ;
pri - > pvts [ chanpos ] - > alerting = 1 ;
if ( pri - > pvts [ chanpos ] - > call_level < SIG_PRI_CALL_LEVEL_ALERTING ) {
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_ALERTING ;
}
if (
# ifdef PRI_PROGRESS_MASK
@ -5172,11 +5203,11 @@ static void *pri_dchannel(void *vpri)
sig_pri_lock_private ( pri - > pvts [ chanpos ] ) ;
sig_pri_handle_subcmds ( pri , chanpos , e - > e , e - > proceeding . channel ,
e - > proceeding . subcmds , e - > proceeding . call ) ;
if ( ! pri - > pvts [ chanpos ] - > proceeding ) {
if ( pri - > pvts [ chanpos ] - > call_level < SIG_PRI_CALL_LEVEL_PROCEEDING ) {
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_PROCEEDING ;
ast_debug ( 1 , " Queuing frame from PRI_EVENT_PROCEEDING on channel %d/%d span %d \n " ,
pri - > pvts [ chanpos ] - > logicalspan , pri - > pvts [ chanpos ] - > prioffset , pri - > span ) ;
pri_queue_control ( pri , chanpos , AST_CONTROL_PROCEEDING ) ;
pri - > pvts [ chanpos ] - > proceeding = 1 ;
}
if ( ! pri - > pvts [ chanpos ] - > progress
& & ! pri - > pvts [ chanpos ] - > no_b_channel
@ -5311,7 +5342,9 @@ static void *pri_dchannel(void *vpri)
# endif /* defined(HAVE_PRI_CALL_WAITING) */
sig_pri_handle_subcmds ( pri , chanpos , e - > e , e - > answer . channel ,
e - > answer . subcmds , e - > answer . call ) ;
pri - > pvts [ chanpos ] - > proceeding = 1 ;
if ( pri - > pvts [ chanpos ] - > call_level < SIG_PRI_CALL_LEVEL_CONNECT ) {
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_CONNECT ;
}
sig_pri_open_media ( pri - > pvts [ chanpos ] ) ;
pri_queue_control ( pri , chanpos , AST_CONTROL_ANSWER ) ;
/* Enable echo cancellation if it's not on already */
@ -5734,16 +5767,36 @@ static void *pri_dchannel(void *vpri)
} else {
chanpos = pri_fixup_principle ( pri , chanpos , e - > setup_ack . call ) ;
if ( chanpos > - 1 ) {
unsigned int len ;
sig_pri_lock_private ( pri - > pvts [ chanpos ] ) ;
sig_pri_handle_subcmds ( pri , chanpos , e - > e , e - > setup_ack . channel ,
e - > setup_ack . subcmds , e - > setup_ack . call ) ;
pri - > pvts [ chanpos ] - > setup_ack = 1 ;
if ( pri - > pvts [ chanpos ] - > call_level < SIG_PRI_CALL_LEVEL_OVERLAP ) {
pri - > pvts [ chanpos ] - > call_level = SIG_PRI_CALL_LEVEL_OVERLAP ;
}
/* Send any queued digits */
for ( x = 0 ; x < strlen ( pri - > pvts [ chanpos ] - > dialdest ) ; x + + ) {
len = strlen ( pri - > pvts [ chanpos ] - > dialdest ) ;
for ( x = 0 ; x < len ; + + x ) {
ast_debug ( 1 , " Sending pending digit '%c' \n " , pri - > pvts [ chanpos ] - > dialdest [ x ] ) ;
pri_information ( pri - > pri , pri - > pvts [ chanpos ] - > call ,
pri - > pvts [ chanpos ] - > dialdest [ x ] ) ;
}
if ( ! pri - > pvts [ chanpos ] - > progress
& & ( pri - > overlapdial & DAHDI_OVERLAPDIAL_OUTGOING )
& & ! pri - > pvts [ chanpos ] - > digital
& & ! pri - > pvts [ chanpos ] - > no_b_channel ) {
/*
* Call has a channel .
* Indicate for overlap dialing that dialtone may be present .
*/
pri_queue_control ( pri , chanpos , AST_CONTROL_PROGRESS ) ;
pri - > pvts [ chanpos ] - > progress = 1 ; /* Claim to have seen inband-information */
sig_pri_set_dialing ( pri - > pvts [ chanpos ] , 0 ) ;
sig_pri_open_media ( pri - > pvts [ chanpos ] ) ;
}
sig_pri_unlock_private ( pri - > pvts [ chanpos ] ) ;
} else
ast_log ( LOG_WARNING , " Unable to move channel %d! \n " , e - > setup_ack . channel ) ;
@ -5874,10 +5927,8 @@ int sig_pri_hangup(struct sig_pri_chan *p, struct ast_channel *ast)
ast_atomic_fetchadd_int ( & p - > pri - > num_call_waiting_calls , - 1 ) ;
}
# endif /* defined(HAVE_PRI_CALL_WAITING) */
p - > proceeding = 0 ;
p - > call_level = SIG_PRI_CALL_LEVEL_IDLE ;
p - > progress = 0 ;
p - > alerting = 0 ;
p - > setup_ack = 0 ;
p - > cid_num [ 0 ] = ' \0 ' ;
p - > cid_subaddr [ 0 ] = ' \0 ' ;
p - > cid_name [ 0 ] = ' \0 ' ;
@ -6437,6 +6488,8 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, i
ast_log ( LOG_WARNING , " Unable to setup CC recall call to device %s \n " ,
device_name ) ;
ao2_ref ( monitor , - 1 ) ;
pri_destroycall ( p - > pri - > pri , p - > call ) ;
p - > call = NULL ;
pri_rel ( p - > pri ) ;
pri_sr_free ( sr ) ;
return - 1 ;
@ -6453,10 +6506,13 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, i
if ( core_id = = - 1 & & pri_setup ( p - > pri - > pri , p - > call , sr ) ) {
ast_log ( LOG_WARNING , " Unable to setup call to %s (using %s) \n " ,
c + p - > stripmsd + dp_strip , dialplan2str ( p - > pri - > dialplan ) ) ;
pri_destroycall ( p - > pri - > pri , p - > call ) ;
p - > call = NULL ;
pri_rel ( p - > pri ) ;
pri_sr_free ( sr ) ;
return - 1 ;
}
p - > call_level = SIG_PRI_CALL_LEVEL_SETUP ;
pri_sr_free ( sr ) ;
ast_setstate ( ast , AST_STATE_DIALING ) ;
sig_pri_set_dialing ( p , 1 ) ;
@ -6474,11 +6530,16 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
chan - > hangupcause = AST_CAUSE_USER_BUSY ;
chan - > _softhangup | = AST_SOFTHANGUP_DEV ;
res = 0 ;
} else if ( ! p - > progress & & p - > pri & & ! p - > outgoing ) {
if ( p - > pri - > pri ) {
break ;
}
res = sig_pri_play_tone ( p , SIG_PRI_TONE_BUSY ) ;
if ( p - > call_level < SIG_PRI_CALL_LEVEL_ALERTING & & ! p - > outgoing ) {
chan - > hangupcause = AST_CAUSE_USER_BUSY ;
p - > progress = 1 ; /* No need to send plain PROGRESS after this. */
if ( p - > pri & & p - > pri - > pri ) {
if ( ! pri_grab ( p , p - > pri ) ) {
# ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 , PRI_CAUSE_USER_BUSY ) ; /* cause = 17 */
pri_progress_with_cause ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 , chan- > hangupcause ) ;
# else
pri_progress ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 ) ;
# endif
@ -6487,13 +6548,12 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
ast_log ( LOG_WARNING , " Unable to grab PRI on span %d \n " , p - > pri - > span ) ;
}
}
p - > progress = 1 ;
res = sig_pri_play_tone ( p , SIG_PRI_TONE_BUSY ) ;
}
break ;
case AST_CONTROL_RINGING :
if ( ( ! p - > alerting ) & & p - > pri & & ! p - > outgoing & & ( chan - > _state ! = AST_STATE_UP ) ) {
if ( p - > pri - > pri ) {
if ( p - > call_level < SIG_PRI_CALL_LEVEL_ALERTING & & ! p - > outgoing ) {
p - > call_level = SIG_PRI_CALL_LEVEL_ALERTING ;
if ( p - > pri & & p - > pri - > pri ) {
if ( ! pri_grab ( p , p - > pri ) ) {
pri_acknowledge ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) ,
p - > no_b_channel | | p - > digital ? 0 : 1 ) ;
@ -6502,7 +6562,6 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
ast_log ( LOG_WARNING , " Unable to grab PRI on span %d \n " , p - > pri - > span ) ;
}
}
p - > alerting = 1 ;
}
res = sig_pri_play_tone ( p , SIG_PRI_TONE_RINGTONE ) ;
if ( chan - > _state ! = AST_STATE_UP ) {
@ -6512,12 +6571,12 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
break ;
case AST_CONTROL_PROCEEDING :
ast_debug ( 1 , " Received AST_CONTROL_PROCEEDING on %s \n " , chan - > name ) ;
if ( ! p - > proceeding & & p - > pri & & ! p - > outgoing ) {
if ( p - > pri - > pri ) {
if ( p - > call_level < SIG_PRI_CALL_LEVEL_PROCEEDING & & ! p - > outgoing ) {
p - > call_level = SIG_PRI_CALL_LEVEL_PROCEEDING ;
if ( p - > pri & & p - > pri - > pri ) {
if ( ! pri_grab ( p , p - > pri ) ) {
pri_proceeding ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) ,
p - > no_b_channel | | p - > digital ? 0 : 1 ) ;
p - > proceeding = 1 ;
if ( ! p - > no_b_channel & & ! p - > digital ) {
sig_pri_set_dialing ( p , 0 ) ;
}
@ -6533,8 +6592,10 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
case AST_CONTROL_PROGRESS :
ast_debug ( 1 , " Received AST_CONTROL_PROGRESS on %s \n " , chan - > name ) ;
sig_pri_set_digital ( p , 0 ) ; /* Digital-only calls isn't allowing any inband progress messages */
if ( ! p - > progress & & ! p - > alerting & & p - > pri & & ! p - > outgoing & & ! p - > no_b_channel ) {
if ( p - > pri - > pri ) {
if ( ! p - > progress & & p - > call_level < SIG_PRI_CALL_LEVEL_ALERTING & & ! p - > outgoing
& & ! p - > no_b_channel ) {
p - > progress = 1 ; /* No need to send plain PROGRESS again. */
if ( p - > pri & & p - > pri - > pri ) {
if ( ! pri_grab ( p , p - > pri ) ) {
# ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 , - 1 ) ; /* no cause at all */
@ -6546,22 +6607,45 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
ast_log ( LOG_WARNING , " Unable to grab PRI on span %d \n " , p - > pri - > span ) ;
}
}
p - > progress = 1 ;
}
/* don't continue in ast_indicate */
res = 0 ;
break ;
case AST_CONTROL_CONGESTION :
chan - > hangupcause = AST_CAUSE_CONGESTION ;
if ( p - > priindication_oob | | p - > no_b_channel ) {
chan - > hangupcause = AST_CAUSE_SWITCH_CONGESTION ;
/* There are many cause codes that generate an AST_CONTROL_CONGESTION. */
switch ( chan - > hangupcause ) {
case AST_CAUSE_USER_BUSY :
case AST_CAUSE_NORMAL_CLEARING :
case 0 : /* Cause has not been set. */
/* Supply a more appropriate cause. */
chan - > hangupcause = AST_CAUSE_SWITCH_CONGESTION ;
break ;
default :
break ;
}
chan - > _softhangup | = AST_SOFTHANGUP_DEV ;
res = 0 ;
} else if ( ! p - > progress & & p - > pri & & ! p - > outgoing ) {
if ( p - > pri - > pri ) {
break ;
}
res = sig_pri_play_tone ( p , SIG_PRI_TONE_CONGESTION ) ;
if ( p - > call_level < SIG_PRI_CALL_LEVEL_ALERTING & & ! p - > outgoing ) {
/* There are many cause codes that generate an AST_CONTROL_CONGESTION. */
switch ( chan - > hangupcause ) {
case AST_CAUSE_USER_BUSY :
case AST_CAUSE_NORMAL_CLEARING :
case 0 : /* Cause has not been set. */
/* Supply a more appropriate cause. */
chan - > hangupcause = AST_CAUSE_SWITCH_CONGESTION ;
break ;
default :
break ;
}
p - > progress = 1 ; /* No need to send plain PROGRESS after this. */
if ( p - > pri & & p - > pri - > pri ) {
if ( ! pri_grab ( p , p - > pri ) ) {
# ifdef HAVE_PRI_PROG_W_CAUSE
pri_progress_with_cause ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 , PRI_CAUSE_SWITCH_CONGESTION ) ; /* cause = 42 */
pri_progress_with_cause ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 , chan- > hangupcause ) ;
# else
pri_progress ( p - > pri - > pri , p - > call , PVT_TO_CHANNEL ( p ) , 1 ) ;
# endif
@ -6570,8 +6654,6 @@ int sig_pri_indicate(struct sig_pri_chan *p, struct ast_channel *chan, int condi
ast_log ( LOG_WARNING , " Unable to grab PRI on span %d \n " , p - > pri - > span ) ;
}
}
p - > progress = 1 ;
res = sig_pri_play_tone ( p , SIG_PRI_TONE_CONGESTION ) ;
}
break ;
case AST_CONTROL_HOLD :
@ -6689,7 +6771,9 @@ int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast)
p - > aoc_s_request_invoke_id_valid = 0 ;
}
# endif /* defined(HAVE_PRI_AOC_EVENTS) */
p - > proceeding = 1 ;
if ( p - > call_level < SIG_PRI_CALL_LEVEL_CONNECT ) {
p - > call_level = SIG_PRI_CALL_LEVEL_CONNECT ;
}
sig_pri_set_dialing ( p , 0 ) ;
sig_pri_open_media ( p ) ;
res = pri_answer ( p - > pri - > pri , p - > call , 0 , ! p - > digital ) ;
@ -6818,22 +6902,37 @@ int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel)
* functions should handle it normally ( generate inband DTMF ) */
int sig_pri_digit_begin ( struct sig_pri_chan * pvt , struct ast_channel * ast , char digit )
{
if ( ( ast - > _state = = AST_STATE_DIALING ) & & ! pvt - > proceeding ) {
if ( pvt - > setup_ack ) {
if ( ast - > _state = = AST_STATE_DIALING ) {
if ( pvt - > call_level < SIG_PRI_CALL_LEVEL_OVERLAP ) {
unsigned int len ;
len = strlen ( pvt - > dialdest ) ;
if ( len < sizeof ( pvt - > dialdest ) - 1 ) {
ast_debug ( 1 , " Queueing digit '%c' since setup_ack not yet received \n " ,
digit ) ;
pvt - > dialdest [ len + + ] = digit ;
pvt - > dialdest [ len ] = ' \0 ' ;
} else {
ast_log ( LOG_WARNING ,
" Span %d: Deferred digit buffer overflow for digit '%c'. \n " ,
pvt - > pri - > span , digit ) ;
}
return 0 ;
}
if ( pvt - > call_level < SIG_PRI_CALL_LEVEL_PROCEEDING ) {
if ( ! pri_grab ( pvt , pvt - > pri ) ) {
pri_information ( pvt - > pri - > pri , pvt - > call , digit ) ;
pri_rel ( pvt - > pri ) ;
} else {
ast_log ( LOG_WARNING , " Unable to grab PRI on span %d \n " , pvt - > pri - > span ) ;
}
} else if ( strlen ( pvt - > dialdest ) < sizeof ( pvt - > dialdest ) - 1 ) {
int res ;
ast_debug ( 1 , " Queueing digit '%c' since setup_ack not yet received \n " , digit ) ;
res = strlen ( pvt - > dialdest ) ;
pvt - > dialdest [ res + + ] = digit ;
pvt - > dialdest [ res ] = ' \0 ' ;
return 0 ;
}
if ( pvt - > call_level < SIG_PRI_CALL_LEVEL_CONNECT ) {
ast_log ( LOG_WARNING ,
" Span %d: Digit '%c' may be ignored by peer. (Call level:%d) \n " ,
pvt - > pri - > span , digit , pvt - > call_level ) ;
}
return 0 ;
}
return 1 ;
}