My Purpose: 1. At Opensips, iam getting registration request as sip:aaa_bbb...@domain. So, i need to parse this "username: aaa_bbb_ccc" and store it in MySQL DB as aaa,bbb,ccc against the coulmn a,b,c.
2. When user is registred, the URL has to be parsed and stored. During de-registration corresponding entries from the MYSQL table should be deleted. 3. In test.sh: iam parsing the username e.g "aaa_bbb_ccc" and rewriting it as "aaa","bbb","ccc" and storing it in MySQL DB. Now to integrate with OpenSIPS as a fisrt step during registration , iam using exec_msg to execute this test.sh. Is there any other solution, i can do it. ? On Tue, Jul 6, 2010 at 7:36 PM, Brett Nemeroff <[email protected]> wrote: > On Tue, Jul 6, 2010 at 8:31 AM, Premalatha Kuppan <[email protected] > > wrote: > >> Thanks. I have tried $rU, but is executing as null, >> >> executing [./etc/opensips/test.sh <null>] >> >> Is exec_msg is teh correct command to use to execute shell script ? >> >> > It's been a while since I've used it, but I think so. The point of the > _msg version of it is that it makes the whole SIP message available to the > shell script. > > exec_msg("test.sh $rU"); > > should work... > > You shouldn't really need to pass in $rU since I believe rU is available in > variables inside your script. > > Is there a reason you are doing what you are doing with exec instead of > other modules? I used to use it when I was learning SER back in the day, but > really, it's just a very expensive shortcut. > > Maybe we can help you use some of the other modules to achieve what you > need? > -Brett > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
