[Freeswitch-dev] mod_skypiax inching forward

seven du seven at idapted.com
Fri Jan 23 01:06:21 PST 2009


hi Giovanni,

I just made some improve on skypiax, so you can call skypiax/ANY/ 
another_skypename, it will automatically chose an available channel.  
not good, but it works.

put the following code directly before the following line:


         for (i = 0;  i < SKYPIAX_MAX_INTERFACES; i++) {

And change the above line to

         for (i = 0; !found && i < SKYPIAX_MAX_INTERFACES; i++) {

It should be like:



		if (strncmp("ANY", interface_name,  strlen(interface_name)) == 0) {	
	      //find an available one, allowing call like originate skypiax/ 
ANY/another_skypename

		  DEBUGA_SKYPE("Finding one available skype interface\n",  
SKYPIAX_P_LOG);

	       for (i = 0; !found && i < SKYPIAX_MAX_INTERFACES; i++) {
       	   		if (strlen(globals.SKYPIAX_INTERFACES[i].name)) {
				  int skype_state = 0;

				  tech_pvt = &globals.SKYPIAX_INTERFACES[i];
				  skype_state = tech_pvt->interface_state;
				  DEBUGA_SKYPE("skype interface: %d, name: %s, state: %d\n",  
SKYPIAX_P_LOG,
				 	i, globals.SKYPIAX_INTERFACES[i].name, skype_state);
				  if (SKYPIAX_STATE_DOWN == skype_state || 0 == skype_state) {
				     found=1;
				     break;
		          }
   		      	}
		   	}
		}


         for (i = 0; !found && i < SKYPIAX_MAX_INTERFACES; i++) {

Regards,
Seven




More information about the Freeswitch-dev mailing list