Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in module of Kamailio for example in module extended from *topoh*?
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information.
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in module of Kamailio for example in module extended from topoh?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The SIP protocol doesn't handle media, it facilitates setup and management of a media session. Adding a module for handling media in Kamailio doesn't really make any sense.
We do have modules that talk to external media servers. Look into those - like rtpproxy. The Kamailio module itself does not handle media, but communicates with the other server that in fact manages media relaying.
Before you modify software, you need to understand the architecture :-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Thanks for your quick reply. So, Kamailio does nothing with RTP/RTCP packets? I think I understand (now when I think about it) - Kamailio only handles SIP messages by which in nested SDP two endpoints negotiate the stream where media will go through? So RTP/RTCP media stream flow directly between two UA endpoints and Kamailio has nothing to do with handling of these packets. Could you, please confirm my thoughts?
All right but what if for example we have special UA that sends to Kamailio specially modified packet (non standard SIP). In my extension of topoh module I have sanity_checks disabled so will Kamailio check this packet before my module and drops it or I can receive, modify and forward this packet? I mean modify this packet to standard SIP packet and forward it to another UA. I am just asking theoretically because in the moment I cant try this.
On Wed, Mar 26, 2014 at 7:41 AM, Olle E. Johansson oej@edvina.net wrote:
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in module of Kamailio for example in module extended from *topoh*?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The SIP protocol doesn't handle media, it facilitates setup and management of a media session. Adding a module for handling media in Kamailio doesn't really make any sense.
We do have modules that talk to external media servers. Look into those - like rtpproxy. The Kamailio module itself does not handle media, but communicates with the other server that in fact manages media relaying.
Before you modify software, you need to understand the architecture :-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
That's exactly right. Media flows around Kamailio, negotiated directly by the endpoints in their SDP, to which Kamailio is entirely agnostic.
On 26 March 2014 03:44:46 GMT-04:00, Cock Ootec cockootec@gmail.com wrote:
Thanks for your quick reply. So, Kamailio does nothing with RTP/RTCP packets? I think I understand (now when I think about it) - Kamailio only handles SIP messages by which in nested SDP two endpoints negotiate the stream where media will go through? So RTP/RTCP media stream flow directly between two UA endpoints and Kamailio has nothing to do with handling of these packets. Could you, please confirm my thoughts?
All right but what if for example we have special UA that sends to Kamailio specially modified packet (non standard SIP). In my extension of topoh module I have sanity_checks disabled so will Kamailio check this packet before my module and drops it or I can receive, modify and forward this packet? I mean modify this packet to standard SIP packet and forward it to another UA. I am just asking theoretically because in the moment I cant try this.
On Wed, Mar 26, 2014 at 7:41 AM, Olle E. Johansson oej@edvina.net wrote:
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in
module
of Kamailio for example in module extended from *topoh*?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The
SIP
protocol doesn't handle media, it facilitates setup and management of
a
media session. Adding a module for handling media in Kamailio doesn't really make any sense.
We do have modules that talk to external media servers. Look into
those -
like rtpproxy. The Kamailio module itself does not handle media, but communicates with the other server that in fact manages media
relaying.
Before you modify software, you need to understand the architecture
:-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT
but
I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Sent from my Nexus 10, with all the figments of autocorrect that might imply.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
On 26 Mar 2014, at 08:44, Cock Ootec cockootec@gmail.com wrote:
Thanks for your quick reply. So, Kamailio does nothing with RTP/RTCP packets? I think I understand (now when I think about it) - Kamailio only handles SIP messages by which in nested SDP two endpoints negotiate the stream where media will go through?
Yes, that is how the SIP protocol works. Please update yourself on the protocol which Kamailio is built around.
So RTP/RTCP media stream flow directly between two UA endpoints and Kamailio has nothing to do with handling of these packets. Could you, please confirm my thoughts?
Yes.
All right but what if for example we have special UA that sends to Kamailio specially modified packet (non standard SIP). In my extension of topoh module I have sanity_checks disabled so will Kamailio check this packet before my module and drops it or I can receive, modify and forward this packet? I mean modify this packet to standard SIP packet and forward it to another UA. I am just asking theoretically because in the moment I cant try this.
You can modify as much as you want.
/O
On Wed, Mar 26, 2014 at 7:41 AM, Olle E. Johansson oej@edvina.net wrote:
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in module of Kamailio for example in module extended from topoh?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The SIP protocol doesn't handle media, it facilitates setup and management of a media session. Adding a module for handling media in Kamailio doesn't really make any sense.
We do have modules that talk to external media servers. Look into those - like rtpproxy. The Kamailio module itself does not handle media, but communicates with the other server that in fact manages media relaying.
Before you modify software, you need to understand the architecture :-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Ok so if I explicitly route all my VoIP traffic (SIP, RTP, RTCP) to Kamailio I can distinguish the streams (parse packets, edit packets) and for example forward these streams to different ports? Thats perfect. Thanks for all your responses they helped much.
On Wed, Mar 26, 2014 at 8:56 AM, Olle E. Johansson oej@edvina.net wrote:
On 26 Mar 2014, at 08:44, Cock Ootec cockootec@gmail.com wrote:
Thanks for your quick reply. So, Kamailio does nothing with RTP/RTCP packets? I think I understand (now when I think about it) - Kamailio only handles SIP messages by which in nested SDP two endpoints negotiate the stream where media will go through?
Yes, that is how the SIP protocol works. Please update yourself on the protocol which Kamailio is built around.
So RTP/RTCP media stream flow directly between two UA endpoints and Kamailio has nothing to do with handling of these packets. Could you, please confirm my thoughts?
Yes.
All right but what if for example we have special UA that sends to Kamailio specially modified packet (non standard SIP). In my extension of topoh module I have sanity_checks disabled so will Kamailio check this packet before my module and drops it or I can receive, modify and forward this packet? I mean modify this packet to standard SIP packet and forward it to another UA. I am just asking theoretically because in the moment I cant try this.
You can modify as much as you want.
/O
On Wed, Mar 26, 2014 at 7:41 AM, Olle E. Johansson oej@edvina.net wrote:
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in module of Kamailio for example in module extended from *topoh*?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The SIP protocol doesn't handle media, it facilitates setup and management of a media session. Adding a module for handling media in Kamailio doesn't really make any sense.
We do have modules that talk to external media servers. Look into those - like rtpproxy. The Kamailio module itself does not handle media, but communicates with the other server that in fact manages media relaying.
Before you modify software, you need to understand the architecture :-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
No. You can't route the RTP and RTCP traffic to Kamailio, by definition.
You keep asking questions that betray a lack of basic understanding of SIP network elements. I think you should take Olle's suggestion and learn how it works.
On 26 March 2014 04:21:08 GMT-04:00, Cock Ootec cockootec@gmail.com wrote:
Ok so if I explicitly route all my VoIP traffic (SIP, RTP, RTCP) to Kamailio I can distinguish the streams (parse packets, edit packets) and for example forward these streams to different ports? Thats perfect. Thanks for all your responses they helped much.
On Wed, Mar 26, 2014 at 8:56 AM, Olle E. Johansson oej@edvina.net wrote:
On 26 Mar 2014, at 08:44, Cock Ootec cockootec@gmail.com wrote:
Thanks for your quick reply. So, Kamailio does nothing with RTP/RTCP packets? I think I understand (now when I think about it) - Kamailio
only
handles SIP messages by which in nested SDP two endpoints negotiate
the
stream where media will go through?
Yes, that is how the SIP protocol works. Please update yourself on
the
protocol which Kamailio is built around.
So RTP/RTCP media stream flow directly between two UA endpoints and Kamailio has nothing to do with handling of these packets. Could you, please confirm my thoughts?
Yes.
All right but what if for example we have special UA that sends to Kamailio specially modified packet (non standard SIP). In my
extension of
topoh module I have sanity_checks disabled so will Kamailio check
this
packet before my module and drops it or I can receive, modify and
forward
this packet? I mean modify this packet to standard SIP packet and
forward
it to another UA. I am just asking theoretically because in the
moment I
cant try this.
You can modify as much as you want.
/O
On Wed, Mar 26, 2014 at 7:41 AM, Olle E. Johansson oej@edvina.net
wrote:
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in
module
of Kamailio for example in module extended from *topoh*?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The
SIP
protocol doesn't handle media, it facilitates setup and management
of a
media session. Adding a module for handling media in Kamailio
doesn't
really make any sense.
We do have modules that talk to external media servers. Look into
those -
like rtpproxy. The Kamailio module itself does not handle media, but communicates with the other server that in fact manages media
relaying.
Before you modify software, you need to understand the architecture
:-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT
but
I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
Hi guys, sorry for bothering you with silly questions. I am working on school project and I'd like to process the RTP in Kamailio directly. I have manage to use subst_body() and fix_nated_sdp() to force RTP to be sent to my Kamailio (ip and port of my Kamailio server). I have recompiled Kamailio module topoh to print incomming and outgoing messages but I don't see any RTP messages. I also set sanity_checks to 0 so I can see raw data but no success there.
Can you please point me what module is processing the message first. I hoped that it would be topoh module but clearly I was wrong. I would like to get to this packet as soon as it arieves to Kamailio so I can work with it.
Is this even possible or the core of the Kamailio rejects the message before it is sent to any module? Is there any way to register to the first callback of the core so i can get unfiltered network traffic?
Thanks in advance
On Wed, Mar 26, 2014 at 3:18 PM, Alex Balashov abalashov@evaristesys.comwrote:
No. You can't route the RTP and RTCP traffic to Kamailio, by definition.
You keep asking questions that betray a lack of basic understanding of SIP network elements. I think you should take Olle's suggestion and learn how it works.
On 26 March 2014 04:21:08 GMT-04:00, Cock Ootec cockootec@gmail.com wrote:
Ok so if I explicitly route all my VoIP traffic (SIP, RTP, RTCP) to Kamailio I can distinguish the streams (parse packets, edit packets) and for example forward these streams to different ports? Thats perfect. Thanks for all your responses they helped much.
On Wed, Mar 26, 2014 at 8:56 AM, Olle E. Johansson oej@edvina.netwrote:
On 26 Mar 2014, at 08:44, Cock Ootec cockootec@gmail.com wrote:
Thanks for your quick reply. So, Kamailio does nothing with RTP/RTCP packets? I think I understand (now when I think about it) - Kamailio only handles SIP messages by which in nested SDP two endpoints negotiate the stream where media will go through?
Yes, that is how the SIP protocol works. Please update yourself on the protocol which Kamailio is built around.
So RTP/RTCP media stream flow directly between two UA endpoints and Kamailio has nothing to do with handling of these packets. Could you, please confirm my thoughts?
Yes.
All right but what if for example we have special UA that sends to Kamailio specially modified packet (non standard SIP). In my extension of topoh module I have sanity_checks disabled so will Kamailio check this packet before my module and drops it or I can receive, modify and forward this packet? I mean modify this packet to standard SIP packet and forward it to another UA. I am just asking theoretically because in the moment I cant try this.
You can modify as much as you want.
/O
On Wed, Mar 26, 2014 at 7:41 AM, Olle E. Johansson oej@edvina.netwrote:
On 26 Mar 2014, at 01:06, Cock Ootec cockootec@gmail.com wrote:
Hi, I'd like to develop module for Kamailio which will be working with RTP/RTCP packets. Is there any way to capture and edit RTP packet in module of Kamailio for example in module extended from *topoh*?
Kamailio in itself is a SIP server, often acting as a SIP proxy. The SIP protocol doesn't handle media, it facilitates setup and management of a media session. Adding a module for handling media in Kamailio doesn't really make any sense.
We do have modules that talk to external media servers. Look into those
- like rtpproxy. The Kamailio module itself does not handle media, but
communicates with the other server that in fact manages media relaying.
Before you modify software, you need to understand the architecture :-)
/O
In topoh there are two events SREV_NET_DATA_IN and SREV_NET_DATA_OUT but I didn't be able to capture any RTP packets by them.
Thanks in advance for any help or useful information. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hi,
On 03/26/2014 03:18 PM, Alex Balashov wrote:
No. You can't route the RTP and RTCP traffic to Kamailio, by definition.
You keep asking questions that betray a lack of basic understanding of SIP network elements. I think you should take Olle's suggestion and learn how it works.
For the sake of discussion, I think it's somewhat possible to route rtp/rtcp with kamailio. Does it make sense? No. Would it work? Probably, in a limited way.
So if I wanted to do something like this, then I'd find the point where kamailio is actually calling recv(), then find out where it feeds the received data into the sip parser. There, I'd implement the logic to quickly check if what we're dealing with is an rtp packet, and handle it differently than other packets. For SDP in request and response bodies flowing through my config, I'd modify SDP to put 5060 as media port for the various streams.
Now since every packet will be received on port 5060, you can't really distinguish between different streams, as you can't rely on the source address advertised in SDP because of NAT, so any NAT scenario with more than one phone behind that NAT is going to break the whole thing. Well, putting aside NAT, you now would have to maintain mapping tables of source addresses announced in SDP and check (and rely on) them for inbound packets and map them to the outbound leg based on the source address. That might work for non-NAT scenarios (but who's using NAT in a world of IPv6 anyways?).
Now the question is, why would anyone want to do that? If the intention is to make it work better in NAT environments, then our OP has probably not thought it through entirely.
Andreas
On 07 Apr 2014, at 15:39, Andreas Granig agranig@sipwise.com wrote:
Hi,
On 03/26/2014 03:18 PM, Alex Balashov wrote:
No. You can't route the RTP and RTCP traffic to Kamailio, by definition.
You keep asking questions that betray a lack of basic understanding of SIP network elements. I think you should take Olle's suggestion and learn how it works.
For the sake of discussion, I think it's somewhat possible to route rtp/rtcp with kamailio. Does it make sense? No. Would it work? Probably, in a limited way.
Of course, if you are a developer, you can do anything. :-)
But the question wasn't asked in the developer context, at least I did not parse it that way...
/O
So if I wanted to do something like this, then I'd find the point where kamailio is actually calling recv(), then find out where it feeds the received data into the sip parser. There, I'd implement the logic to quickly check if what we're dealing with is an rtp packet, and handle it differently than other packets. For SDP in request and response bodies flowing through my config, I'd modify SDP to put 5060 as media port for the various streams.
Now since every packet will be received on port 5060, you can't really distinguish between different streams, as you can't rely on the source address advertised in SDP because of NAT, so any NAT scenario with more than one phone behind that NAT is going to break the whole thing. Well, putting aside NAT, you now would have to maintain mapping tables of source addresses announced in SDP and check (and rely on) them for inbound packets and map them to the outbound leg based on the source address. That might work for non-NAT scenarios (but who's using NAT in a world of IPv6 anyways?).
Now the question is, why would anyone want to do that? If the intention is to make it work better in NAT environments, then our OP has probably not thought it through entirely.
Andreas
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
I am sorry for inconvenience. Yes I asked these questions in developer context. Now I am able to work with RTP packets in my module (I know that this seems to be useless but it is for my school project ;-) ) so if anyone asks it is possible.
Thanks for your help
On Mon, Apr 7, 2014 at 3:41 PM, Olle E. Johansson oej@edvina.net wrote:
On 07 Apr 2014, at 15:39, Andreas Granig agranig@sipwise.com wrote:
Hi,
On 03/26/2014 03:18 PM, Alex Balashov wrote:
No. You can't route the RTP and RTCP traffic to Kamailio, by definition.
You keep asking questions that betray a lack of basic understanding of
SIP network elements. I think you should take Olle's suggestion and learn how it works.
For the sake of discussion, I think it's somewhat possible to route rtp/rtcp with kamailio. Does it make sense? No. Would it work? Probably, in a limited way.
Of course, if you are a developer, you can do anything. :-)
But the question wasn't asked in the developer context, at least I did not parse it that way...
/O
So if I wanted to do something like this, then I'd find the point where kamailio is actually calling recv(), then find out where it feeds the received data into the sip parser. There, I'd implement the logic to quickly check if what we're dealing with is an rtp packet, and handle it differently than other packets. For SDP in request and response bodies flowing through my config, I'd modify SDP to put 5060 as media port for the various streams.
Now since every packet will be received on port 5060, you can't really distinguish between different streams, as you can't rely on the source address advertised in SDP because of NAT, so any NAT scenario with more than one phone behind that NAT is going to break the whole thing. Well, putting aside NAT, you now would have to maintain mapping tables of source addresses announced in SDP and check (and rely on) them for inbound packets and map them to the outbound leg based on the source address. That might work for non-NAT scenarios (but who's using NAT in a world of IPv6 anyways?).
Now the question is, why would anyone want to do that? If the intention is to make it work better in NAT environments, then our OP has probably not thought it through entirely.
Andreas
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 14/04/14 10:29, Cock Ootec wrote:
I am sorry for inconvenience. Yes I asked these questions in developer context. Now I am able to work with RTP packets in my module (I know that this seems to be useless
It is not useless if needed. Maybe you can share more details and we can give hints on what could be reused for easier development. Also, you may be surprised to find other people having same interest and in case it is something wanted by more and you want to release your code open source, then we can include the module in official kamailio git repository.
Cheers, Daniel
but it is for my school project ;-) ) so if anyone asks it is possible.
Thanks for your help
On Mon, Apr 7, 2014 at 3:41 PM, Olle E. Johansson <oej@edvina.net mailto:oej@edvina.net> wrote:
On 07 Apr 2014, at 15:39, Andreas Granig <agranig@sipwise.com <mailto:agranig@sipwise.com>> wrote: > Hi, > > On 03/26/2014 03:18 PM, Alex Balashov wrote: >> No. You can't route the RTP and RTCP traffic to Kamailio, by definition. >> >> You keep asking questions that betray a lack of basic understanding of SIP network elements. I think you should take Olle's suggestion and learn how it works. > > For the sake of discussion, I think it's somewhat possible to route > rtp/rtcp with kamailio. Does it make sense? No. Would it work? Probably, > in a limited way. Of course, if you are a developer, you can do anything. :-) But the question wasn't asked in the developer context, at least I did not parse it that way... /O > > So if I wanted to do something like this, then I'd find the point where > kamailio is actually calling recv(), then find out where it feeds the > received data into the sip parser. There, I'd implement the logic to > quickly check if what we're dealing with is an rtp packet, and handle it > differently than other packets. For SDP in request and response bodies > flowing through my config, I'd modify SDP to put 5060 as media port for > the various streams. > > Now since every packet will be received on port 5060, you can't really > distinguish between different streams, as you can't rely on the source > address advertised in SDP because of NAT, so any NAT scenario with more > than one phone behind that NAT is going to break the whole thing. Well, > putting aside NAT, you now would have to maintain mapping tables of > source addresses announced in SDP and check (and rely on) them for > inbound packets and map them to the outbound leg based on the source > address. That might work for non-NAT scenarios (but who's using NAT in a > world of IPv6 anyways?). > > Now the question is, why would anyone want to do that? If the intention > is to make it work better in NAT environments, then our OP has probably > not thought it through entirely. > > Andreas > > _______________________________________________ > sr-dev mailing list > sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
I must find out how it is with licence of school project but of course if it wouldn't be problem I can share git repo. Just today I asked in another thread here on [sr-dev] if there is way to use internal udp socket to send packets to VoIP client in my module.
On Wed, Apr 16, 2014 at 8:57 AM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
On 14/04/14 10:29, Cock Ootec wrote:
I am sorry for inconvenience. Yes I asked these questions in developer context. Now I am able to work with RTP packets in my module (I know that this seems to be useless
It is not useless if needed. Maybe you can share more details and we can give hints on what could be reused for easier development. Also, you may be surprised to find other people having same interest and in case it is something wanted by more and you want to release your code open source, then we can include the module in official kamailio git repository.
Cheers, Daniel
but it is for my school project ;-) ) so if anyone asks it is possible.
Thanks for your help
On Mon, Apr 7, 2014 at 3:41 PM, Olle E. Johansson oej@edvina.net wrote:
On 07 Apr 2014, at 15:39, Andreas Granig agranig@sipwise.com wrote:
Hi,
On 03/26/2014 03:18 PM, Alex Balashov wrote:
No. You can't route the RTP and RTCP traffic to Kamailio, by
definition.
You keep asking questions that betray a lack of basic understanding of
SIP network elements. I think you should take Olle's suggestion and learn how it works.
For the sake of discussion, I think it's somewhat possible to route rtp/rtcp with kamailio. Does it make sense? No. Would it work? Probably, in a limited way.
Of course, if you are a developer, you can do anything. :-)
But the question wasn't asked in the developer context, at least I did not parse it that way...
/O
So if I wanted to do something like this, then I'd find the point where kamailio is actually calling recv(), then find out where it feeds the received data into the sip parser. There, I'd implement the logic to quickly check if what we're dealing with is an rtp packet, and handle it differently than other packets. For SDP in request and response bodies flowing through my config, I'd modify SDP to put 5060 as media port for the various streams.
Now since every packet will be received on port 5060, you can't really distinguish between different streams, as you can't rely on the source address advertised in SDP because of NAT, so any NAT scenario with more than one phone behind that NAT is going to break the whole thing. Well, putting aside NAT, you now would have to maintain mapping tables of source addresses announced in SDP and check (and rely on) them for inbound packets and map them to the outbound leg based on the source address. That might work for non-NAT scenarios (but who's using NAT in a world of IPv6 anyways?).
Now the question is, why would anyone want to do that? If the intention is to make it work better in NAT environments, then our OP has probably not thought it through entirely.
Andreas
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing listsr-dev@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev