Re: [Sofia-sip-devel] Getting started: parsing a message

2011-03-24 Thread Pekka Pessi
Hi Bendan,

2011/3/21 Brendan Loudermilk bren...@apwit.com:
 As a weekend project I've begun to play around with Sofia-SIP. I'm using FFI
 to build a simple Ruby interface to some of the lower-level functions in the
 library. My first goal is to be able to parse arbitrary strings from a Ruby
 networking library. I saw the example on this page for parsing memory, but
 I'm wondering if theres a simpler way.

What kind of strings you want to parse? Something like Contact:
sip:192.168.1.2:5060?

 As a secondary question, what options are there for those of us who are
 interested in the SIP/SDP protocol behavior implementations, but want to
 implement our own networking? Are we forced to re-implement the various
 behavioral RFCs in our implementation? Or is there an event-based hook
 portion of Sofia that I have yet to discover?

I'm a bit loss what you want to do by yourself? Interface towards the
sockets and network? Something else?

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Getting started: parsing a message

2011-03-21 Thread Brendan Loudermilk
As a weekend project I've begun to play around with Sofia-SIP. I'm using FFI to 
build a simple Ruby interface to some of the lower-level functions in the 
library. My first goal is to be able to parse arbitrary strings from a Ruby 
networking library. I saw the example on this page for parsing memory, but I'm 
wondering if theres a simpler way.

As a secondary question, what options are there for those of us who are 
interested in the SIP/SDP protocol behavior implementations, but want to 
implement our own networking? Are we forced to re-implement the various 
behavioral RFCs in our implementation? Or is there an event-based hook portion 
of Sofia that I have yet to discover?

Thanks in advance!--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


RE: [Sofia-sip-devel] Getting started

2006-05-18 Thread Jason Terry
Hi Martti,

Thanks for the response.  I was able to get my test app to bind to
the correct port.  I have encountered another issue.  In my test app I
follow the sample code and do this in my app_i_invite:

void app_i_invite(int   status,
  char const   *phrase,
  nua_t*nua,
  nua_magic_t  *magic,
  nua_handle_t *nh,
  nua_hmagic_t *hmagic,
  sip_t const  *sip,
  tagi_ttags[])
{
printf(incoming call\n);

nua_respond(nh, 200, OK, TAG_END()); 

} /* app_i_invite */

However, this call fails.  The comments for nua_respond say that I
should use nua_invite_respond.  However, that function doesn't exist.

Thanks,
Jason  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 09, 2006 5:40 AM
To: Jason Terry
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: RE: [Sofia-sip-devel] Getting started

Hello Jason,

To study a simple (not SIMPLE ;) SIP client you might first want to try
sip-options.c found in utils directory, for example.

The example code you were referring to (found at Sofia-SIP refdocs)
should initialize the NUA stack and bind the sockets. You might want to
add an additional tag NUTAG_URL() to nua_create():

  appl-nua = nua_create(appl-root,
 app_callback,
 appl,
 NUTAG_URL(sip:0.0.0.0:5060),
 TAG_NULL());


This commands stack to use a local IP address (instead of possibly
available IPv6) and to bind to port 5060 if it's free. For the testing
purposes, this way you can be sure if the stack is really bound to a
specific port.


But I would recommend you to test first with sip-options.c with
TPORT_LOG environment variable turned on:

sh  TPORT_LOG=1 ./sip-options program params


Best regards,

Martti

--
Martti Mela, Nokia Research Center
+358504836460




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ext
Jason Terry
Sent: 8. toukokuuta 2006 22:18
To: sofia-sip-devel@lists.sourceforge.net
Subject: [Sofia-sip-devel] Getting started


Hi,
 
I've downloaded Sofia and have installed it on a redhat
linux server.  I was trying to get the hang of things by using the NUA
sample code found here:
http://sofia-sip.sourceforge.net/refdocs/nua/index.html.  Is this enough
to get things up and running, because I don't see my test application
listening on udp port 5060.  Are these instructions complete?
 
Regards,
Jason



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


RE: [Sofia-sip-devel] Getting started

2006-05-18 Thread martti.mela
Hey Jason,

Great that you got further. What is the failure for nua_respond()? Could
you please send a log of the execution or your app? By quickly looking
at your code it seems it's correct. Please run your app with TPORT_LOG=1
environment variable enabled: this prints the incoming and outgoing SIP
message bodys.
(sh  TPORT_LOG=1 ./your_app)


BR,

Martti

 

-Original Message-
From: ext Jason Terry [mailto:[EMAIL PROTECTED] 
Sent: 18. toukokuuta 2006 17:08
To: Mela Martti (Nokia-NRC/Helsinki)
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: RE: [Sofia-sip-devel] Getting started

Hi Martti,

Thanks for the response.  I was able to get my test app to bind to
the correct port.  I have encountered another issue.  In my test app I
follow the sample code and do this in my app_i_invite:

void app_i_invite(int   status,
  char const   *phrase,
  nua_t*nua,
  nua_magic_t  *magic,
  nua_handle_t *nh,
  nua_hmagic_t *hmagic,
  sip_t const  *sip,
  tagi_ttags[])
{
printf(incoming call\n);

nua_respond(nh, 200, OK, TAG_END()); 

} /* app_i_invite */

However, this call fails.  The comments for nua_respond say that I
should use nua_invite_respond.  However, that function doesn't exist.

Thanks,
Jason  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 09, 2006 5:40 AM
To: Jason Terry
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: RE: [Sofia-sip-devel] Getting started

Hello Jason,

To study a simple (not SIMPLE ;) SIP client you might first want to try
sip-options.c found in utils directory, for example.

The example code you were referring to (found at Sofia-SIP refdocs)
should initialize the NUA stack and bind the sockets. You might want to
add an additional tag NUTAG_URL() to nua_create():

  appl-nua = nua_create(appl-root,
 app_callback,
 appl,
 NUTAG_URL(sip:0.0.0.0:5060),
 TAG_NULL());


This commands stack to use a local IP address (instead of possibly
available IPv6) and to bind to port 5060 if it's free. For the testing
purposes, this way you can be sure if the stack is really bound to a
specific port.


But I would recommend you to test first with sip-options.c with
TPORT_LOG environment variable turned on:

sh  TPORT_LOG=1 ./sip-options program params


Best regards,

Martti

--
Martti Mela, Nokia Research Center
+358504836460




   From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ext
Jason Terry
   Sent: 8. toukokuuta 2006 22:18
   To: sofia-sip-devel@lists.sourceforge.net
   Subject: [Sofia-sip-devel] Getting started
   
   
   Hi,

   I've downloaded Sofia and have installed it on a redhat
linux server.  I was trying to get the hang of things by using the NUA
sample code found here:
http://sofia-sip.sourceforge.net/refdocs/nua/index.html.  Is 
this enough
to get things up and running, because I don't see my test application
listening on udp port 5060.  Are these instructions complete?

   Regards,
   Jason




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Getting started

2006-05-09 Thread Kai Vehmanen

Hi,

On Mon, 8 May 2006, Jason Terry wrote:


server.  I was trying to get the hang of things by using the NUA sample
code found here:
http://sofia-sip.sourceforge.net/refdocs/nua/index.html.  Is this enough
to get things up and running, because I don't see my test application
listening on udp port 5060.  Are these instructions complete?


that should be fine. Have you checked the call to nua_create() was 
succesful? Also check that your test app is not listening to some other 
port (for example with netstat -p).


--
 under work: Sofia-SIP at http://sofia-sip.sf.net


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


RE: [Sofia-sip-devel] Getting started

2006-05-09 Thread martti.mela
Hello Jason,

To study a simple (not SIMPLE ;) SIP client you might first want to try
sip-options.c found in utils directory, for example.

The example code you were referring to (found at Sofia-SIP refdocs)
should initialize the NUA stack and bind the sockets. You might want to
add an additional tag NUTAG_URL() to nua_create():

  appl-nua = nua_create(appl-root,
 app_callback,
 appl,
 NUTAG_URL(sip:0.0.0.0:5060),
 TAG_NULL());


This commands stack to use a local IP address (instead of possibly
available IPv6) and to bind to port 5060 if it's free. For the testing
purposes, this way you can be sure if the stack is really bound to a
specific port.


But I would recommend you to test first with sip-options.c with
TPORT_LOG environment variable turned on:

sh  TPORT_LOG=1 ./sip-options program params


Best regards,

Martti

--
Martti Mela, Nokia Research Center
+358504836460 




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ext
Jason Terry
Sent: 8. toukokuuta 2006 22:18
To: sofia-sip-devel@lists.sourceforge.net
Subject: [Sofia-sip-devel] Getting started


Hi,
 
I've downloaded Sofia and have installed it on a redhat
linux server.  I was trying to get the hang of things by using the NUA
sample code found here:
http://sofia-sip.sourceforge.net/refdocs/nua/index.html.  Is this enough
to get things up and running, because I don't see my test application
listening on udp port 5060.  Are these instructions complete?
 
Regards,
Jason



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Getting started

2006-05-08 Thread Jason Terry



Hi,

 
I've downloaded Sofia and have installed it on a redhat linux server. I 
was trying to get the hang of things by using the NUA sample code found here: http://sofia-sip.sourceforge.net/refdocs/nua/index.html. 
Is this enough to get things up and running, because I don't see my test 
application listening on udp port 5060. Are these instructions 
complete?

Regards,
Jason