2) you can do this with regex and substitution in the dialplan. There are some complex examples... just wrap () around the parts you want substitution and then use $1 $2 $3 in your actions. 3) not at the moment, it would probably be trivial to add, but don't think you need it for this. Mike
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Madhuri Patwardhan Sent: Tuesday, May 08, 2007 10:53 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] extracting sip subject
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@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@jerris.com> wrote:
You can use the sip_subject channel variable.
Mike
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Madhuri Patwardhan Sent: Friday, May 04, 2007 6:10 PM To: freeswitch-users@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@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.
Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
________________________________________________________________________
__
__________ 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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
________________________________________________________________________ __
__________
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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
=== 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
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users