[Serusers] Change SDP
Benito Caracuel
becasi at hotmail.com
Mon Nov 13 14:14:26 CET 2006
Hello All,
Basic Concept:
I have to change the Path MSRP into SDP field in an INVITE and relay the new INVITE.
SDP EXAMPLE:
v=0
o=686873200 3372497915 3372497916 IN IP4 80.27.211.205
s=SipSession
c=IN IP4 80.27.211.205
t=0 0
m=message 49152 TCP/MSRP *
a=direction:active
a=accept-types:text/plain
a=path:msrp://80.27.211.205:49152/63331682315468750;tcp
When I receive the SDP, I have to change "msrp://80.27.211.205:49152", so I execute an script and I obtain the new SDP into file.txt.
Now, I need to replace the old msrp path by the new sdp path, which is into file.txt
In my ser.cfg:
if (method=="INVITE")
{
exec_msg("printenv SRCIP > /tmp/invite.txt; cat >> /tmp/invite.txt; /bin/bash /usr/local/ser_snapshot/sbin/controlador");
#I have the new SDP in /tmp/test.txt
exec_msg("set `cat /tmp/test.txt`; %var = $1");
#I have the new SDP in $var
replace_all("msrp:\/\/[0-9\.:]{2,20}","%$var");
# I don't know why $var = null!!!! I need that $var = cat /tmp/test.txt but i don't know how to do this!!!!!
t_relay();
break;
};
Please help me,
Thank you very much.
Ben.
_________________________________________________________________
Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo y GRATUITAMENTE.
http://www.toolbar.live.com
More information about the sr-users
mailing list