Re: [SR-Users] has_sdp()??
I use kamailio 3.3 and it does not exist. Instead I use: if(has_body(application/sdp)){ On 10/17/2012 9:38 AM, Juha Heinanen wrote: while reading rtpproxy module readme, i found this kind of example: if (is_method(INVITE)) { if (has_sdp()) { if (rtpproxy_offer()) t_on_reply(1); } else { t_on_reply(2); } } if (is_method(ACK) has_sdp()) rtpproxy_answer(); does has_sdp() function really exist? it is not listed on wiki page: http://www.kamailhttp://www.kamailio.org/wiki/alphaindexes/3.4.x/modfunctions#h -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Ron Hopson writes: I use kamailio 3.3 and it does not exist. Instead I use: if(has_body(application/sdp)){ ron, thanks for your reply although i don't understand how has_body(application/sdp) would work, because textops readme on has_body tells: If a parameter is given, the mime described will be also checked against the “Content-Type” header. the reason is that content-type can very well be, for example, multipart/mixed (or something like that) and still the body can contain sdp. in my opinion rtpproxy functions should tell via return value if sdp existed, i.e., if they did something, rather than requiring script writer to check it beforehand. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Ovidiu Sas writes: That could be relatively easy to implement because the sdp parser is able to handle SDP in a multipart/mixed body. ovidiu, do you mean a new textops function that tells if sdp application/sdp bodypart exists in the body or making rtpproxy functions user friendly? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Making the rtpproxy user friendly would be the right approach here. Then based on return code, the script admin should be able to handle all scenarios. -ovidiu On Wed, Oct 17, 2012 at 12:09 PM, Juha Heinanen j...@tutpro.com wrote: Ovidiu Sas writes: That could be relatively easy to implement because the sdp parser is able to handle SDP in a multipart/mixed body. ovidiu, do you mean a new textops function that tells if sdp application/sdp bodypart exists in the body or making rtpproxy functions user friendly? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
On the other hand, is_audio_on_hold(): http://kamailio.org/docs/modules/devel/modules_k/textops.html#id2523065 could be re-worked/re-named to provide media status. -ovidiu On Wed, Oct 17, 2012 at 12:16 PM, Ovidiu Sas o...@voipembedded.com wrote: Making the rtpproxy user friendly would be the right approach here. Then based on return code, the script admin should be able to handle all scenarios. -ovidiu On Wed, Oct 17, 2012 at 12:09 PM, Juha Heinanen j...@tutpro.com wrote: Ovidiu Sas writes: That could be relatively easy to implement because the sdp parser is able to handle SDP in a multipart/mixed body. ovidiu, do you mean a new textops function that tells if sdp application/sdp bodypart exists in the body or making rtpproxy functions user friendly? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Ovidiu Sas writes: On the other hand, is_audio_on_hold(): http://kamailio.org/docs/modules/devel/modules_k/textops.html#id2523065 could be re-worked/re-named to provide media status. i looked at the code and it has this: if (0 == parse_sdp(msg)) { ... } return -1; the problem is that parse_sdp returns -1 if there is no sdp, but also when there is some error. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Then parse_sdp needs to be updated to return explicit error codes :( -ovidiu On Wed, Oct 17, 2012 at 12:35 PM, Juha Heinanen j...@tutpro.com wrote: Ovidiu Sas writes: On the other hand, is_audio_on_hold(): http://kamailio.org/docs/modules/devel/modules_k/textops.html#id2523065 could be re-worked/re-named to provide media status. i looked at the code and it has this: if (0 == parse_sdp(msg)) { ... } return -1; the problem is that parse_sdp returns -1 if there is no sdp, but also when there is some error. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Ovidiu Sas writes: Making the rtpproxy user friendly would be the right approach here. Then based on return code, the script admin should be able to handle all scenarios. i thought that using rtpproxy is the mainstream thing. now it appears that it cannot be used with currently existing script functions (if we leave raw regex matching out) without getting Unable to parse sdp errors to syslog. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
I guess not many rtpproxy deployments are handling SIP traffic with multipart/mixed body content and therefor has_body(application/sdp) works just fine. In the case that multipart/mixed body is present, blindly invoking rtpproxy_offer for INVITE will work ok if SDP is present (and that's the most used pattern: SDP in INVITE/200ok as opposed to 200ok/AC. So ... yes, not all cases are covered, but it seems that most common scenarios are covered. -ovidiu On Wed, Oct 17, 2012 at 12:57 PM, Juha Heinanen j...@tutpro.com wrote: Ovidiu Sas writes: Making the rtpproxy user friendly would be the right approach here. Then based on return code, the script admin should be able to handle all scenarios. i thought that using rtpproxy is the mainstream thing. now it appears that it cannot be used with currently existing script functions (if we leave raw regex matching out) without getting Unable to parse sdp errors to syslog. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
Daniel-Constantin Mierla writes: rtpproxy_manage() is supposed to work nicely when called for requests/replies with no sdp, just not to care if is INVITE or ACK with no sdp, or such similar situations. does using rtpproxy_manage() avoid the cancel problem klaus described? -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp()??
On 10/17/12 8:30 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: rtpproxy_manage() is supposed to work nicely when called for requests/replies with no sdp, just not to care if is INVITE or ACK with no sdp, or such similar situations. does using rtpproxy_manage() avoid the cancel problem klaus described? rtpproxy_manage() is a wrapper around rtpproxy_offer(), rtpproxy_answer() and unforce_rtp_proxy(), trying to hide all logic that otherwise would have to be in config to handle all possible situations, like invite with no sdp, but 200ok and ack with sdp. It takes same kind of flags as for rtpproxy_offer(). Looking at the code, I see that flags 1 or 2 are not propagated to unforce_rtp_rproxy() (which used to have no flags before) -- probably omitted by the committer of these flags. Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp() missing
Hello, On 11/30/10 9:09 AM, Jeremya wrote: Hi, I've been following some examples using has_sdp() function but it is not supplied by 3.0.x TEXTOPS I've seen some discussion on mailing lists about has_sdp() being included since 1.5. But checking the online documentation is doesn't exist in any version. I use has_body(application/sdp) as an alternative but perhaps the has_sdp() function could be included, or references and examples using it altered or removed? I haven't found has_sdp() in any module, but you can use has_body(content-type) function for this purpose: if(has_body(application/sdp)) ... See: http://kamailio.org/docs/modules/stable/modules_k/textops.html#id2925178 Cheers, Daniel -- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Training Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] has_sdp() missing
On 11/30/10 11:58 AM, Alex Balashov wrote: We too have noticed this, and always assumed has_sdp() was a pseudocode example, which doesn't translate into an actually-existing function. that the documentation simply failed to indicate as being that. As long as nobody actually pointed it, there was no action. Now that we know, maybe some devs with git access will take care of ;-) Thanks, Daniel -- Alex Balashov - Principal Evariste Systems LLC 1170 Peachtree Street 12th Floor, Suite 1200 Atlanta, GA 30309 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/ On Nov 30, 2010, at 3:09 AM, Jeremya jer...@electrosilk.net wrote: Hi, I've been following some examples using has_sdp() function but it is not supplied by 3.0.x TEXTOPS I've seen some discussion on mailing lists about has_sdp() being included since 1.5. But checking the online documentation is doesn't exist in any version. I use has_body(application/sdp) as an alternative but perhaps the has_sdp() function could be included, or references and examples using it altered or removed? Thanks Jeremy ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Training Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users