Hey! Does anyone know how to do the following (if it can be done at all)?
In the ser.cfg, I would like to use a return value from a module's function as a prefix to a URI.
.... VALUE=function_a( ); <-- exported from a module prefix( "$VALUE" ); <-- URI prefix'ing of user routine ....
I do not want to use the exec module, (the admin module shows nice examples), as the processing expense is too high.
Thanks ahead of time.
Chris
On Jul 16, 2004 at 11:24, Chris Crawford crawford_c@pannaway.com wrote:
Hey! Does anyone know how to do the following (if it can be done at all)?
In the ser.cfg, I would like to use a return value from a module's function as a prefix to a URI.
.... VALUE=function_a( ); <-- exported from a module prefix( "$VALUE" ); <-- URI prefix'ing of user routine ....
I do not want to use the exec module, (the admin module shows nice examples), as the processing expense is too high.
This cannot be done right now.
Andrei
Hi All, I there a way to block certain numbers like 100,1800 etc in the INVITE Message can any one help me on this.
Regards, karun
Use a regex on the uri .... if ( uri =~ "^sip:100@" ) // matches dialed number "100" if ( uri =~ "^sip:1800[0-9]+@" ) // matches all numbers that start with 1800 (e.g. 18005551212)
I think you can do something like:
if ( method == "INVITE" ) { if ( uri =~ "^sip:100@" or uri =~ "^sip:1800[0-9]+@" ) { sl_send_reply( "404", "Not Found" ); break; }; };
On Fri, 16 Jul 2004 18:24:53 -0700 (PDT), karunb@omnitechnology.net karunb@omnitechnology.net wrote:
Hi All, I there a way to block certain numbers like 100,1800 etc in the INVITE Message can any one help me on this.
Regards, karun
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Jamie Yukes Software Engineer Global Connect Voice Broadcasting http://www.gc1.com/
Hi, Chris Crawford wrote:
Does anyone know how to do the following (if it can be done at all)?
In the ser.cfg, I would like to use a return value from a module’s function as a prefix to a URI.
….
VALUE=function_a( ); ß exported from a module
prefix( “$VALUE” ); ß URI prefix’ing of user routine
….
Unluckily you cant use Variables atm. What you can do is modify the r-uri directly from your c module function. I suggest you have a look at the textutil module and look there at the subst_uri function.
Subst uri manipulates the r-uri so most of the coding you need should be there, you only need to write your specific code for your prefix manipulation.
:: arnd ::