[Freeswitch-users] Rewriting SDP with switch_r_sdp
Apostolos Pantsiopoulos
regs at kinetix.gr
Wed Nov 18 00:13:42 PST 2009
Thanx! That worked fine.
Anthony Minessale wrote:
> I should have said
>
> <action application="set">
> <![CDATA[switch_r_sdp=(sdp here)
> ]]>
> </action>
>
>
> On Tue, Nov 17, 2009 at 2:15 PM, Anthony Minessale
> <anthony.minessale at gmail.com <mailto:anthony.minessale at gmail.com>> wrote:
>
> you can do
>
> <action application="set">
> <![CDATA[(sdp here)
> ]]>
> </action>
>
>
> On Tue, Nov 17, 2009 at 1:44 PM, regs at kinetix.gr
> <mailto:regs at kinetix.gr> <regs at kinetix.gr <mailto:regs at kinetix.gr>>
> wrote:
>
> I am trying to achieve something similar to that :
> http://wiki.freeswitch.org/wiki/Codec_negotiation#Modifying_the_codec_when_using_proxy_media_mode
>
> but I am using xml_curl to create the dialplan (i.e. the web
> server that
> serves the dialplan makes the decision about the SDP). So I need
> a way
> to write
> the new SDP in the XML dialplan response. However, in the above
> example
> due to the regex manipulation the user is not facing the
> problem that I am
> with setting the switch_r_sdp to a complex value that contains =,
> spaces, new lines etc.
>
> Brian West wrote:
> > Why are you needing to rewrite it?
> >
> > /b
> >
> > On Nov 17, 2009, at 7:42 AM, Apostolos Pantsiopoulos wrote:
> >
> >
> >> I am trying to use switch_r_sdp to rewrite the SDP.
> >> The problem I am facing has to do with the way of doing it.
> >>
> >> Let's say I have:
> >>
> >> v=0
> >> o=- 1258463684 1258463684 IN IP4 xxx.xxx.xxx.xxx
> >> s=Opal SIP Session
> >> c=IN IP4 xxx.xxx.xxx.xxx
> >> t=0 0
> >> m=audio 5144 RTP/AVP 18 3 101 120
> >> c=IN IP4 xxx.xxx.xxx.xxx
> >> a=rtpmap:18 G729/8000/1
> >> a=fmtp:18 annexb=no
> >> a=rtpmap:3 gsm/8000/1
> >> a=rtpmap:101 telephone-event/8000
> >> a=fmtp:101 0-16,32,36
> >> a=rtpmap:120 NSE/8000
> >> a=fmtp:120 192-193
> >>
> >> who to I set the switch_r_sdp variable in xml?
> >>
> >> Obviously this doesn't work :
> >>
> >> <action application="set" data="switch_r_sdp=v=0
> >> o=- 1258463842 1258463842 IN IP4 xxx.xxx.xxx.xxx
> >> s=Opal SIP Session
> >> c=IN IP4 xxx.xxx.xxx.xxx
> >> t=0 0
> >> m=audio 5148 RTP/AVP 18 3 101 120
> >> c=IN IP4 xxx.xxx.xxx.xxx
> >> a=rtpmap:18 G729/8000/1
> >> a=fmtp:18 annexb=no
> >> a=rtpmap:3 gsm/8000/1
> >> a=rtpmap:101 telephone-event/8000
> >> a=fmtp:101 0-16,32,36
> >> a=rtpmap:120 NSE/8000
> >> a=fmtp:120 192-193
> >> "/>
> >>
> >> Do I have to escape any special characters and how?
> >> I tried using escaped quotes, escaped spaces, escaped tabs etc.
> >> Nothing worked.
> >>
> >> Any suggestions?
> >>
> >>
> >>
> >>
> >> --
> >> -------------------------------------------
> >> Apostolos Pantsiopoulos
> >> Kinetix Tele.com R & D
> >> email: regs at kinetix.gr <mailto:regs at kinetix.gr>
> >> -------------------------------------------
> >>
> >> _______________________________________________
> >> FreeSWITCH-users mailing list
> >> FreeSWITCH-users at lists.freeswitch.org
> <mailto: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
> <mailto: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
> <mailto: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
>
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com
> <mailto:MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> <mailto:PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> <mailto:sip%3A888 at conference.freeswitch.org>
> iax:guest at conference.freeswitch.org/888
> <http://iax:guest@conference.freeswitch.org/888>
> googletalk:conf+888 at conference.freeswitch.org
> <mailto:googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:213-799-1400
>
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com
> <mailto:MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> <mailto:PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> <mailto:sip%3A888 at conference.freeswitch.org>
> iax:guest at conference.freeswitch.org/888
> <http://iax:guest@conference.freeswitch.org/888>
> googletalk:conf+888 at conference.freeswitch.org
> <mailto:googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:213-799-1400
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
--
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R & D
email: regs at kinetix.gr
-------------------------------------------
More information about the FreeSWITCH-users
mailing list