Re: [SR-Users] New Kamailio module Obfuscate

2014-08-15 Thread Muhammad Shahzad
That's great. Again thank you so much for you help and cooperation. Thank you. On Fri, Aug 15, 2014 at 4:25 PM, Daniel-Constantin Mierla wrote: > OK, I've just pushed the patch to master branch -- thanks for this > contribution. > > Cheers, > Daniel > > > On 14/08/14 21:45, Muhammad Shahzad

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-15 Thread Daniel-Constantin Mierla
OK, I've just pushed the patch to master branch -- thanks for this contribution. Cheers, Daniel On 14/08/14 21:45, Muhammad Shahzad wrote: Fixed as discussed, webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-14 Thread Muhammad Shahzad
Fixed as discussed, webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch Thank you. On Fri, Aug 15, 2014 at 12:15 AM, Muhammad Shahzad wrote: > oops, spoke too soon. These are not declared static. > > Anyways, let me apply your suggestion. > > Thank you. > > > > > On Fri,

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-14 Thread Muhammad Shahzad
oops, spoke too soon. These are not declared static. Anyways, let me apply your suggestion. Thank you. On Fri, Aug 15, 2014 at 12:13 AM, Muhammad Shahzad wrote: > Sorry for late relay, we have had internet blockage due to mass protests > here. > > Anyways, i think the variables are declared

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-14 Thread Muhammad Shahzad
Sorry for late relay, we have had internet blockage due to mass protests here. Anyways, i think the variables are declared static, so there should be only one copy of them in memory. But anyways let me analyze it in gdb. Thank you. On Thu, Aug 14, 2014 at 12:21 PM, Daniel-Constantin Mierla <

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-14 Thread Daniel-Constantin Mierla
There are variable declared in corex_nio.h and this file is included in two .c files. That results in separate global variables in both .c files. You have to declare them in a .c file and in the .h with 'extern'. Cheers, Daniel On 13/08/14 15:05, Muhammad Shahzad wrote: OK, no problem. Thank

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-13 Thread Muhammad Shahzad
OK, no problem. Thank you. On Wed, Aug 13, 2014 at 2:52 PM, Daniel-Constantin Mierla wrote: > I will get back to it and push it if all ok -- got caught by some other > stuff meanwhile. > > Cheers, > Daniel > > > On 08/08/14 15:08, Muhammad Shahzad wrote: > > patched updated, as discussed.

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-13 Thread Daniel-Constantin Mierla
I will get back to it and push it if all ok -- got caught by some other stuff meanwhile. Cheers, Daniel On 08/08/14 15:08, Muhammad Shahzad wrote: patched updated, as discussed. http://webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch Thank you. -- Daniel-Constantin

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-08 Thread Muhammad Shahzad
humm, original function must have got lost while moving the code to corex. Anyways, lets just remove this. I send you new patch. Is there anything else need to be changed/removed etc.? Thank you. On Fri, Aug 8, 2014 at 4:31 PM, Daniel-Constantin Mierla wrote: > > Here is the new function you

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-08 Thread Muhammad Shahzad
patched updated, as discussed. http://webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch Thank you. On Fri, Aug 8, 2014 at 4:37 PM, Muhammad Shahzad wrote: > humm, original function must have got lost while moving the code to corex. > Anyways, lets just remove this. I s

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-08 Thread Muhammad Shahzad
patched updated, as discussed. http://webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch Thank you. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.or

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-08 Thread Daniel-Constantin Mierla
Here is the new function you added: +int pv_get_raw_msg(sip_msg_t *msg, pv_param_t *param, + pv_value_t *res) +{ +str sb; +if(msg==NULL || res==NULL) +return -1; +sb.s = msg->buf; +sb.len = msg->len; +return pv_get_strval(msg, param, res, &sb); +} And next is th

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-08 Thread Muhammad Shahzad
humm, it is suppose to contain the original message that was feed to event_route[network:msg], it would be same as $mb till this route changes the contents of it stores the new contents in $mb, then the $mb and $raw_msg would contain different contents (original vs modified), this may be useful in

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-07 Thread Daniel-Constantin Mierla
I see that the code introduces a new variable $raw_msg. It looks like being message buffer which is returned by $mb, thus redundant. Cheers, Daniel On 05/08/14 12:06, Muhammad Shahzad wrote: yup, i always download kamailio from official repo mentioned here, http://www.kamailio.org/wiki/instal

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-05 Thread Muhammad Shahzad
yup, i always download kamailio from official repo mentioned here, http://www.kamailio.org/wiki/install/devel/git Thank you. On Tue, Aug 5, 2014 at 3:03 PM, Daniel-Constantin Mierla wrote: > > On 05/08/14 11:55, Muhammad Shahzad wrote: > > OK, created the patch finally... > > > http://webr

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-05 Thread Daniel-Constantin Mierla
On 05/08/14 11:55, Muhammad Shahzad wrote: OK, created the patch finally... http://webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch I will look over it and push it to the repository if everything is ok. I had to add all file i wanted to include in the commit using "g

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-05 Thread Muhammad Shahzad
OK, created the patch finally... http://webrtc.voip-demos.com/0001-added-support-for-network-io-intercept.patch I had to add all file i wanted to include in the commit using "git add", even the ones that are already included in git repo, e.g. corex.xml and corex_mod.c. I will just let you know i

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-05 Thread Daniel-Constantin Mierla
You should use: git format-patch -1 The in your case appears to be f415b0c . If it is last commit, should work with: git format-patch -1 HEAD Cheers, Daniel On 05/08/14 11:25, Muhammad Shahzad wrote: These commands do not seem to work for me. Can you please do the patch? 1. adding files

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-05 Thread Muhammad Shahzad
These commands do not seem to work for me. Can you please do the patch? 1. adding files work, git add modules/corex/corex_nio.c modules/corex/corex_nio.h git status # On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # #new file: modules/corex/corex_nio.

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-05 Thread Daniel-Constantin Mierla
Can you do a commit on your local git clone and send the patch? It is easier to review the changes. Practically use: - git add -- to add new files - git commit -- to commit changes - git format-patch -- to get the commit in a file Cheers, Daniel On 05/08/14 01:14, Muhammad Shahzad wrote: Done

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-04 Thread Muhammad Shahzad
Done all changes as you suggested. 1. The code is embedded in corex module. Two new files added named, corex_nio.h and corex_nio.c. Some minor changes to corex_mod.c to call the methods defined in corex_nio.h. 2. Event route name changed to event_route[network:msg]. 3. function name changed from i

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-04 Thread Muhammad Shahzad
Thank you for your valuable suggestions, i appreciate it. I agree about module name, in fact a couple friends have already sent me email privately suggesting the same. May be something like "nio_intercept" would be better, since module only intercepts the network in/output and leaves it to script

Re: [SR-Users] New Kamailio module Obfuscate

2014-08-04 Thread Daniel-Constantin Mierla
Hello, I looked at the code and my conclusion was that the name is a bit confusing. While indeed you can do obfuscation using some embedded language or other meanings from the config file, the module itself doesn't do anything related. It executes an event route for network packet in/out. Su