[Kamailio-Devel] tm/ut.h lacks sctp proto

Klaus Darilion klaus.mailinglists at pernau.at
Thu Oct 23 18:54:01 CEST 2008


Looks like nobody ever tried SCTP with K.

klaus

Juha Heinanen schrieb:
> Klaus Darilion writes:
> 
>  > Have you tried SCTP?
> 
> klaus,
> 
> it is not there, see below.  to syslog i'm getting:
> 
> Oct 23 19:20:39 localhost /usr/sbin/kamailio[8022]: INFO: Routing initial INVITE to <sip:+35892345671 at 195.165.0.5;transport=sctp> and <<null>> 
> Oct 23 19:20:39 localhost /usr/sbin/kamailio[8022]: ERROR:tm:get_proto: unsupported transport: 4 
> 
> -- juha
> 
> tm/ut.h
> -------
> 
> /*!
>  * \brief Protocol choosing helper function.
>  *
>  * Choose a protocol depeding on the value of the input variables
>  * The forced_proto takes precedence if != PROTO_NONE
>  * \param force_proto forced protocol
>  * \param proto protocol
>  * \return choosen protocol
>  */
> inline static enum sip_protos get_proto(enum sip_protos force_proto,
> 										enum sip_protos proto)
> {
> 	/* calculate transport protocol */
> 	switch(force_proto) {
> 		case PROTO_NONE: /* no protocol has been forced -- look at proto */
> 			switch(proto) {
> 				case PROTO_NONE:
> 					return PROTO_NONE;
> 				case PROTO_UDP:/* transport specified explicitly */
> #ifdef USE_TCP
> 				case PROTO_TCP:
> #endif
> #ifdef USE_TLS
> 				case PROTO_TLS:
> #endif
> 					return proto;
> 				default:
> 					LM_ERR("unsupported transport: %d\n", proto );
> 					return PROTO_NONE;
> 			}
> 		case PROTO_UDP: /* some protocol has been forced -- take it */
> #ifdef USE_TCP
> 		case PROTO_TCP:
> #endif
> #ifdef USE_TLS
> 		case PROTO_TLS:
> #endif
> 			return force_proto;
> 		default:
> 			LM_ERR("unsupported forced protocol: %d\n", force_proto);
> 			return PROTO_NONE;
> 	}
> }



More information about the Devel mailing list