[pjsip] VLANs?

Benny Prijono bennylp at pjsip.org
Fri Sep 28 17:15:52 EDT 2007


Norman Franke wrote:
> Is there a way to configure pjsip (using the pjsua API) to use a VLAN  
> for all communication? This would make routing and security easier,  
> while sending normal computer traffic (file servers and web access)  
> out the normal way.

Nope, there's no VLAN stuff in pjlib, let alone pjsua-lib. How do 
you set VLAN on a socket anyway?

But assuming you can set VLAN of a socket, here's how to retrieve 
the SIP and media sockets in pjsua-lib.

You'll need to include pjsua_internal.h. Then enumerate all 
pjsua_call, get the media transport of each call, and get it's 
socket with pjmedia_transport_get_info().

For SIP transport, use pjsip_endpt_acquire_transport() to get the 
UDP transport, and then just access the pjsip_transport directly to 
get the socket.


cheers,
  -benny








More information about the pjsip mailing list