[Serusers] Question on Exec Module
Jiri Kuthan
jiri at iptel.org
Thu Jan 15 00:38:27 CET 2004
At 12:01 AM 1/15/2004, Andres wrote:
>On Wednesday 14 January 2004 17:02, Jiri Kuthan wrote:
>> see http://www.iptel.org/ser/doc/seruser/seruser.html#USINGEXEC
>>
>> SIP_HF_FROM="alice"
>> <sip:alice at iptel.org>;tag=76ff7a07-c091-4192-84a0-d56e91fe104f
>I don't see how I can use this variable for an SQL query.
use text processing utils such as awk, sed, whatever you like better.
That's not so difficult, is it?
>On the other hand
>the SIP_OUSER variable can be used like this:
>
> QUERY="select email_address from subscriber
> where user=\"$SIP_OUSER\"";
> EMAIL=`mysql -Bsuser -pheslo -e "$QUERY" ser`;
>
>I want the same type of query but for the originating user. Is there any way
>to take apart the SIP_HF_FROM and extract just the username?
you need to do it yourself. There is infitnitely many interesting elemenents
in a sip message and it makes little sense to break all of them in separate
variables.
-jiri
More information about the sr-users
mailing list