1

I'm doing a university project in which i have to communicate with an existing server using SIP messages. I have done the part where i send the message, and i see with wireshark that the server responded, but i don't know how to receive that message and interpret it.

I have created a class that composes a sip message, and then creates a UdpTransport to send the message. I fill all of the message headers manually before that.

udp_transport = new UdpTransport(0, this);
udp_transport.sendMessage(sip_message, new IpAddress(toAddress), 5060);

Now i wonder how to receive the message the server sends back.

The declaration of MjSip SipProvider class (i modeled mine after it, they both call UDPTransport) implements TransportListener and has a callback methond onReceivedMessage()

but i'm not sure how to make it listen. I need to listen on a specific port, that the user inputs in the UI before. Not really sure how this callback even works.

So, i just need something to listen for a response message, and that it calls my processReceivedMessage() method so i can extract information.

lukarak
  • 41
  • 1
  • 3

0 Answers0