Re: [Sofia-sip-devel] Integrating sofia with other event loop libraries
Hi, 2011/3/30 Leandro Lucarella llucare...@integratech.com.ar: Hi, I noticed sofia has its own event loop and there is integration with glib event loop. It is possible (and easy) to integrate sofia with other event loop libraries? I'm interested in integrating it with libev specifically. Integration is possible, the easiness depends how well the concepts suit with the other event loop libraries. See various su_*_port.c files for examples. If not (possible or easy ;), is it sofia thread-safe? Sofia-SIP is threadsafe in the sense it uses no static data. Can I enqueue sofia events into my own loop and thus do the processing in another thread (calling sofia API from another thread, different from where sofia event loop is running)? The NUA API is supposed to do suit that model, iow, you should be able to call nua methods from multiple threads. Other APIs have some design problems. Your idea of queuing the events sounds interesting. ;) -- Pekka.Pessi mail at nokia.com -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Setting sofia-sip Source Port
Hi, 2011/3/31 Jerry Richards jerry.richa...@teotech.com: I am setting my contact address to specify port 5061 (for TLS), but a wireshark trace shows the message being sent with a source port of 1025. This is confusing the Redcom server. How can I make sofia-sip send the message with the same port as is in the contact header? Do you use nua? If so, you can set NUTAG_OUTBOUND(outbound natify use-rport), and Sofia will use the ephemeral source port in Contact, too. Otherwise, the situation is a bit more complicated. What kind of setup you have? -- Pekka.Pessi mail at nokia.com -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Setting sofia-sip Source Port
Hi Pekka, I temporarily got it working by patching the tport_tls_connect() function to set susa.su_port to 5061 (instead of setting it to 0). I do use nua, so I'll try NUTAG_OUTBOUND() as you suggest. We have a requirement that TLS connections must specifically use source port 5061 (not a random port). Thanks, Jerry -Original Message- From: Pekka Pessi [mailto:ppe...@gmail.com] Sent: Monday, April 04, 2011 8:35 AM To: Jerry Richards Cc: sofia-sip-devel@lists.sourceforge.net Subject: Re: [Sofia-sip-devel] Setting sofia-sip Source Port Hi, 2011/3/31 Jerry Richards jerry.richa...@teotech.com: I am setting my contact address to specify port 5061 (for TLS), but a wireshark trace shows the message being sent with a source port of 1025. This is confusing the Redcom server. How can I make sofia-sip send the message with the same port as is in the contact header? Do you use nua? If so, you can set NUTAG_OUTBOUND(outbound natify use-rport), and Sofia will use the ephemeral source port in Contact, too. Otherwise, the situation is a bit more complicated. What kind of setup you have? -- Pekka.Pessi mail at nokia.com -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Setting sofia-sip Source Port
Hi Jerry, 2011/4/4 Jerry Richards jerry.richa...@teotech.com: I temporarily got it working by patching the tport_tls_connect() function to set susa.su_port to 5061 (instead of setting it to 0). I do use nua, so I'll try NUTAG_OUTBOUND() as you suggest. We have a requirement that TLS connections must specifically use source port 5061 (not a random port). There is the problem you cannot reconnect once the initial connection fails (as there is no way to make difference between old and new connections). Please try to reconsider the requirement, it will not work. -- Pekka.Pessi mail at nokia.com -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Setting sofia-sip Source Port
Pekka, This is a Govt. requirement (AS-SIP). We can't change it. What function is invoked when reconnect is attempted if the initial connection fails? Thanks, Jerry -Original Message- From: Pekka Pessi [mailto:ppe...@gmail.com] Sent: Monday, April 04, 2011 9:14 AM To: Jerry Richards Cc: sofia-sip-devel@lists.sourceforge.net Subject: Re: [Sofia-sip-devel] Setting sofia-sip Source Port Hi Jerry, 2011/4/4 Jerry Richards jerry.richa...@teotech.com: I temporarily got it working by patching the tport_tls_connect() function to set susa.su_port to 5061 (instead of setting it to 0). I do use nua, so I'll try NUTAG_OUTBOUND() as you suggest. We have a requirement that TLS connections must specifically use source port 5061 (not a random port). There is the problem you cannot reconnect once the initial connection fails (as there is no way to make difference between old and new connections). Please try to reconsider the requirement, it will not work. -- Pekka.Pessi mail at nokia.com -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Integrating sofia with other event loop libraries
Pekka Pessi, el 4 de April a las 18:28 me escribiste: Hi, 2011/3/30 Leandro Lucarella llucare...@integratech.com.ar: Hi, I noticed sofia has its own event loop and there is integration with glib event loop. It is possible (and easy) to integrate sofia with other event loop libraries? I'm interested in integrating it with libev specifically. Integration is possible, the easiness depends how well the concepts suit with the other event loop libraries. See various su_*_port.c files for examples. If not (possible or easy ;), is it sofia thread-safe? Sofia-SIP is threadsafe in the sense it uses no static data. Can I enqueue sofia events into my own loop and thus do the processing in another thread (calling sofia API from another thread, different from where sofia event loop is running)? The NUA API is supposed to do suit that model, iow, you should be able to call nua methods from multiple threads. Other APIs have some design problems. Your idea of queuing the events sounds interesting. ;) OK, thanks, I'll check if I can integrate Sofia-SIP with libev and if not, I'll go with the parellel loop. -- Leandro Lucarella Integratech S.A. 4571-5252 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
Re: [Sofia-sip-devel] Integrating sofia with other event loop libraries
I would love to hear about your findings! We're looking at integrating Sofia into another event loop. Would be awesome if you could report back to the list! Sent from my mobile apparatus On Apr 4, 2011, at 1:11 PM, Leandro Lucarella llucare...@integratech.com.ar wrote: Pekka Pessi, el 4 de April a las 18:28 me escribiste: Hi, 2011/3/30 Leandro Lucarella llucare...@integratech.com.ar: Hi, I noticed sofia has its own event loop and there is integration with glib event loop. It is possible (and easy) to integrate sofia with other event loop libraries? I'm interested in integrating it with libev specifically. Integration is possible, the easiness depends how well the concepts suit with the other event loop libraries. See various su_*_port.c files for examples. If not (possible or easy ;), is it sofia thread-safe? Sofia-SIP is threadsafe in the sense it uses no static data. Can I enqueue sofia events into my own loop and thus do the processing in another thread (calling sofia API from another thread, different from where sofia event loop is running)? The NUA API is supposed to do suit that model, iow, you should be able to call nua methods from multiple threads. Other APIs have some design problems. Your idea of queuing the events sounds interesting. ;) OK, thanks, I'll check if I can integrate Sofia-SIP with libev and if not, I'll go with the parellel loop. -- Leandro Lucarella Integratech S.A. 4571-5252 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel