sample of custom transports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

Does anyone have an example of using custom transports? I've noticed that pjsip only allows a single TCP transport even if you try to create a new one for a different local/public address (i.e. a different network adapter). If you're using UDP  you can create as many different transports as you like.

I'd like to do this so that I can control which network adaptor is being used for a user account (of which there may be more than one).

I could live with having only one TCP transport at any one point in time if necessary, but I've had trouble with that. There isn't an API to make changes to a transport once you've created it and I've had problems trying to remove a transport so I can create a new one using:

pjsua_transport_set_enable(transport_id, PJ_FALSE);
pjsua_transport_close(transport_id, PJ_FALSE);

// bla

pjsua_transport_create(required_type, &new_cfg, &transport_id);

To be fair, the documentation does warn against calling pjsua_transport_close()anyway, but if you don't call it then you get problems creating the new transport such as PJSIP_ETYPEEXISTS where the old one hasn't been fully removed.

Regards.

Gary Metalle
Senior Software Engineer

[Description: http://www.ipfx.com/images/logo.gif]
p

+64 9 3573487


e

gary.metalle at ipfx.com<mailto:gary.metalle at ipfx.com>

w

www.ipfx.com<http://www.ipfx.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120521/8ad64476/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4896 bytes
Desc: image001.gif
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120521/8ad64476/attachment.gif>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux