diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index fc421c54af..9049ba753b 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -3183,6 +3183,11 @@ void import_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_ if (ch->other_ch) ch->other_ch->other_ch=ch; } } + + tmp=pbx_builtin_getvar_helper(chan,"MISDN_ADDRESS_COMPLETE"); + if (tmp && (atoi(tmp) == 1)) { + bc->sending_complete=1; + } } void export_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_list *ch) @@ -3192,6 +3197,11 @@ void export_ch(struct ast_channel *chan, struct misdn_bchannel *bc, struct chan_ chan_misdn_log(3,bc->port," --> EXPORT_PID: pid:%d\n",bc->pid); sprintf(tmp,"%d",bc->pid); pbx_builtin_setvar_helper(chan,"_MISDN_PID",tmp); + + if (bc->sending_complete) { + sprintf(tmp,"%d",bc->sending_complete); + pbx_builtin_setvar_helper(chan,"MISDN_ADDRESS_COMPLETE",tmp); + } } diff --git a/channels/misdn/isdn_msg_parser.c b/channels/misdn/isdn_msg_parser.c index 136c9a62dd..3d841d8939 100644 --- a/channels/misdn/isdn_msg_parser.c +++ b/channels/misdn/isdn_msg_parser.c @@ -323,6 +323,10 @@ msg_t *build_setup (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) enc_ie_bearer(&setup->BEARER, msg, coding, capability, mode, rate, -1, user, nt,bc); } + + if (bc->sending_complete) { + enc_ie_complete(&setup->BEARER,msg, bc->sending_complete, nt, bc); + } #if DEBUG printf("Building SETUP Msg\n"); diff --git a/doc/README.misdn b/doc/README.misdn index ab029e4d13..96368e7a2e 100644 --- a/doc/README.misdn +++ b/doc/README.misdn @@ -40,6 +40,7 @@ Overview - Configuration - Dial and Options String - misdn cli commands +- mISDN Variables - Debugging and sending Bugreports - Examples - Known working Configurations @@ -235,6 +236,14 @@ where 1 is the Port of the Card where the phone is plugged in, and 101 is the msn (callerid) of the Phone to send the text to. +mISDN Variables +--------------- + +mISDN Exports/Imports a few Variables: + +- MISDN_ADDRESS_COMPLETE : Is either set to 1 from the Provider, or you + can set it to 1 to force a sending complete. + Debugging and sending bug reports ---------------------------------