[Freeswitch-users] extracting sip subject

Madhuri Patwardhan madhuri_patwardhan at yahoo.com
Tue May 8 07:52:52 PDT 2007


Addition to my previous mail.

I have verified 1] i.e using following, I am able to
extract sip_subject.
<action application="set" data="var=${sip_subject}"/>

I have yet to figure out 2] and 3]. 

I suppose I could use regex for 2], if there is
inbuilt function in freeswitch to achieve this just
like asterisk, please let me know.

Thanks,
Madhuri


--- Madhuri Patwardhan <madhuri_patwardhan at yahoo.com>
wrote:

> Thanks for the reply.
> 
> 1] So, if I want to set a local variable 'var' with
> the sip_subject something like this should work?
> <action application="set" data="var=sip_subject"/>
> 
> 2] If my sip_subject contains 3 variables seperated
> by
> a delimiter ( delimiter we use is '%' ), is there a
> way to extract the 3 variables from the sip subject.
> Asterisk provides CUT function to achieve the same.
> I
> am looking for something similar to that.
> 
> For example:
> 
> if my sip_subject is "testname%2%file.mp3", I would
> want to extract var1=testname, var2=2, var3=file.mp3
> 
> Is there a equivalent function to achieve this?
> 
> 3] Is it possible to use system commands such as
> 'awk',  'egrep' with freeswitch?
> 
> Thanks,
> Madhuri
> 
> 
> --- Michael Jerris <mike at jerris.com> wrote:
> 
> > You can use the sip_subject channel variable.
> > 
> > Mike
> > 
> > > -----Original Message-----
> > > From:
> > freeswitch-users-bounces at lists.freeswitch.org
> > [mailto:freeswitch-
> > > users-bounces at lists.freeswitch.org] On Behalf Of
> > Madhuri Patwardhan
> > > Sent: Friday, May 04, 2007 6:10 PM
> > > To: freeswitch-users at lists.freeswitch.org
> > > Subject: Re: [Freeswitch-users] extracting sip
> > subject
> > > 
> > > Thanks for the prompt reply. Yes. Thats what I
> > found
> > > in the document. However, I didnot find how to
> > extract
> > > the header. Let me know.
> > > 
> > > Thanks,
> > > Madhuri
> > > 
> > > --- Brian West <brian.west at mac.com> wrote:
> > > 
> > > > Setting one is like this:
> > > >
> > > > <action application="set"
> > > > data="sip_h_Subject=Test"/>
> > > >
> > > > I'll check on the extraction of the header.
> > > >
> > > > /b
> > > >
> > > >
> > > > On May 4, 2007, at 11:44 AM, Madhuri
> Patwardhan
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I need to extract the sip subject from the
> > incomng
> > > > sip
> > > > > call and initialize a variable with this
> > value,
> > > > which
> > > > > then gets used further.
> > > > >
> > > > > I went through the documentation on
> Freeswitch
> > > > wiki
> > > > > and haven't found a way to extract sip
> subject
> > > > from
> > > > > the incoming sip call. Is there a way to do
> > this?
> > > > From
> > > > > the documentation I realized that I could
> use
> > > > > application set to initialize a variable
> with
> > this
> > > > > value.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Madhuri
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
______________________________________________________________________
> > > >
> > > > > ______________
> > > > > Now that's room service!  Choose from over
> > 150,000
> > > > hotels
> > > > > in 45,000 destinations on Yahoo! Travel to
> > find
> > > > your fit.
> > > > >
> > http://farechase.yahoo.com/promo-generic-14795097
> > > > >
> > > > >
> > _______________________________________________
> > > > > Freeswitch-users mailing list
> > > > > Freeswitch-users at lists.freeswitch.org
> > > > >
> > > >
> > >
> >
>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > > > >
> > > >
> > >
> >
>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
> > > >
> > > > > users
> > > > > http://www.freeswitch.org
> > > >
> > > > >
> > _______________________________________________
> > > > Freeswitch-users mailing list
> > > > Freeswitch-users at lists.freeswitch.org
> > > >
> > >
> >
>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > > >
> > >
> >
>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > > > http://www.freeswitch.org
> > > >
> > > 
> > > 
> > > 
> > > 
> > >
> >
>
________________________________________________________________________
> > __
> > > __________
> > > Expecting? Get great news right away with email
> > Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > >
> >
>
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> > > 
> > > _______________________________________________
> > > Freeswitch-users mailing list
> > > Freeswitch-users at lists.freeswitch.org
> > >
> >
>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > >
> >
>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > > http://www.freeswitch.org
> > 
> > _______________________________________________
> > Freeswitch-users mailing list
> > Freeswitch-users at lists.freeswitch.org
> >
>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >
>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> 8:00? 8:25? 8:40? Find a flick in no time 
> with the Yahoo! Search movie showtime shortcut.
> http://tools.search.yahoo.com/shortcuts/#news
> 
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 
=== message truncated ===



 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 




More information about the FreeSWITCH-users mailing list