--- chan_unicall.c.orig Mon Jun 4 23:37:31 2007 +++ chan_unicall.c Tue Jun 5 00:03:49 2007 @@ -13,13 +13,26 @@ * the GNU General Public License */ +#define AST_MODULE "Unicall" + +#include "asterisk.h" + +ASTERISK_FILE_VERSION(__FILE__, "$Revision$") + #include #include +#ifdef __NetBSD__ +#include +#include +#else #include +#endif #include #include #include +#if !defined(SOLARIS) && !defined(__FreeBSD__) #include +#endif #include #include #include @@ -31,10 +44,6 @@ #include #include -#include "asterisk.h" - -ASTERISK_FILE_VERSION(__FILE__, "$Revision$") - #include "asterisk/lock.h" #include "asterisk/channel.h" #include "asterisk/config.h" @@ -2485,7 +2494,7 @@ } while (x < 3); - if ( ( tmp = ast_channel_alloc(0, state, 0, 0, chan_name) ) == NULL) + if ( ( tmp = ast_channel_alloc(0, state, 0, 0, i->accountcode, i->exten, i->context, i->amaflags, chan_name) ) == NULL) { ast_log(LOG_WARNING, "Unable to allocate channel structure\n"); return NULL;