[OpenSIPS-Users] URI PARSING
Premalatha Kuppan
premalatha at ngintech.com
Tue Jul 6 16:19:20 CEST 2010
My Purpose:
1. At Opensips, iam getting registration request as sip:aaa_bbb_cc at 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 <brett at nemeroff.com> wrote:
> On Tue, Jul 6, 2010 at 8:31 AM, Premalatha Kuppan <premalatha at ngintech.com
> > 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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100706/b3eb6f44/attachment.htm
More information about the Users
mailing list