[sr-dev] git:ez/sdpops: modules/sdpops: added sdp_get_line_startswith(avpvar, string ) - fetch 'string' in SDP body and store line in an AVP.

Olle E. Johansson oej at edvina.net
Mon May 13 07:28:12 CEST 2013


11 maj 2013 kl. 20:27 skrev Konstantin Mosesov <ez at voipgroup.org.ua>:

> +		<section>
> +			<title>
> +				<function moreinfo="none">sdp_get_line_startswith(avpvar, string)</function>
> +			</title>
> +			<para>
> +				Store the search part of SDP body message with line beginning with 'string' in an AVP. 
> +				Return 1 if 'string' is found in SDP, -1 on error and -2 if there is no SDP part in the message body.
> +			</para>
> +			<para>
> +				This function can be used from ANY_ROUTE.
> +			</para>
> +			<example>
> +				<title><function>sdp_get_line_startswith</function> usage</title>
> +				<programlisting format="linespecific">
> +...
> +if(sdp_get_line_startswith("m=", "$avp(mline)")) {
> +    xlog("m-line: $avp(mline)\n");
> +}
> +...

Good function, but docs are somewhat confusing...

The example has the string as the first argument, but the function description has the string as the second. 

/O


More information about the sr-dev mailing list