you can do it only using some regexp over the body (see the textops
module, the search_body() function) :
http://www.opensips.org/html/docs/modules/1.8.x/textops.html#id249149
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 12/13/2012 05:00 PM, Dragomir Haralambiev wrote:
How to test "a=" in SDP?
On Dec 13, 2012 4:54 PM, "Bogdan-Andrei Iancu" <[email protected]
<mailto:[email protected]>> wrote:
Hi,
That test is checking the "c=" only in SDP.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 12/13/2012 04:13 PM, Dragomir Haralambiev wrote:
Hi Bogdan,
Here is part ot script for test.
The nat_uac_test("8") must to check SDP for RFC1918 addresses.
The follow line contens RFC1918 address:
a=rtcp:4001 IN IP4 *10.58.21.91*
if ( nat_uac_test("1") ) { setflag(6); }
if ( nat_uac_test("2") ) { setflag(6); }
if ( nat_uac_test("4") ) { setflag(6); }
if (has_body("")) {
if ( nat_uac_test("8") ) { setflag(6); }
}
if ( nat_uac_test("16") ) { setflag(6); }
if ( nat_uac_test("32") ) { setflag(6); }
if (isflagset(6)) {
xlog("L_ERR", "NAT.");
................
}
2012/12/13 Bogdan-Andrei Iancu <[email protected]
<mailto:[email protected]>>
Hi,
What flags you pass to the nat_uac_test() ?
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 12/13/2012 01:24 PM, Dragomir Haralambiev wrote:
Hello,
I try to use nat_uac_test() .
When receive follow INVITE from NAT the test not detected it.
Opensips v 1.8.2 revision 9513.
Where is problem?
INVITE sip:[email protected]
<mailto:sip%[email protected]> SIP/2.0
Via: SIP/2.0/UDP
212.5.131.212:39341;rport;branch=z9hG4bKPjFmHm4jnyGald.hObqHkEIS7i4y4.0dR3
Max-Forwards: 70
From: <sip:[email protected]
<mailto:sip%[email protected]>>;tag=Sfzzdvhpt.7UiJXb9b5mGkw5QWhgtjNp
To: <sip:[email protected] <mailto:sip%[email protected]>>
Contact: <sip:[email protected]:39341;ob>
Call-ID: z3ssVT-EYYzXYLauvoVlFzbyyB0MyHKy
CSeq: 18523 INVITE
Route: <sip:88.88.0.14;transport=udp;lr>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE,
NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: CSipSimple_m0-16/r2044
Content-Type: application/sdp
Content-Length: 359
v=0
o=- 3564378184 3564378184 IN IP4 212.5.131.212
s=pjmedia
c=IN IP4 212.5.131.212
t=0 0
m=audio 4000 RTP/AVP 18 3 0 8 101
c=IN IP4 212.5.131.212
a=rtcp:4001 IN IP4 10.58.21.91
a=sendrecv
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users