freeswitch在通道中添加odbc_dsn

freeswitch原始通道,在mod_sofia中被创建


在mod_sofia模块下,sofia.c中找到sofia_glue_attach_private函数的调用,该函数在sofia_glue.c中定义,在该函数的最下面可以找到设置通道名称的代码:

if (channame) {
		sofia_glue_set_name(tech_pvt, channame);
	}

我在该处将sofia_profile中的odbc_dsn参数添加到channel变量中


if (channame) {
		sofia_glue_set_name(tech_pvt, channame);
		if(!zstr(profile->odbc_dsn)) switch_channel_set_variable(tech_pvt->channel,"odbc_dsn",profile->odbc_dsn);
	}


猜你喜欢

转载自blog.csdn.net/okhelp/article/details/73824831
DSN