Re: [Sofia-sip-devel] Registration authentication problem - 904 No matching challenge

2011-08-19 Thread Pekka Pessi
Hi Laurent,

2011/8/1 Laurent Lecigne lleci...@gmail.com:
 I am currently stuck trying to get a Sofia SIP agent to properly register to 
 a registrar (Open IMS core).
 Whenever the agent gets challenged it does not reattempt to provide its 
 credentials : the registration keeps failing.

 Basically, a nua_authenticate() is triggered on nua_r_register 401 but Sofia 
 says there is no matching challenge (904) although:
  o realm (enclosed within double quotes),  login and password provided are 
 accurate,
  o same operation handle is used than received event (hope this is the way to 
 go).
 I expected the framework to resubmit REGISTER after this nua_authenticate() 
 call (i.e. I am not re-registering after).

Sofia-SIP does not support AKA authentication out-of-the-box. What you
need is a custom authentication client plugin. I should probably write
an example how to do it...

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sofia-Sip Supported RTP Stack

2011-08-19 Thread Pekka Pessi
Hi,

2011/8/18 Meftah Tayeb tayeb.mef...@gmail.com:
 do sofia include a RTP stack ?
 how can i integrate existing RTP stack with Sofia ?

Please see sofsip-cli for an example of integrating a media stack with
Sofia SIP.

 and if RTP stack is integrated/supported, what codecs are supported ?
 can i inject aditional codecs to the existing RTP Stack ?

All the codecs that do not require any fancy SDP features are readily supported.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] register time-out

2011-08-19 Thread Pekka Pessi
Hi,

2011/8/19 Nick Knight n...@omniis.com:
 I have a client which registers against a server fine. The server
 imposes a register at 3600 which turns up in the expires field. Sofia
 then tries to register at aruond 1800, which is too much before what
 the server will allow.

 How is this controlled? Why is sofia ignoring it?

The 3600 seconds is the maximum lifetime of the expiration. Sofia SIP
follows the practice outlined in most IETF documents to do the refresh
roughly at half the expiration time.

If you want Sofia SIp to register once in hour, propose expiration
time of 7200 seconds?

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Invite with Multipart content

2011-08-18 Thread Pekka Pessi
Hi Harinath,

There is no decent API for sending MIME multipart from nua at the
moment. Currently, if nua notices that there is a payload, it won't
touch it. I have some doubts regarding encoding of multipart (iow, it
won't work.)

I have some ideas about the API, like including an empty SDP within
multipart or so, but unfortunately little time to work on them.
Patches are always welcome, if you feel adventurous.

--Pekka

2011/6/15 harinath nanpaly harin...@globalwirelesstech.com:
 I need to send INVITE message with multipart content (application/sdp +

 application/femtointerfacemsg).

 I would appreciate if you could give some ideas on it.



 I am having hard time making the sdp body manually, which eventually goes
 into the MIME payload.



 Any ideas?



 Thanks,

 Harinath

 --
 EditLive Enterprise is the world's most technically advanced content
 authoring tool. Experience the power of Track Changes, Inline Image
 Editing and ensure content is compliant with Accessibility Checking.
 http://p.sf.net/sfu/ephox-dev2dev
 ___
 Sofia-sip-devel mailing list
 Sofia-sip-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel





-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] How to remove Supported header from outgoing request.

2011-08-18 Thread Pekka Pessi
Hi Inca,

2011/6/22 Inca Rose incar...@gmail.com:
 I'm using NUA and I see that by default the Supported header is sent with 
 timer, 100rel
 I want to control the supported header contents and find out that 
 NUATAG_SUPPORTED only adds supported values, and only SIPTAG_SUPPORTED can 
 override it.
 I want to be able to not send Supported headers at all if the UA doesn't 
 support any extension.
 I set SIPTAG_SUPPORTED_STR() but the stack sends the Supported header empty.

 There is any way to tell the stack not to send the Supported header if it is 
 empty ?

You should be able to get rid of Supported with
SIPTAG_SUPPORTED_STR((void *) -1)).

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] 'Network error' on FreeBSD: how to debug?

2011-08-18 Thread Pekka Pessi
Hi Yuri,

2011/6/19 Yuri y...@rawbw.com:
 On 06/18/2011 17:50, Yuri wrote:
 recvfrom call retrieving result for DNS query never receives the result
 for some reason.


 I found bug in code resolving the sip-dig hang:
 in file sres_blocking.c lines
       if (c-block-fds[i].revents | POLLERR)
         sres_resolver_error(c-resolver, c-block-fds[i].fd);
       if (c-block-fds[i].revents | POLLIN)
         sres_resolver_receive(c-resolver, c-block-fds[i].fd);

 should look like this:

       if (c-block-fds[i].revents  POLLERR)
         sres_resolver_error(c-resolver, c-block-fds[i].fd);
       if (c-block-fds[i].revents  POLLIN)
         sres_resolver_receive(c-resolver, c-block-fds[i].fd);

Thanks for catching this...

 After this sip-dig works fine. But empathy still has 'Network error'.

Does your UA send DNS queries? Do they look valid? Where Sofia reads
the resolv.conf? Can you get logs from UA?

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Segmentation Fault After BYE 407 Proxy Authentication

2011-08-18 Thread Pekka Pessi
Hi Jerry,

2011/6/23 Jerry Richards jerry.richa...@teotech.com:
 One more thing on this.  The segmentation fault was due to the assert()
 function crashing in my phone.  This was not caused by sofia-sip.  But the
 additional comparison to sip_method_bye should be added to sofia-sip so the
 assert() does not cause a printf.

I'm afraid that does not work (in other words, the ACK sent by nua is
gibberish if the cr is BYE, because it has CSeq number different from
INVITE.)

Thanks for reporting this, I'll try to make a fix to the root cause.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] ipv4/ipv6 issues

2011-08-18 Thread Pekka Pessi
Hi Florian,

2011/6/29 Florian Limberger florian.limber...@aon.at:
...
 When an ipv6 client initiates a call to a ipv4 client the call is
 properly established!!

 If ipv4 calls ipv6, the final ACK is not sent.
...
 Probably, this has something to do with the Contact header, which
 contains the transport address which has been used for registration.
 However, if ipv6 invites ipv4, everything is fine.

 Note, that the ipv4 only host has a link-local ipv6 address but has no
 ipv6 connectivity to the Internet.

 Please advise me where and how the transport for an ACK is determined
 and where in the code this can be fixed.

You are correct when you assume that the Contact header is in play. It
determines the transport for ACK, unless there happens to be some
Record-Route headers. Your proxy is supposed to add those Record-Route
headers in case it notices that caller is IPv4 and callee IPv6.
Alternatively, the IPv4-only User Agent could try to do something
clever, like still using the same proxy to send ACK it used to send
INVITE, if it cannot use the transport from Contact header.
Unfortunately, Sofia is not so clever.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] auto nua_ack with bad UIR (without destination port)

2011-08-18 Thread Pekka Pessi
Hi Ivan,

2011/7/13 Иван Чистяков zetru...@gmail.com:
 I send INVITE to SLFphone and recv responce 100/180/200 with bad
 Contact header (without port).
 And sofia stack trying to send auto ACK with this bad Contact header
 (without port).
 SLFphone can use non standart port, but stack trying to use default port 5060.

 How to fix it?

 ACK sip:softphone@172.16.0.129:3296 SIP/2.0

You can try to force Sofia SIP to use a certain address for next hop,
for instance, include NUTAG_PROXY(sip:172.16.0.129:3296) in
nua_invite() or nua_ack() or nua_respond() tags.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue

2011-08-18 Thread Pekka Pessi
Hi Nauman,

2011/7/1 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 We are handling all media (SDP) ourselves and have set PRACK to be one of the 
 methods our app handles. We are using the nua API.

 Can Pekka or someone say whether PRACK and forking is supported with the way  
 we are using the Stack. We've seen some posts saying there are various bugs.

 When PRACK is not used the first 200OK received is passed to the application 
 with cancel sent to the others. This is the behaviour we would like even when 
 PRACK is used. However it seems that when the first 183 reliable is received 
 this results in subsequent 200OK from other forks to be discarded. We just 
 want the first 200OK final response to be passed to our application 
 irrespective of which fork its from and are happy for CANCEL to be sent to 
 others.

Unfortunately PRACK (and early dialog) support is broken vis-a-vis the
forking. Sofia ditches the original invite, and treats the first early
dialog as the only one.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] bug fix in su_time0.c for MacOS X 64bit

2011-08-18 Thread Pekka Pessi
2011/7/11 Frode Isaksen frode.isak...@bewan.com:
 There is a bug in su_time0.c for MacOS X 64bit since the field tv_sec in 
 struct timeval is 64bits instead of 32bits as in su_time_t, so you cannot 
 cast su_time_t to struct timeval. This patch fixes this:

Thanks. I've applied the patch.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Problem with sofia codec selection

2011-08-18 Thread Pekka Pessi
Hi,

2011/7/12 Olivier Deme od...@druidsoftware.com:
 Is it possible to configure sofia to pick a selection of codecs based
 on the SDP offered by the network and the SDP specified in
 nua_respond, rather than picking a single codec?

Use SOATAG_RTP_SELECT(SOA_RTP_SELECT_COMMON).

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] tport_check_trunc() issue

2011-08-18 Thread Pekka Pessi
Hi Arsen,

2011/7/13 Arsen Chaloyan achalo...@yahoo.com:
 Although this is a typical race condition issue, it still seems pretty
 harmless as the goal of this function is to set tp-tp_trunc which isn't
 used currently. To get rid of this message, I have just commented out
 tport_check_trunc() but wanted to know where tp-tp_trunc was supposed to be
 used.

As far as I recall, it was supposed to be used to streamline the
receiving code path. Now we ask kernel for datagram length and then
try to receive it, I believe using the MSG_TRUNC flag was supposed to
remove one system call from that.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Possible Memory Leak if INVITE was not succesfully.

2011-08-18 Thread Pekka Pessi
Hi Stefan,

2011/7/13 Stefan Opfermann sip.rie...@yahoo.de:
 we have an application based on Sofia SIP 1.12.11 which uses directly INVITE 
 methods between two SIP User Agents without a REGISTER server.

 In the case that the User is still busy or the caller not allowed to call ( 
 404 Not found etc. ), we have noticed a memory leak on the caller side if 
 the outgoing INVITE event (nua_r_invite) has an status unequal 200 OK. We 
 tried to generate the ACK Answer by our Event Handler, so NUTAG_AUTOACK( 0 
 ) and also the automatic answer with NUTAG_AUTOACK( 1 ) option. The ACK is 
 generated correctly , but  in booth modi we lost memory.

In case of an error response (status = 300) the ACK response is part
of the transaction and transaction layer takes care of sending it.

 The ACK Response Event nua_r_ack is hidden them from application.

It is just used to send nua_ack() request to stack. Application is not
supposed to see it.

 So the question is, where is the best place to free the handle ?

When you get final error response in nua_r_invite or nua_i_state with
nua_callstate_terminated?


-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] tls_connect() Invoked On Every Outbound INVITE

2011-06-14 Thread Pekka Pessi
Hi Jerry,

2011/6/9 Jerry Richards jerry.richa...@teotech.com:
 Anyone know why sofia-sip would re-establish a TLS connection for every
 outbound INVITE?  That's what I see happening.  Logs are shown below, after
 calling nua_invite() while a TLS connection was already establised (Note:
 you'll probably see some extra logs I added to help debug this).

The tport_by_addrinfo() requires that the TLS connection was opened
with same canon name (in this case, [FD00::2A0:25FF:FE00:2ABD]) or
that the subjects from the certificate match your canon name (looks
like your subject is 200.21.3.10). Was the already open connection
inbound?

--Pekka



 Thanks,

 Jerry



   --[452] nua: nua_invite: entering

 --[453] nua(0xbb04a8): sent signal r_invite

 --[458] nua(0xbb04a8): recv signal r_set_params

 --[459] nua: nua_stack_set_params: entering

 --[460] nua(0xbb04a8): event r_set_params 200 OK

 --[461] nua: nua_application_event: entering

 --[465] nua(0xbb04a8): recv signal r_set_params

 --[466] nua: nua_stack_set_params: entering

 --[467] nua(0xbb04a8): event r_set_params 200 OK

 --[468] nua: nua_application_event: entering

 --[472] nua(0xbb04a8): recv signal r_invite

 --[473] nua: nua_stack_set_params: entering

 --[474] nua(0xbb04a8): adding session usage

 --[482] nta_leg_tcreate(0xbb2fd0)

 --[483]    [2]outgoing_create()

 --[484] outgoing_create:
 [1]route_url-us_url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[485] outgoing_create:
 [2]route_url-us_url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[486] outgoing_create:
 [3]route_url-us_url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[487] outgoing_create:
 [4]route_url-us_url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[488] outgoing_create:
 [5]route_url-us_url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[489] nta: selecting scheme sip

 --[490]    url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[491]    us-us_url-url_host=[FD00::2A0:25FF:FE00:2ABD]

 --[492] tport_tsend(0xba7390) tpn = */[FD00::2A0:25FF:FE00:2ABD]:5061

 --[493] tport_resolve addrinfo = [fd00::2a0:25ff:fe00:2abd]:5061

 --[494] tport_by_addrinfo(0xba7390): not found by name
 */[FD00::2A0:25FF:FE00:2ABD]:5061

 --[495] tport_tls_connect: Entering...

 --[496] tport_alloc_secondary(0xba7390): new secondary tport 0xbd29d0

 --[497]    tls_init_secondary: SSL_new(ctx=0xbaf2d8)

 --[498]   ...SSL_new() returned ssl=0xbbe820

 --[499]    tls_init_secondary: SSL_set_bio(ssl=0xbbe820, rbio=0xbb0198,
 wbio=0xbb0198)

 --[500]    tls_init_secondary: SSL_set_connect_state(ssl=0xbbe820)

 --[501]    tls_init_secondary: SSL_set_mode(ssl=0xbbe820,
 SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)

 --[502] [IPv4]tport_base_connect(TCP): bind(s=29, len=16, sin_fam=2,
 sin_port=50451=0xc513, sin_addr=0x0)

 --[503] [IPV6]tport_base_connect(TCP): bind(s=29, len=16, sa_fam=2,
 sin6_port=50451=0xc513,

 --[504]    sin6_flowinfo=0, sin6_scope_id=2, sa_data=00 00 00 00 00 00 00 00
 28 25 bd 00 43 25 bd 00

 --[505] tport_tls_connect(0xbd29d0): bind(local-ip): Invalid argument

 --[506] [IPv4]tport_base_connect(TCP): connect(s=29, len=28, sin_fam=10,
 sin_port=50451=0xc513, sin_addr=0x0)

 --[507] [IPV6]tport_base_connect(TCP): connect(s=29, len=28, sa_fam=10,
 sin6_port=50451=0xc513,

 --[508]    sin6_flowinfo=0, sin6_scope_id=2, sa_data=fd 00 00 00 00 00 00 00
 02 a0 25 ff fe 00 2a bd

 --[509] tport_tls_connect(0xbd29d0): connecting to
 tls/[fd00::2a0:25ff:fe00:2abd]:5061/sips

 --[510] tport(0xbd29d0): reset timer

 --[511] tport_queue(0xbd29d0): queueing 0xbaff08 for
 tls/[fd00::2a0:25ff:fe00:2abd]:5061

 --[512] nta: sent INVITE (13472340) to */[FD00::2A0:25FF:FE00:2ABD]:5061

 --[513] tport_pend(0xbd29d0): pending 0xbaff08 for
 tls/[fd00::2a0:25ff:fe00:2abd]:5061 (already 0)

 --[514] nta: timer set to 32000 ms

 --[515] nua(0xbb04a8): call state changed: init - calling, sent offer

 --[516] nua(0xbb04a8): event i_state INVITE sent

 --[517] nua: nua_application_event: entering

 --[530] tls_connect(0xbd29d0): events CONNECTING

 --[531] tls_connect(0xbd29d0): events NEGOTIATING

 --[532] tls_connect(0xbd29d0): events NEGOTIATING

 --[533]    SSL_get_peer_certificate(ssl=0xbbe820)

 --[534]   ...SSL_get_peer_certificate() returned cert=0xbbf3b8

 --[535]    SSL_get_verify_result(ssl=0xbbe820) returned 0 (success)

 --[536]    NeedCert: TRUE

  --[537]    NeedCRL: FALSE

  --[538]    NeedOCSP: FALSE

  --[539]    OCSP_URL:

  --[540] tls_post_connection_check(0xbd29d0): Peer Certificate Subject 0:
 200.21.3.10

 --[541]    goto X509_VERIFY_OK: NeedOCSP=FALSE

 --[542] tport_send_event(0xbd29d0) - ready to send to
 (tls/[fd00::2a0:25ff:fe00:2abd]:5061)

 --



 --
 EditLive Enterprise is the world's most technically advanced content
 authoring tool. Experience the power of Track Changes, Inline Image
 Editing and ensure content is compliant with Accessibility Checking.
 http://p.sf.net/sfu/ephox-dev2dev
 ___
 

Re: [Sofia-sip-devel] NUTAG_WITH and BYE

2011-06-14 Thread Pekka Pessi
Hi Vladimir,

2011/6/9 Vladimir Luchko vlad.l...@mail.ru:
 Can I answer to the incoming BYE with 200 ok from the application without
 using NUTAG_WITH?
 I`ve init nua with NUTAG_AUTOANSWER(0) and NUTAG_APPL_METHOD(BYE). Than
 I got nua_i_bye event. I want to answer 200
 with nua_resopnd(nh, 200, NULL, NUTAG_NULL()), but stack emits nua_i_error
 500 - answer to non-existing request.

The idea is that there can be multiple transactions ongoing (e.g.,
INVITE and PRACK) at the same time.

 why I must use NUTAG_WITH to respond to BYE? What side effects can I get
 if doing something like that:

     if (!t  (sr-sr_method == sip_method_invite || sr-sr_method ==
 sip_method_bye))
       break;

If your application receives INVITE, then BYE, and decides to answer
to BYE before answering to INVITE, stack might get confused (answering
INVITE instead and leaving BYE server transaction hanging around).

-- 
Pekka.Pessi mail at nokia.com

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] one nua, multiple accounts

2011-06-03 Thread Pekka Pessi
Hi Luca,

2011/6/1 Luca Olivetti l...@ventoso.org:
 BTW, the documentation says that sofia-sip will generate the contact using
 the provided NUTAG_M_USERNAME, an equal sign and a random string, but it
 doesn't seem to be the case, so I didn't bother checking for the presence
 of an equal sign and stripping the rest in 
 sip-sip_request-rq_url-url_user.

 The documentation tries to be future-proof in case nua will grow
 automatic multi-registration support.

 Ok, in that case, url_user will be the one supplied in NUTAG_M_USERNAME or
 will it be the complete one?
 In the latter case, is there a function to strip the auto-generated part
 or should I roll my own?

It will contain = and then some random data. You can strip it away
with strchr(user, '=') etc.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] one nua, multiple accounts

2011-06-01 Thread Pekka Pessi
Hi Luca,

2011/5/29 Luca Olivetti l...@ventoso.org:
 If in nua_register I use NUTAG_M_USERNAME, can I be sure that the proxy will
 use it as a Contact: for every incoming request?
 If that's the case, I no longer need to rely on the To: header.

Yes, NUTAG_M_USERNAME is best way to implement an user agent with
multiple registrations.

The proxy is supposed to use the URL from contact. Of course, there
may be buggy proxies.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] No ACK sent after PRACK and CANCEL

2011-05-24 Thread Pekka Pessi
Hi Inca,

2011/5/20 Inca Rose incar...@gmail.com:
 We are experiencing a strange behavior in the following scenario:

 A: Using Sofia SIP stack


 A --- INVITE
 A --  183 with RSeq
 A  PRACK
 A --- OK ( PARCK )
 A --- 180
 A -- CANCEL
 A -- OK ( Cancel )
 A -- 487 Request terminated

 At this point I was expected A to send ACK to terminate the INVITE 
 Transaction, but the ACK is never sent.

 In the same scenario, but without PRACK, the ACK after the 487

 This is a known bug 

There seems to be serious problems in processing the final answer from
another fork in case of early dialogs. Thanks for reporting this.

-- 
Pekka.Pessi mail at nokia.com

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] No ACK sent after PRACK and CANCEL

2011-05-24 Thread Pekka Pessi
Hi,

2011/5/24 Pekka Pessi ppe...@gmail.com:
 2011/5/20 Inca Rose incar...@gmail.com:
 We are experiencing a strange behavior in the following scenario:

 A: Using Sofia SIP stack


 A --- INVITE
 A --  183 with RSeq
 A  PRACK
 A --- OK ( PARCK )
 A --- 180
 A -- CANCEL
 A -- OK ( Cancel )
 A -- 487 Request terminated

 At this point I was expected A to send ACK to terminate the INVITE 
 Transaction, but the ACK is never sent.

 In the same scenario, but without PRACK, the ACK after the 487

 This is a known bug 

 There seems to be serious problems in processing the final answer from
 another fork in case of early dialogs. Thanks for reporting this.

Hmmm, do you happen to use NTATAG_UA(0)?

-- 
Pekka.Pessi mail at nokia.com

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] MSRP Support

2011-05-20 Thread Pekka Pessi
Hi,

2011/5/3 Ubuntu Explorer ubuntuexplo...@gmail.com:
 Are there any plans to add MSRP support to Sofia SIP in the roadmap?

We might add support for the SDP negotiation for setting up MSRP, but
I see no MSRP implementation ahead. However, feel free to contribute.
;)

-- 
Pekka.Pessi mail at nokia.com

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Early dialog not working after Update method

2011-05-19 Thread Pekka Pessi
Hi Matteo,

2011/5/17 Matteo mbrancale...@voismart.it:
 going on with debug, the issue is that outgoing_find does not
 check for different to_tag in provisional response.

 I've created a patch that works for me which
 handles different to_tag in provisional responses and
 manage RSeq in right way if to_tag changed.

 but I don't know if this is the proper way to do it.

The early dialog and especially early media with forking is, indeed,
tricky.  There was some talk with Anthony M. on media handling in that
case, but we got never around to define how the media should behave.
(Should the early media from all forks be played? Should they be
mixed? If a 200 OK is received from another fork, how it should be
handled?)

Currently, I think, nua on FreeSwitch sticks to first fork sending it
a 100rel response as you noticed.

My original idea was to handle each fork (especially with reliable 1xx
responses) in a separate nua handle and let the application (in this
case FreeSwitch) to handle all the hairiness related to media, but
perhaps there is a cleaner approach.

-- 
Pekka.Pessi mail at nokia.com

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] How to know remote hold in nua_i_invite event?

2011-05-03 Thread Pekka Pessi
Hi Chris,

2011/4/24 Chris hlidea...@gmail.com:
 In sofia-sip nua reference page, it indicates we can retrieve tags
 SOATAG_ACTIVE_AUDIO() when we get a nua_i_invite event. It is useful
 if I could use that tag to check remote holding events. However, I
 found I can not get SOATAG_ACTIVE_AUDIO() in nua_i_invite event. I can
 only get its value in nua_i_state. My question is: Is there any
 possibility to check remote holding in nua_i_invite? In my design, I
 want to handle SDP negotiation in nua_i_state but all SIP related
 things in their respective events.

The current Sofia SIP version does not include the media-related tags
in nua_i_invite, however, that seems to be a bug.

I've pushed a patch fixing that into gitorious:

https://gitorious.org/sofia-sip/sofia-sip/commit/4f58617329fa8821ba1014a27e32c9292cf6f874/diffs

-- 
Pekka.Pessi mail at nokia.com

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?

2011-04-18 Thread Pekka Pessi
Hi Luca,

2011/4/18 Luca Olivetti l...@ventoso.org:
 A2 = MD5(REGISTER:sip:ekiga.net)
 auth_response: db79b8a5046c76654b742311b7d4a33d = 
 MD5(53060310bbad90036d54e1954983ae4e:4dab21dbe3306f1513e34e9e24eedc00a7827bd9394f:14bd7ed1967527d3770ab1f7c12901c5)
  (qop=NONE)
 svd: nta.c: 7785: outgoing_create: Assertion 
 `tport_name_is_resolved(orq-orq_tpn)' failed.

 It seems the same as this one:

 http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg03243.html

 outgoing_create is using a bogus override_tport, here, around line 7770 of 
 nua.c,
 causing the crash

The network change is probably suffering from bit-rot.

The transport is cached in nua/outbound.c, I suppose it should drop
its reference to tport_t, too, when network change is detected. See:
https://gitorious.org/~ppessi/sofia-sip/pessi-sofia-sip/commits/network-change

-- 
Pekka.Pessi mail at nokia.com

--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Handling 486 Busy Here

2011-04-11 Thread Pekka Pessi
Hi,

2011/4/10 Manuel Argüelles manuel.arguel...@gmail.com:
 I'm using an nta agent in a multi-thread application (proxy), I noticed that
 during an invite transaction if the peer returns a 486 Busy Here code, sofia
 sip seems to internally handle it and replies with an ACK, since the callback
 function doesn't gets called, is there a way to get a notification about it?

The ACK to error responses such as 486 is part of the transaction so
NTA takes care of it. What kind of notification would you like to get?

-- 
Pekka.Pessi mail at nokia.com

--
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] Setting sofia-sip Source Port

2011-04-05 Thread Pekka Pessi
Hi Jerry,

2011/4/4 Jerry Richards jerry.richa...@teotech.com:
 This is a Govt. requirement (AS-SIP).  We can't change it.

Huh? And I thought that IMS had it bad...

What function is invoked when reconnect is attempted if the initial connection 
fails?

Hm. socket(), bind() and connect()?

--Pekka

 -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






-- 
Pekka.Pessi mail at nokia.com

--
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

2011-04-04 Thread Pekka Pessi
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

2011-04-04 Thread Pekka Pessi
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

2011-04-04 Thread Pekka Pessi
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] NOTIFY sip frag set to 503 when receiving 407 Invite response

2011-03-30 Thread Pekka Pessi
Hi,

2011/3/30 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 Hi, when performing an attended transfer, when the transfer destination sends 
 a 407 to the INVITE with replaces generated by transferee, a NOTIFY with 503 
 sipfrag is sent to the transferrer. Code is here in nua_session.c
 in function nh_referral_respond. The transfer destination is in different
 domain. The resulting NOTIFY 503 sent to the transferrer makes him think the 
 transfer has failed rather than just being in progress. Is there some reason 
 for this or is it a bug?

I think it is a bug, the stack should check if the request is restartable.

--Pekka

-- 
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] release debug version of test_nua.exe run differently (sofia-sip-1.12.11)

2011-03-29 Thread Pekka Pessi
Hi Allen,

2011/3/25 Allen alleng...@gmail.com:
 Thanks a lot for your reply.

 I have tried the --no-nat setting, the results are the same.

 Actually the log information I provided in my original email for Visual
 studio 2003 release version is already the result with BOTH --no-nat AND
 --no-proxy setting, otherwise it halts even earlier with the following
 log information:

OK. The problem is, test_nua test cases may suffer from some nasty
timing issues, but the newer check-based tests do not work at all on
Windows.

 
 TEST NUA-2.6.1: REGISTER b to c
 test_nua: testing b_call-nh = nua_handle(b-nua, b_call, (tag_type_t)0,
 (tag_value_t)0)
 test_nua: ok: (b_call-nh = nua_handle(b-nua, b_call, (tag_type_t)0,
 (tag_value_t)0))
 nta: REGISTER (10166550): Connection refused (10061) with
 tcp/[192.168.1.5]:1685
 

 I have test these release version of test_nua.exe on XP SP3, Vista
 business, and Windows 7 Home Preminum, all all have same results as the
 log shown in my original email. All these three operation systems have
 the latest patches installed.

 I have checked the su_init() function, it's the su_init(void) at the
 line 304 of su.c, it DOES include the code to load the _DisconnectEx
 function pointer, and I have checked the log information, the loading
 function call didn't fail.

OK, so that is not an issue.

 I am confused why the release version runs differently from debug
 version, the debug version just passes all the test cases.

The optimization has a tendency to change the work flow slightly and
exposing weaknesses and bugs not present in unoptimized versions. Of
course, the compilers always have bugs, most of them show up when
optimizing.

I wonder if the latest MSVCs allow you to debug optimized versions. If
so, please try to increase optimization level in debug version and try
to see if that helps.

 According to
 my limited experiences, it might caused by not initializing some
 varibles before using them since the debug version always set the
 varibles to zero when they are declared.

Compiler should warn about not initializing some variables. The
project files disable quite a many warnings on MSVC, please see if
enabling them reveals something.

 Would you please give me some more advices to dig into this issue? Thanks!

First, try test_nua with -s option. If it works with that, the issue
is most probably in the test suite.

You can also run test_nua with various logging options, using -e with
--log=a, --log=b or --log=c might reveal something. I'm mostly
interested in the logs from the runs that stop at test case 9.1.4 ...

-- 
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


Re: [Sofia-sip-devel] release debug version of test_nua.exe run differently (sofia-sip-1.12.11)

2011-03-24 Thread Pekka Pessi
Hi Allen,

2011/3/23 Allen Guan alleng...@gmail.com:
 I am new to this mail list. I have built sofia-sip-1.12.11 under XP
 SP3 and tried the test programs.

 I have noticed strange behaviors of the test program test_nua.exe when
 running in release version. I have tried to compiled with Visual
 studio 2003, visual studio 2005 and visual studio 2010 express. All
 the debug versions of test_nua.exe compiled with these three compilers
 run well; but the release versions hang in the middle of the running,
 I have attached the log information got when I ran these programs in
 verbose mode. Please take a look at it and give me some advices on the
 possible reasons why these release versions have issues and how to
 tune them up to make them work.

The test_nua has some problems in the way some WinSock implementations
route the local TCP/IP traffic. You can try to run it with command
line option --no-nat, and see if the problem persists.

You could also check if the su_init() manages to load the
_DisconnectEx function pointer. I was under the impression that it
should work in later XP SPs, too, but it is not first time I have made
a mistake.

-- 
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


Re: [Sofia-sip-devel] Version 1.12.11

2011-03-24 Thread Pekka Pessi
Hi Jerry,

2011/3/23 Jerry Richards jerry.richa...@teotech.com:
 I noticed the latest trunk still has the following line in the configure.ac
 file:

 AC_INIT([sofia-sip], [1.12.10devel])

 Shouldn't this line show 1.12.11?

It seems to me that I have actively forgotten about CVS. I committed
the release to CVS, too.

-- 
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


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


Re: [Sofia-sip-devel] Prack

2011-03-24 Thread Pekka Pessi
Hi Vikas,

2011/3/18 Vikas Bhat vikasbhat0...@gmail.com:
 i am implenting early dialog in Sofia sip application using prack.
 the application is stateless using NTA modul.

 my application send invite with Supported header,receives 183 with RSeq.
 then the applcation tries to send the PRACK message as shown below but it
 fails

 orq=nta_outgoing_prack(leg,  //leg created before sending the invite
    (nta_outgoing_t *)dialogue-orq,   // this is orq of INVITE message send
 earlier using nta_outgoing_tcreate
    (nta_response_f *)sofia_sip_response, //call back function for
 receiving response
    (nta_outgoing_magic_t*)dialogue,  //dialogue pointer that
 is created after sending initial INVITE
    NULL,
    NULL,
    NTATAG_STATELESS(1),
   SIPTAG_RACK(pRackHdr), //added rack header
   TAG_END());

 Kindly guide me to implement Prack .

If you want to use nta_outgoing_prack(), you first have to create a
new instance of INVITE client transaction specific to the new early
dialog you want to PRACK with nta_outgoing_tagged().

When you receive an early response with Require: 100rel, you create
the new invite transaction with nta_outgoing_tagged(), and keep both
it and the original invite transaction around. Depending on your
application, you might run to a situation where the final 200 OK is
received from some other UA (or you might receive 100rel responses
from other UAs, too).

There is a disturbing @bug in nta_outgoing_tagged(), however, I
believe the leak is fixed, but the PRACK and early dialog code is not
very well tested. Please report if you run to any assert() failure.

-- 
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


Re: [Sofia-sip-devel] Good TLS Hellos But No SIP REGISTER Sent

2011-03-24 Thread Pekka Pessi
Hi Jerry,

2011/3/22 Jerry Richards jerry.richa...@teotech.com:
 I am seeing an issue with TLS where the REGISTER message is not getting
 sent.  The TLS Hello/Certificate exchange seems to always happens correctly
 (which just precedes the REGISTER request).  The scenario is that it is
 previously registered and then later lose registration because of this
 issue.  Interestingly enough, it seems to be timing related, because if I
 enable all the sofia debug logging in the sofia stack, it does not have this
 problem.  Could this be a timing issue?  Any thoughts on how to resolve
 this?

How you manage your TLS connections? Do you have an active connection
during the lifetime of the  registration? Can you send other requests,
like, INVITE after a period of inactivity?

-- 
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


Re: [Sofia-sip-devel] soatag_local_sdp_str_ref undeclared ('soa:remove duplicate definitions')

2011-03-24 Thread Pekka Pessi
Hi Erik,

2011/3/24 Erik Habicht e.habi...@thiesen.com:
 Looks like there was a bogus soatag_session_sdp_str_ref declaration
 instead of soatag_local_sdp_str_ref.

 Yes ... adding SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str_ref; also
 solve the problem.

 Is SOFIAPUBVAR tag_typedef_t soatag_session_sdp_str_ref; needed any more?

 In my case removing SOFIAPUBVAR tag_typedef_t
 soatag_session_sdp_str_ref; works.

I think I've planned on adding SOATAG_SESSION_SDP() at some point and
the duplicate was an abortive attempt on it.

Anyways, thanks for spotting this, I've already pushed the patch to gitorious.

-- 
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] Anyone still using CVS?

2011-03-24 Thread Pekka Pessi
Hello all,

Are there a a lot of people still using CVS?

As it is now, CVS is not really very useful in tracking the
development, nor it is very useful in tracking releases as Jerry
noticed.

If there is no objections, I'll stop updating the CVS repo and try to
remove the links to it from the Sourceforge developer pages.

-- 
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] ANN: release candidate 1 for sofia-sip-1.12.11

2011-03-04 Thread Pekka Pessi
Hello all,

Long time no release.

However, now I've put out a pre-release tar package available from
sofia-sip.org:

http://sofia-sip.org/~ppessi/sofia-sip-1.12.10pre11rc1.tar.gz

md5sum: 3c9dbb7dee430ccb5d1d0b088eef5516
sha1sum: a0da65f9e8031df1f016545dc83b9ff362760b35
sha256sum: 6c683625cf9c069c6dbe9c99f29377c123555200deeaab359a37a2684d917ff6

The release candidate is tagged in
http://gitorious.org/sofia-sip/sofia-sip as sofia-sip-1_12_11rc1 with
git commit

93ccbc1230708aa4947d824823e39ce56105291f

I've only tested it on Ubuntu 10.10 and Windows 7 (compiled with VS
2010), I'd appreciate if people with more exotic platforms would give
it a try.

-- 
Pekka.Pessi mail at nokia.com

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] How to retrieve the local bound SIP port when created dynamically? (as used in contact-header)

2011-02-03 Thread Pekka Pessi
Hi,

2011/1/31 EiSl 1972 eisl1...@gmail.com:
 I have the feeling the answer lays in front of my nose, but for some reason
 I cannot find/see it...

nua_get_params(.., NTATAG_CONTACT(NULL), TAG:END())

and look for ntatag_contact in the tag list of nua_r_get_params().
 I'm using the released stable version 1.12.10.
 I know there is a lot of incident repair and other development still
 ongoing. If I would like to use a more recent version, which branch/tag is
 considered then most stable?

The master branch at

git://gitorious.org/sofia-sip/sofia-sip.git

is currently pretty stable...

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sofia Getting 900 Internal Error When SIPTAG_TO_STR(sip:7348902; rfrid=eaff000000221c6035b5@200.21.3.10)

2011-02-03 Thread Pekka Pessi
Hi Jerry,

2011/2/3 Jerry Richards jerry.richa...@teotech.com:
 Okay, I think I fixed it.  For some reason, sofia did not like when I set
 both NUTAG_URL() in the nua_handle() call and also set SIPTAG_TO_STR() to
 the same thing in the nua_invite() call.  So I removed specifying the
 SIPTAG_TO_STR() in the nua_invite() call and the error no longer occurs.

I think your problem is a syntax violation:

 SIPTAG_TO_STR(sip:7348902;rfrid=eaff00221c6035b5@200.21.3.10)

Try to enclose the URI in , otherwise To header parser thinks the
URI is sip:7348902 and the parameter
rfrid=eaff00221c6035b5@200.21.3.10 has invalid syntax..

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [sofia-sip-devel] digest authorization using HA1 directly

2011-01-26 Thread Pekka Pessi
Hi Paulo,

2011/1/13 Paulo Vicentini vicentini.pa...@gmail.com:
 Attached is hack to use HA1 with sofia-sip
 Example:
 nua_authenticate(nh, SIPTAG_EXPIRES_STR(3600), NUTAG_AUTH(authentication),
 TAG_END())

 where authentication is string: Digest-HA1:realm:user:HA1

I did it in a more complex way, so you should have

HA1+Digest:realm:user:HA1+hash

For example

HA1+Digest:ims3.so.noklab.net:user1:HA1+c0890ff7a4fadc50c45f392ec4312965

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sip messages truncated

2011-01-26 Thread Pekka Pessi
Hi Philippe,

2011/1/21 Philippe Maymat pmay...@keyyo.com:
 Since I allowed th multidialog sent in Notify, I received fragmented
 messages and it seems that the message is truncated by th sofia SIP
 stack because ethereal show all informations.

Check the Content-Length from the ethereal, is it correct? It would
help if you could save the problematic message from ethereal and send
it on the list, too.

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multi home and sofia-sip

2011-01-26 Thread Pekka Pessi
Hi Inca,

2011/1/21 Inca Rose incar...@gmail.com:
  What about the selection of Contact and Via and Transport on a multi-home 
 environment ?
 I remember that the selection was not consistent, for example sending the 
 packet from NIC1 while selecting Via / Contact from NIC2.

This is a problem that has no generic solution, at least not in Linux.
Can you bind sockets or applications to a NIC in iOS?

 Also there is no way to check from which NIC the proxy is reachable, imagine 
 a VPN situation where the proxy is only
 reachable from the VPN but not from the real NIC.

 Where can I add iOS implementation for the Network change detection ??

See nua_register.c/nua_network_changed_cb() and su_os_nw.c and
su_root_add_network_changed()

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Format of contact header

2011-01-21 Thread Pekka Pessi
Hi Stefan,

2011/1/13 Stefan Eckel stefan.ec...@c4b.de:
 we are looking for a method to put transport tags into the contact header 
 field of an invite message.
 With

 nua_invite(m_handle,   SIPTAG_CONTACT_STR( 
 sip:100.100.100.100:5160;tansport=tcp ) , 

 we get

 Contact: sip: 100.100.100.100:5160;transport=tcp

If there is no  aroung the URI, it ends at first ;. Try

SIPTAG_CONTACT_STR( sip:100.100.100.100:5160;tansport=tcp )

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multi home and sofia-sip

2011-01-21 Thread Pekka Pessi
Hi Inca,

2011/1/14 Inca Rose incar...@gmail.com:
 Hi;
 I remember there was a limitation with Sofia-SIP and multi-home hosts ( in my 
 case is a device ).
 I do not remember if it was the Via header not populated correctly or the 
 transport was not selected correctly.

 There was any improvement in this area ??

 Why am I asking ?
 I need to support network changing on the fly during an active call.
 If the device changes network, from 3g to wifi or vice-versa, during an 
 active call, the application has to be notified
 and do whatever needed to continue the call without user intervention.

 If NUA was initialized with the 3G address how can I move the call to WiFi 
 
 -- I need to change the Contact and SDP, so I need to send a 
 re-invite/update, but NUA is not aware of the WiFi transport.

There was some code in NUA and NTA for changing the transports (grep
for NUTAG_DETECT_NETWORK_UPDATES).

However, it is pretty untested and it is currently triggered only in
OS X. Triggering it on Linux should be trivial, but it has been on
TODO list last five years.. ;-/


-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Link error on visual studio 2008

2011-01-10 Thread Pekka Pessi
Hi,

2010/12/28 Philippe Maymat pmay...@keyyo.com:
 I found a solution, the file string.c is not included in the project and
 contains all missing definitions.

Oops, the dll projects were not updated. I've added them to the git version.

 Now my problem is a crash on line 550 in nua_client.c when subscribing.
 The same code works fine on linux, so I try to find the difference ...

Any news?

--Pekka

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Memory allocation problem on windows, Sorry It s nua_stack.c file :)

2011-01-10 Thread Pekka Pessi
Hi Philippe,

2010/12/29 Philippe Maymat pmay...@keyyo.com:
 I made several modifications to compile cotrrectly the SOFIA-SIP project
 with Visual studio 8. There is mistakes on both project files for static
 and dynamic library on line 4305 and 3216. There was /files/files
 instead of /files. With this modification the XML is valid and the
 project cn be loaded.

Thanks for reporting this, I've fixed the problem.

I need to add smoothsort.c in static lib project which is
 forgotten too.

...and added this one, too.

 Now it works but It seem I have a big memory leak, software crash during
 subscribe...

 My project works well on linux (QT project) and it is the same revision
 of SOFIA-SIP
 I use th version from this repository :
 git://gitorious.org/sofia-sip/sofia-sip.git
 Is it correct ?
 Because I do not had problem with the old cvs version but this doesn't
 work for me on windows ...
 Now I try to debug and find why it crashes, but it's very hard ... I
 often have error in nta.c line 2388 because of a corrupted content in
 strucures.

 I have this problem in both static and dynamic lib linking

Can you run the test cases? The check.cmd script should run them.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [sofia-sip-devel] digest authorization using HA1 directly

2011-01-10 Thread Pekka Pessi
Hi Paulo,

2010/12/18 Paulo Vicentini vicentini.pa...@gmail.com:
 Thanks for your tips
 If It uses a Digest-HA1 scheme, it would need to receive the same from the
 registrar server (matching schemes). It would be good to be server agnostic
 (Digest)
 int ca_credentials(...
 ... ...
 if ((scheme != NULL  !su_casematch(scheme, ca-ca_scheme)) ||
 (realm != NULL  !su_strmatch(realm, ca-ca_realm)))
 return 0;

 It needs to somehow to ignore above code, maybe checking for Digest-HA1

Yes, the ca_credentials should somehow magically match the
Digest-HA1 with Digest, and somehow store the HA1 in the
auth_client_t structure so that the digest algorithm itself would
recognize the HA1. The current authentication client design does not
support that very well.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [sofia-sip-devel] digest authorization using HA1 directly

2010-12-15 Thread Pekka Pessi
Hi Paulo,

2010/12/15 Paulo Vicentini vicentini.pa...@gmail.com:
 I using sofia-SIP as an UAC to register with a SIP registrar
 I'd like to avoid using the secret (it is indeed not available) directly
 while creating a digest authorization header with:
 int auc_digest_authorization(auth_client_t *ca,
 su_home_t *home,
 char const *method,
 url_t const *url,
 msg_payload_t const *body,
 msg_header_t **return_headers)

 Only HA1 = md5(username:realm:password) is available
 So that I intend to use HA1 = md5(username:realm:password) instead
 What do you say about that?

It is doable with some modifications to iptsec/auth_client.c. You
could modify the ca_credentials to store only the HA1 in the
ca_client_t structure instead of the password (in case of Digest) and
add a special scheme, e.g., Digest-HA1 where the password would
contain the HA1.

Patches are welcome.

-- 
Pekka.Pessi mail at nokia.com

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Populating to header from Refer message with replaces

2010-12-15 Thread Pekka Pessi
Hi Nauman,

2010/12/8 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 Hi, using sofia 1.12.10 how to populate TO header of Invite created in 
 response to incoming REFER with refer-to header containing replaces parameter.

 I can't just use the refer-to uri on its own as it has the all the replaces 
 stuff. I suppose i could grab the various bits from the refer-to header and 
 create a To uri but was wondering  if there is a better way. I am currently 
 using the following tags

 SIPTAG_FROM_STR
 SIPTAG_TO_STR
 NUTAG_URL
 NUTAG_NOTIFY_REFER
 NUTAG_REFER_EVENT

 the new invite is being created with a replaces header,  just the to header 
 is wrong

Is there something extra in To header? I guess you could parse the
refer-to URL and remove all the header parameters from it.

Do you want to have the to-tag from Replaces in the new INVITE? The
Replaces header and to-tag is used to find an existing call to drop
when the new referred call gets connected.

-- 
Pekka.Pessi mail at nokia.com

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] we *still* have a race condition

2010-11-11 Thread Pekka Pessi
2010/10/23 Jen Chitty jenchi...@vtech.ca:
 We are trying to track down an intermittent failure in the Sofia SIP stack
 where we appear to be getting an EPERM error back from some POSIX API call
 or another on a powerpc Linux 2.6.23.  This error is somehow triggering the
 stack to report an ACK timeout, even though no timer has expired.  Does this
 sound familiar to anyone?

 Anyway, I came across a line of code in tport_type_udp.c that I found
 somewhat alarming:

     su_soerror(self-tp_socket);  /* XXX - we *still* have a race condition
 */

 Does anyone know what race condition this is referring to?

When network reports an error with ICMP message, the kernel stores the
error in the socket and wakes up the application with special error
event. Application can ask for the error code using su_soerror()
(getsockopt system call with SO_ERROR argument) but if it does not,
next time application tries to read or write from the socket, the
error is reported to it.

If Sofia SIP application talks with two other SIP instances, say A and
B, and it sends a request to A, but A is unreachable and A's router
reports back an error with ICMP, send to *B* may fail if the ICMP
packet from A is received before call to su_vsend() (sendmsg() system
call).

The above code clears the error just before call to su_vsend. Doing so
reduces the size of the window where an unrelated ICMP can trigger
failure when sending but it does not remove it entirely.

-- 
Pekka.Pessi mail at nokia.com

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] make check fails

2010-09-20 Thread Pekka Pessi
Hi Filippo,

2010/9/20 Della Betta Filippo filippo.dellabe...@telecomitalia.it:
 Attached config.h and config.status.
 Below output of ifconfig...

It seems to me that you do not have openssl-dev, but my make check
passes through even if I remove it... Mysterious.

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Using VPN

2010-09-20 Thread Pekka Pessi
Hi all,

2010/9/16  mikhail.zabal...@nokia.com:
 Hi, using 1.12.10. Sofia doesn't seem to select the vpn ip when
 connected over VPN. It still seems to be listening on the usual WiFI
 access point ip, this is the same no matter what ip is passed to
 NUTAG_URL.

 It should work if the nua stack is created with this tag.
 I set it as an url_t equivalent to sip:IPADDR:*.

The socket is bind with maddr parameter, like sip:IPADDR:*;maddr=IPADDR.

 That said, it is unfortunate that Sofia cannot determine the preferred IP 
 binding by itself, even though it requires platform-specific code (so a Linux 
 fix using rtnetlink will not solve the problem for iPhone).

Yes, the netlink or equivalent code is surely needed.

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] su_root_threading query

2010-09-17 Thread Pekka Pessi
2010/9/15 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 Hi, using 1.12.10 i've set su_root_threading to multithreading mode. But when
 i call nua_register for example from the main thread of my app it blocks it,
 it appears to be all the sresolv stuff. Should this be expected and i should 
 be calling the nua functions on a separate thread. If someone could confirm.

The nua_register should just queue a message for the other thread to
process. Even in single-threaded mode, it should queue it and not
block (but the message would be processed only when the tread returns
to su_root_run() or does su_root_step()).

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] make check fails

2010-09-17 Thread Pekka Pessi
2010/9/17 Della Betta Filippo filippo.dellabe...@telecomitalia.it:
 From a clean VM Ubuntu 10.04 x86, I did the following steps to reproduce 
 failure

 sudo apt-get install build-essential autoconf automake1.9 libtool git-core 
 check
 git clone http://git.gitorious.org/sofia-sip/sofia-sip.git
 cd sofia-sip
 ./autogen.sh
 mkdir build
 cd build
 ../configure  make  make check

I could not reproduce the problem on my host. Could you send me your
config.h and config.status (and perhaps output from ip addr)?

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] make check fails

2010-09-13 Thread Pekka Pessi
Hi Filippo,

2010/9/10 Della Betta Filippo filippo.dellabe...@telecomitalia.it:
        With the latest git code, make check fails during check_nua (I have 
 4/5 errors).
 The first test that fails is call_2_3_1.
 So I launched check_nua call_2_3_1
 With CHECK_NUA_THREADING=no : fails
 With CHECK_NUA_THREADING=yes : ok
 Can you check this ?

It runs fine on my Ubuntu Lucid host. What kind of environment you have?


-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Minor patches

2010-08-31 Thread Pekka Pessi
Hi Filippo,

2010/8/27 Della Betta Filippo filippo.dellabe...@telecomitalia.it

  I’m trying to update sofia-sip to the latest git version.

 Is it possible to have the function nua_handle_by_call_id exported ?
 (nua_h.patch)


I've applied your patches but slightly modified latter two. Thanks.

--Pekka

-- 
Pekka.Pessi mail at nokia.com
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Problem in using sofia-sip libraries

2010-08-16 Thread Pekka Pessi
Hi Amir,

2010/8/14 Amir Khezrian amir.khezr...@gmail.com:
 From the errors, It seems that compiler can't find sofia-sip/msg_types.h and
 sofia-sip/msg_mime.h
 Have i missed something that is necessary to be installed before using
 sofia-sip?

You should -I the directory where the inlude files has been installed,
not the sofia-sip source tree. By default the include path is
/usr/local/include/sofia-sip .

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] forking calls and overlapping

2010-08-16 Thread Pekka Pessi
2010/8/12 Михаил Кривушин krivushi...@gmail.com:
 Hello!
 We use FreeSWITCH and OpenSIPS, and have problem - when we try use forking
 calls, it seems that sofia nta/nta.c doesnt distinct INVITE-s by Via
 headers, and its branches.
 Is it right, or I need more code reading?

By default, the server side on nta.c detects the branched INVITEs (and
responds with 482 Request Merged to them).

On client side, the same client side transaction can be used to
receive all the responses. It is also possible to create a
fork-specific client-side transaction with nta_outgoing_tagged().

The nua call model does not support forking, and the sdp processing
and media handling gets outright confused on multiple forks.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Internal error at nua_stack.c:2388 on SUBSCRIBE

2010-08-16 Thread Pekka Pessi
Hi Philippe,

2010/8/13 Philippe Maymat pmay...@keyyo.com
with the latest git repo, I now have the following error in return of 
nua_subscribe:

 Internal error at nua_client.c:550

 It's due to the ';', with any other char, it works.

Could you show us your code? How do you initialize nh? Which other
tags you include with nua_handle() and nua_subscribe() besides
NUTAG_URL?

--
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia-sip not sending correct Via headers in 200 OK to NOTIFY request

2010-08-13 Thread Pekka Pessi
Hi Gaurac,

2010/8/13 Pekka Pessi ppe...@gmail.com:
 2010/8/11 Gaurav Srivastva gaurav...@yahoo.com:
 The Via headers on Linux are sent correctly if TPORT_LOG is not defined. If 
 I define this variable then the problem starts happening.

 Oh my. Thanks for digging this out.

I've pushed the fix to gitorious, please test.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] nua_callstate_authenticating don't work

2010-08-11 Thread Pekka Pessi
Hi Paolo,


2010/8/5 Paulo Pizarro paulo.piza...@gmail.com:
 The nua_callstate_authenticating is documented:

 http://sofia-sip.sourceforge.net/refdocs/nua/nua__tag_8h.html#904045132b398207f1597320c860eca3

 But, it is not used on the source (only defined).

 Maybe, it's better to remove it from the enum or fix documentation with 
 TODO.

It seems to me that it never has been used. I'll fix the documentation.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] One more question about cloned task

2010-08-10 Thread Pekka Pessi
Hi Pete,
Hi Pete,

2010/8/7 Pete Kay pete...@gmail.com:
 Do you have multiple nta_agent_t instances running, or how do you
 handle the UAS side? What kind of task you plan to implement in the
 cloned task, some kind of db lookup?

 Yes, I am using DB to store routing information.

Have you considered using su_msg_send() and su_msg_reply() to talk
with the DB thread instead of multi-threaded agent?
Please note that while nta functions are thread-safe, the nta objects are not.

 If you want to see later messages from UAC, you need to insert a
 Record-Route header into the request which you forward towards the
 UAS.

 I am looking at
 http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__record__route.html
 which shows how to creat a record_route structure.  How do I add it to
 the outgoing sip message?  Which api should I use?

That depends on how you plan to do the forwarding. E.g.,

sip_record_route_t *rr = sip_record_route_format(msg_home(msg), ...);
msg_header_insert(mg, NULL, (msg_header_t *)rr);

 Also, should I store both UAC-related RR and UAS-related RR in the
 RR-URI's user part?

User part is easiest, I think.

 In the hash table you suggested, should I use an UUID to represent
 each leg ( one for UAC and the other one for UAS) and then store the
 leg corrspond to each UUID?

I would not use legs: if you process same request twice (say, one of
your users forwards his calls to another user) the legs cannot make
difference between loops. I'd process each incoming request either
statelessly or with default leg, and look for the UUID from the
topmost route.

 Also, I don't understand why it matter whether I am using one or two
 nta_agent_t.  I still need two UUID ( one for each leg ) regardless of
 whether I use one or two nta_agent_t right?  Or am I missing
 something?

Well, in principle you could do with one UUID and RR if you used one agent.

 You have to remove the resulting Route headers when processing the
 later messages, too.

 Which API can I use to remove the Route header and when you say later
 messages, what are you referring to?  When should the Route header be
 removed?

The RFC 3216 sections 16.4 and 16.12 describes how the Route header
should be processed. Basically, when you receive a request with Route
header, you should forward request based on topmost Route instead of
request-URI. If topmost Route URI belongs to your proxy, you remove
it.

The lr URI parameter complicates matters, however.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Null Callid and To Tag

2010-08-10 Thread Pekka Pessi
2010/8/5 Vikas Bhat vikasbhat0...@gmail.com:
 Thanks for the information.
 Do u mean to say that Sofia Stack(NTA) should send the 400.
 since we are using the STACK in is STATELESS mode .should our application
 check for
 CallID with null values and respond with 400.

Yes and no, the nta stack should check for bad requests even in stateless mode.

 is there any stack configuration to be enabled from SOFIA STACK side to
 Check such scenerios and respond appropriately.

See, e.g., the documentation of NTATAG_BAD_REQ_MASK():

http://sofia-sip.sourceforge.net/refdocs/nta/nta__tag_8h.html#23d0ebce6f3a594c5547e0ff72fc5777

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] One more question about cloned task

2010-08-06 Thread Pekka Pessi
Hi Pete,

2010/7/30 Pete Kay pete...@gmail.com:
 In my request_handler, I am creating a new cloned_task upon receiving
 of INVITE from uac.  I am using this cloned_task to create a leg to
 talk to the uas and forward the INVITE to the uas.

Do you have multiple nta_agent_t instances running, or how do you
handle the UAS side? What kind of task you plan to implement in the
cloned task, some kind of db lookup?

 When I get another message from uac, such as ACK, how can I reuse the
 same cloned task and the same leg that was previously created or I
 should recreate it for ACK as well?

If you want to see later messages from UAC, you need to insert a
Record-Route header into the request which you forward towards the
UAS.

 Where can I store the cloned task and the nta_leg_t object and have it
 be reused for the next message received from the same UAC?

The problem with legs is that you have no control on Call-ID and
From/To tags, they are chosen by UAC/AUS. Also, a dialog may loop
through your proxy multiple times. It is better to insert a
Record-Route URL that you can use to lookup the dialog and the
associated state from some kind of hash table. (E.g., insert a hashed
identifier of your dialog in user-part of the RR URI, use that to
lookup from the hash table). If the RR points to different nta_agent_t
instances, you need to insert two Record-Route headers, one used by
UAC, another by UAS. With two Record-Route headers you can also easily
make difference between requests sent by original UAC and UAS.

You have to remove the resulting Route headers when processing the
later messages, too.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multiple transports with single nua_create instance

2010-08-06 Thread Pekka Pessi
Hi,

2010/8/2 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 Hi, using sofi 1.12.10 we have managed t support multiple registrations using 
  separate nua handle to nua_register call, single nua_create call.

 However is it possible to specify separate ports and transport for each 
 nua_handle OR do we need to create a separate stack instance to support this 
 ie multiple nu_create calls with unique NUTAG_URL for each instance.

Unfortunately, you can only specify two transports in nua_create(),
one with NUTAG_URL() another with NUTAG_URL_SIPS().

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Fixed documentation of the detailed client call model

2010-08-06 Thread Pekka Pessi
2010/8/5 Paulo Pizarro paulo.piza...@gmail.com:
 I'm sending a patch fixing the documentation of the detailed client call 
 model.

Thanks, applied.

 I hope this is true! :)

Hope so too. ;)


-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Using TLS with sofia

2010-08-06 Thread Pekka Pessi
2010/8/2 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 Hi, using version 1.12.10. We've compiled OpenSSL 0.9.8, also compiled the 2 
 source files related to tls in tport. We know that in NUTAG_URL we must pass 
 in transport=tls. What else do we need to do to enable tls on Sofia, is there 
  any sample code to show how to use it?

You should have root (cafile.pem) and server certificates ready
(agent.pem) in a suitable directory ($HOME/.sip/auth by default).
-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] adding rinstance to NOTIFY request line in nua

2010-08-04 Thread Pekka Pessi
2010/7/22 Markus Bucher buch...@in.tum.de:
 Is the notify for a existing subscribe/notify session or is it for a
 blind notify?

 It's actually for both, though blind notifies have priority.
 The scenario is, that there is a security server between my application an
 the receiver of the notify (client).
 This server adds the rinstance to the contact-header of a register. I save
 this rinstance-tag and have to add it to the request line of all requests to
 the client (that are initiated by my application).
 If a packet is not in a dialog and does not have the rinstance tag, the
 packet will be droped by the server.

 I'm nor really able to try it, so I don't really know if subscribe/notify
 sessions are concerned, but blind notifies are definitely concerned.

NUTAG_URL() should work for blind NOTIFYs but not with the SUBSCRIBEd
NOTIFYs. The latter take the URL from the Contact (or Record-Route)
header. However, they are part of an existing dialog, so your security
servers should let them through. (You may need to respond to SUBSCRIBE
before sending NOTIFY, however.)

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] NTA authentication request problem

2010-08-04 Thread Pekka Pessi
2010/7/24 Mayur Mahajan mayurmahajan...@gmail.com:
  I have made a shorter version of my mail.
   When I send a request to the server through my NTA client, I get the
 response of the message(407 Unauthorized) in the callback. So, when the
 callback function gets the 407 message it invokes authorize_ua() method. The
 problem is I am not able to send the request which authorizes me.  Could you
 please help me in the following things :-

The 407 Unauthorized is sent by a proxy (as opposed to the 401
Unauthorized which is sent by UAS). The 407 carries Proxy-Authenticate
header (instead of WWW-Authenticate in 401) and the subsequent retry
should contain Proxy-Authorization header.

 nta_leg_destroy(context-c_leg), context-c_leg = NULL;

   if (context-c_leg)

This is an another problem...

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Null Callid and To Tag

2010-08-04 Thread Pekka Pessi
2010/7/26 Vikas Bhat vikasbhat0...@gmail.com:
 Sofia stack is not able to detect empty/null CallID in INVITE request.
 similarly Sofia is not able to detect empty/NULL TO TAG.
 Ideally Sofia should reject the calls in above scenerios.

I think NTA is supposed to return a 400 response to a request received
from network if CallID header is missing.

On client side, it generates a CallID automatically, if application
has not provided one. Likewise, it generates a random To tag if
application has not provided one.

The To tag is always empty or missing in initial requests; do you
propose that a Sofia should automatically try to clear any call if a
response to an INVITE request contains empty/null To tag?

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Threading - Root problem Newbie

2010-08-04 Thread Pekka Pessi
Hi Rohan,

2010/7/24 rohan kala rohankal...@gmail.com:
 1) I have initialized su_root_create() function in my main() function, now
 do I have to initialize it in callback function or every othe function to
 send request or incoming request etc.. Or I have to just put
 su_root_run(context-c_root) every time when I expect callback function.

The main loop is executed within the su_root_run() function (until one
of your callbacks call su_root_break(context-c_root)

 2) What's the role of su_root_threading() where should I initialize it?

If you create a su_root_t clone (e.g., nua_create() creates one), it
can be executed with the original thread and su_root_t main loop, or
by an separate thread. You can select the mode with
su_root_threading() call before the clone is created.

 3) Once I have created nta_outgoing_tcreate() function and  had sent request
 with it do I have to do nta_outgoing_destroy() before using
 nta_outgoing_tcreate() etc. Or threading can take care of it?

There can be multiple client transactions ongoing, you should call
nta_outgoing_destroy() after you get the final response (or, in case
of INVITE, after you send the ACK to 2XX response).

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Contact header incorrect

2010-08-04 Thread Pekka Pessi
Hi,

2010/7/26 Nauman Sulaiman nauman762-h...@yahoo.co.uk:
 Hi, using Sofia 1.12.10. I have multiple sip accounts, with separate nua 
 handles for each nua_register etc. When i get a nua_i_invite and send a 
 response it seems to pick a contact randomly from sip accounts that i have
 for the contact header. I am switching on the sip_request field to determine
 the account the invite is for then i manually attach SIPTAG_CONTACT_STR  to 
 each nua_respond etc then all is ok.

 But is there a better way i should be doing this?

Unfortunately, no. SIPTAG_CONTACT() is best you can do at the moment.

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Does soa module support “Del ayed Offer” ?

2010-08-03 Thread Pekka Pessi
2010/7/21 edson.gomes.leme edson.gomes.l...@uol.com.br:
 Hi Pekka Pessi;

 a) Does the Sofia-SIP soa module support “Delayed Offer” ?

Yes..

 b) How can this call scenario be implemented with the soa module?

     SOFIA-SIP (soa)
      A (UAC) B (UAS)
     |   |
     |--  INVITE  --|
     |   |
     |---  100 Trying  -|
     |---  180 Ringing  |
     |   |
     |---  200 (offer)  |
     |--  ACK (answer)  |
     |   |

You need nothing special (but the usual remote sdp tags in
nua_i_invite are missing).

 c) How can this call scenario be implemented with the soa module?

        SOFIA-SIP (soa)
             A (UAC)                         B (UAS)
                |                               |
                |--  INVITE  --|
                |                               |
                |---  100 Trying  -|
                |---  180 Ringing  |
                |                               |
                |---  200 (offer)  |
                |--  ACK (answer)  |
                |                               |

Currently, this requires a kludge, you have to include an empty
payload (I think SIPTAG_PAYLOAD_STR() is ok) in nua_invite().

--Pekka

-- 
Pekka.Pessi mail at nokia.com
--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multiple Registration support

2010-07-14 Thread Pekka Pessi
Hi,

2010/7/12 Nauman Sulaiman nauman762-h...@yahoo.co.uk

 Then i tried with 2 different accounts, one Sipgate the other Callcentric. I 
 created 2 separate register handles and separate call back handlers for each 
 handle. I call nua_register twice with the separate handles now.

It should work fine, there is probably something else hosed in your code..


 What i noticed is the REGISTER messages go out to the 2 different providers 
 and i get a 401 back from each one, but my callback handlers are not getting 
 called, its like the stack is not passing these on.
 I also noticed that the REGISTER messages to the 2 differnet providers are 
 getting sent with the same CSEQ number!!! So i assume the stack is getting 
 completely confused with the responses. I assumed that sending nua_register 
 with separate handles would allow each REGISTER transaction to be treated 
 separately and the responses would be routed to the separate handlers.

The CSeq number is generated based on the current time. Two REGISTERs
may have same CSeq as long as their Call-ID header (and tags in From
and To headers) are different.


 Can someone give me a high level description how to set up what i want to, as 
 mentioned i have a single account working fine.

It should work just fine, but you can try to enable more detailed
debugging logging with NUA_DEBUG=9 and NTA_DEBUG=9 environment
variable.

--
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [PATCH] Fix gai_strerror re-declaration in MinGW

2010-07-08 Thread Pekka Pessi
2010/7/8 Stefano Sabatini ssabat...@reilabs.com:
 Exactly, this way the patch is much simpler.

Thanks! Applied.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [PATCH] Fix gai_strerror re-declaration in MinGW

2010-07-07 Thread Pekka Pessi
2010/7/6 Stefano Sabatini ssabat...@reilabs.com:
 Hi, as in subject.

 The patch requires to run autoheader to re-generate the config.h.in
 file.

Thanks for patch. I wonder if it is enough just to #undef
gai_strerror? No need to check its declaration?

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Still no answer to DNS problems

2010-07-07 Thread Pekka Pessi
2010/7/2 Inca Rose incar...@gmail.com:
 I dont know if this only happen to me or I'm not using a configuration flag
 that is document, but I have a very hard time figuring this out.
...
 The problem is that the next REGISTER goes again to 1.2.3.4.
 There is no mechanism that nta can remember that 1.2.3.4 is not answering
 and put it at the bottom of the list and continue to use 1.2.3.5, the
 last one that did respond ?
 In other words, how to force the stack to use from now 1.2.3.5 and not
 1.2.3.4 ???

We would need blacklisting/graylisting for the 1.2.3.4. The current
code implements graylisting for SRV records (by manipulating their
priority, if I recall correctly). However, there is no priority
associated with A records, so we would need a different solution.
Perhaps a list (or binary tree or hash table or ...) of bad IP
addresses/ports/protocols?

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] nua: initializing SIP stack failed

2010-07-07 Thread Pekka Pessi
2010/6/30 Stefano Sabatini ssabat...@reilabs.com:
 Hi all, I'm running this simple code in Windows Vista:
 nta: master transport created
 tport(00F27958) to */*:*/sip
 tport(00F27958): calling tport_listen for udp
 tport(00F27958): new primary tport 00F28128
 tport(00F27958): bind(pf=2 udp/[192.168.0.1]): No such file or directory
 nta: bind(*:*;transport=*): No such file or directory
 nua: initializing SIP stack failed


 Can you suggest what the problem may be?

For some reason binding a socket to IP address 192.168.0.1 fails.
Where the address comes from? Does you Vista box try to share internet
connection?

If you can compile and run localinfo command, see what it prints?

You can also modify

NUTAG_URL(sip:stef...@*:*)

so it explicitly mentions the IP address, e.g.,

NUTAG_URL(sip:stef...@*:*;maddr=10.2.3.4)

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [PATCH] Fix configuration under MinGW

2010-07-06 Thread Pekka Pessi
2010/7/6 Stefano Sabatini ssabat...@reilabs.com:
 this patch fixes the configuration problem as reported here:
 http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/3853

Thanks for the patch.

-CFLAGS=$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \
+CFLAGS=$CFLAGS -I${srcdir}/win32/pthread -DWINVER=0x0501 \

Can you actually compile sofia-sip with this? It seems to me that the
relative srcdir does dot work when make descends deeper into source
tree.

--Pekka

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] I need to send a re-invite with the SDP address set to 0.0.0.0

2010-06-28 Thread Pekka Pessi
2010/6/22 Inca Rose incar...@gmail.com:
 Can someone help me here ?
 I cannot find a way to set the SDP c= line to 0.0.0.0 I a session update (
 re-invite )
 I set the SOA_ADDRESS tag to 0.0.0.0 in the reinvite but the new INVITE
 request keeps sending the c line with the original value.

The c=0.0.0.0 is a magic value for call hold, soa does not want to use it.

 What I'm doing wrong ??

You are not doing anything wrong, but there should be a tag which
would allow you to use c=0.0.0.0 to hold a session.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Is sofia-sip dead?

2010-06-28 Thread Pekka Pessi
2010/6/18 Stefano Sabatini ssabat...@reilabs.com:
 On date Thursday 2010-06-17 01:26:51 -0400, Michael Jerris phoned this:
 sofia-sip is not dead.  The repository is in the process of moving
 to a new repo.  I expect a chunk of patches to be merged in soon, I
 was discussing this with the maintainer last week.

 Mike

 On Jun 16, 2010, at 9:27 PM, Daniel Jabbour wrote:

  Hi,
 
  I am just getting started with a SIP application that I'm writing
  for a personal project. I am getting ready to use Sofia-SIP as my
  app's library. However, I noticed:
 
  * Sofia-Sip's CVS on SF is 18+ months old, and the latest release in CVS 
  was 1.12.9
  * Links on the download page for snapshots, release notes archive, etc are 
  broken
  * The latest packaged source release is 1.12.10
 
  So, if the latest release is greater than the version tagged in
  CVS, where is development taking place? Has the repository moved?
  Is Nokia working entirely in-house? Or is Sofia-SIP dead?
 
  Any thoughts would be greatly appreciated.

 The last darcs commit:
 Tue Sep 29 14:24:17 CEST 2009  Pekka Pessi first.l...@nokia.com

  Bug report and original patch by Timo Bruhn.

 and there hasn't been much activity from the maintainers in the last
 months and the project somehow didn't managed to get a significant
 community of developers/contributors.

 That said, there are many projects depending on sofia-sip, so I hope
 that there will be enough interest to keep the project alive and
 possibly make it better, switching to a less obscure SCCS may help.

Well, yes, we are currently trying to switch over to git. The git
repository is available at

http://gitorious.org/sofia-sip

The master branch currently contains the more or less the same commits
as the darcs repository at sofia-sip.org. It would be useful to
mention also that on the sf.net.

The next features (and bug fixes) mostly involve DNS resolving and
transport handling. There seems to be some nasty bugs in transport
handling that might be hard to fix unless some backwards-incompatible
changes are made. At the same time it would me nice to get
multiprocessing support and perhaps complete the hooks for a SigComp
library.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Remove an unknown sip header

2010-03-30 Thread Pekka Pessi
2010/3/26 Alexandre Brito abr...@av.it.pt:
 I flowing through sofia sip documentation/code trying to find the best way to 
 remove an unknown sip header.
 I found that its easy to add any header my using SIPTAG_HEADER_STR or even 
 SIPTAG_HEADER(x) by define a new header struct.

 However, what's the best option to remove those kind of headers from a sip 
 message?

I don't think it is possible when using the tags.

 Should I create a new SIPTAG around the new header, for instance 
 SIPTAG_P_CHARGING_VECTOR()? What are my options?

You have to either go through the list of unknown headers explicitly,
or define your own header parser class object. See the sofia-sip-2543
package for examples. If you feel like it, a sofia-sip-3455 package
would probably be appropriated by many folks here.

-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] SIP_PAYLOAD_STR first byte 0x00 always causes 0 length content.

2010-03-17 Thread Pekka Pessi
2010/3/12 Trevor Nunes trevor.nu...@gmail.com:
 The problem is I can send any type of content I want as long as the first
 byte is not 0x00 ... If this byte is 0x00 it will send a 0 byte SIP message
 out.  So for example here is a short message that works perfectly, If I
 change the payload[0] = 0x02 line to payload[0] = 0x00 an empty Content
 Length is generated ...


 --
   nua_handle_t *h;
   static int lastSequenceNum = -1;
   char payload[5];

   payload[0] = 0x02;
   payload[1] = 0x07;
   payload[2] = 0x01;
   payload[3] = gMOSMS_seqnum  2;
   payload[4] = '\0';


   printf(smsagent: Sending L2-ACK with seq: %d \n, gMOSMS_seqnum );

   if( lastSequenceNum == gMOSMS_seqnum)
   {
     printf(smsagent: duplicate seq: %d \n, gMOSMS_seqnum );
   }

   // send_3ggp2_sms(nua, payload );

   h = nua_handle(nua, NULL, SIPTAG_TO_STR(gREMOTE_CLIENT_TAG), TAG_END() );
   nua_message(h, SIPTAG_CONTENT_TYPE_STR(application/vnd.3gpp2.sms),
 SIPTAG_PAYLOAD_STR( payload ), TAG_END() );
   nua_handle_destroy(h);

 I guess I need to use a different macro that doesn't treat the payload as a
 string or initialize an empty SIP message and cast the pl_data pointer to my
 new message ? Should I just malloc() a bunch of bytes and assign this to
 pl_data and set pl_en  even so I'm still using the SIPTAG_PAYLOAD_STR()
 macro so is there way of creating a nua_message where it will treat the
 pl_data not as a string ?

Yes, you are correct - you need to use the tag macro SIPTAG_PAYLOAD()
with a pointer to initialized sip_payload_t structure as its argument.
For example,

nua_handle_t *h;
static int lastSequenceNum = -1;
char payload[5];

payload[0] = 0x02;
payload[1] = 0x07;
payload[2] = 0x01;
payload[3] = gMOSMS_seqnum  2;
payload[4] = '\0';

printf(smsagent: Sending L2-ACK with seq: %d \n, gMOSMS_seqnum );

sip_payload_t pl = SIP_PAYLOAD_INIT();
pl.pl_data = payload;
pl.pl_len = sizeof payload;

h = nua_handle(nua, NULL, SIPTAG_TO_STR(gREMOTE_CLIENT_TAG), TAG_END() );
nua_message(h, SIPTAG_CONTENT_TYPE_STR(application/vnd.3gpp2.sms),
  SIPTAG_PAYLOAD(pl), TAG_END() );
nua_handle_destroy(h);

-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] simple memory allocation question

2010-03-17 Thread Pekka Pessi
2010/3/16  beach...@me.com:
 Just to make sure I am not doing something wrong, my home gets allocated when 
 my program starts, and I do not destroy it until my (long running) program 
 ends.  So although it would not be a true memory leak it sounds like it would 
 cause memory growth if I do not free it, and thus I would be better to free 
 it immediately after nta_incoming_reply(), is that correct ?

Yes, that is right.

 BTW, while we are on the subject of memory allocation, I am also using 
 messages using su_msg_create() to send msgs between my root and clone tasks, 
 where I use the feature to have some user-specified data area allocated with 
 the message, and I never explicitly need to free that memory, correct?

Yes, you are correct. The data-area is allocated with a single
malloc() along with the main su message.

--Pekka


-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] simple memory allocation question

2010-03-16 Thread Pekka Pessi
2010/3/15  beach...@me.com:
 Simple questionwhen I use sip_X_make( home, char *) and then attach that 
 header to a response message I am sending via nta, do I need to explicitly 
 su_free that header?  i.e.

 sip_contact_t *c1 = sip_contact_make( home, szContact1 ) ;
 nta_incoming_treply( irq, SIP_300_MULTIPLE_CHOICES,  SIPTAG_CONTACT( c1 ), 
 TAG_END() ) ;
 //DO I NEED TO su_free this?

Nope, it will be freed when your home is destroyed/unref:ed.

 If I do need to free it, can I do so immediately after calling 
 nta_incoming_reply?

You can do it immediately after calling nta_incoming_reply().

-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] FYI: Back again

2010-03-12 Thread Pekka Pessi
Hello all,

As you might have noticed I've not spent much time with Sofia SIP
lately. However, Sofia SIP has not been abandoned completely. From now
on, I have reserved some time specifically to maintaining Sofia SIP
and following this mailing list.

-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] SIP_PAYLOAD_STR first byte 0x00 always causes 0 length content.

2010-03-12 Thread Pekka Pessi
2010/3/11 Trevor Nunes trevor.nu...@gmail.com:
 I'm trying to send encapsulated 3GPP2 MO-SMS ( CDMA text message ). To do
 this the first byte of the payload must be 0x00, if I use SIP_PAYLOAD_STR(
 data ) and first byte is zero it seems to truncate assuming the 0x0 is a
 NULL terminator.

 I've tried using SIP_PAYLOAD( sip_payload_t my_payload ) but not making much
 progress. I can successfully generate L2-ACK's since the first byte is
 always 0x02.

 void send_3gpp2_sms_mo(nua_t *nua, sip_t const *sip)
 {
  nua_handle_t *h;
  sip_payload_t payload = SIP_PAYLOAD_INIT;

  char mo_payload[] =  {
    0x00, 0x00, 0x10, 0x02   // P2P MSG + Teleservice ID
   ,0x04, 0x02, 0x02, 0x07
   ,0x62, 0x69, 0x69, 0x69   // Phone number garbled for email!
   ,0x80, 0x55, 0x01, 0x06
   ,0x08, 0x38, 0x00, 0x16
   ,0x20, 0x03, 0x50, 0x0d
   ,0x03, 0x01, 0x0d, 0x10
   ,0x0a, 0x50, 0x40, 0x01   // Tele Type
   ,0x07, 0x0e, 0x09, 0x05   // Callback and other crap
   ,0x2a, 0x1a, 0x4c, 0x3c
   ,0x00, 0x80, '\0'
     };

   fprintf(stderr,smsagent: Tx SMS to phone \n);
   h = nua_handle(nua, NULL, SIPTAG_TO_STR(gREMOTE_CLIENT_TAG), TAG_END() );
   nua_message(h, SIPTAG_CONTENT_TYPE_STR(application/vnd.3gpp2.sms),
 SIPTAG_PAYLOAD( payload ), TAG_END() );
   nua_handle_destroy(h);

 }

 So how can I generate a byte sequence where the first byte is zero and have
 it correctly determine the length of the payload?  Is there an example of a
 direct sip_payload_t .pl_data  memcpy or similar that I can get working ?

Probably there are, but all you have to do is to initialize pl_data
with data pointer and pl_len with its length.

--Pekka


-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] suppress Content Disposition

2010-03-12 Thread Pekka Pessi
2010/3/8 Ronny Aruch ro...@vocaltec.com:
 I use sofia 1.12.8.

 How can I suppress Content Disposition header from being sent.
 I added SIPTAG_CONTENT_DISPOSITION(NULL)to NUA_INVITE but the header is
 still sent.


It seems to me that there is no way to do that above the API, you have
to hack inside the stack.

-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Please, make the sigcomp plugin for sofia-sip free software

2010-03-12 Thread Pekka Pessi
2010/3/9 Aleksander Morgado aleksan...@gnu.org:
 My humble request is then, please make the sigcomp plugin for sofia-sip
 free software, publicly available for everyone, so that we can keep on
 developing applications using the sofia-sip stack also including SigComp
 support.

I'll have a peek on the libraries and see if one of them could be used
with reasonable effort. However, there might be some legal issues,
too, so I can't promise anything.

-- 
Pekka.Pessi mail at nokia.com

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Fw: Changing IP address.

2009-10-02 Thread Pekka Pessi
2009/10/2 Robert Han robert...@vtech.ca
 I just want to raise the issue that we asked you earlier back in July 31 (see 
 below).

 You said that if we shutdown the sofia stack, and if there are outstanding 
 sip sessions (for example 4 active sessions), we do not need to nua_bye() or 
 even nua_handle_destroy() before invoking nua_shutdown().

 according to your reply, the nua stack is guaranteed to terminate outstanding 
 nua operations, and then publish nua_i_terminate as the final event with a 
 operation handle, so that we can destroy that handle.

 that never happened.

That *should* happen. however, the IP address change also means that
all the TCP connections and the UDP sockets bound to the old IP
address become useless. Do you include maddr= parameter in the
NUTAG_URL() in nua_create()?

--Pekka

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] 64-bit issue in sofia-sip (patch)

2009-09-24 Thread Pekka Pessi
2009/9/24 Aleksander Morgado sofia-sip-de...@aleksander.es:
 We just faced an issue happening only in 64-bit architecture, and found that
 it was already fixed by FreeSWITCH guys in their own sofia-sip repo:
 http://jira.freeswitch.org/browse/SFSIP-136

 It seems the fix is not included in the official repo, which would be good
 to have.

Thanks for noticing this. I've applied Stephan's patch.


-- 
Pekka.Pessi mail at nokia.com

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] New release schedule?

2009-09-24 Thread Pekka Pessi
2009/9/23 Aleksander Morgado sofia-sip-de...@aleksander.es:
 Is there any planned date for a new stable (1.12.11) release of sofia-sip?

My current plan is to make a next release after we (Maemo devices
within Nokia) have stable Maemo 5 release. That should happen Real
Soon Now. However, there are few patches by Mikhail Zabaluev, who is
responsible for telepathy-sofiasip, that I'd like to include in the
stable release.

At the same time I'm planning to ditch Darcs as the principal VCS and
start using git. I'll have to check if it is possible to host
sofia-sip on maemo.org or should I set up something different.

-- 
Pekka.Pessi mail at nokia.com

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Question aboiut NTA and sip_t

2009-09-24 Thread Pekka Pessi
2009/9/9 Daniel Corbe dco...@gmail.com:
 When NTA receives a request which doesn't match an existing transaction it 
 passes a pointer to the callback function of type sip_t.  Can this pointer be 
 dereferenced through the lifetime of the transaction or does it go poof as 
 soon as I exit the callback function?

As Aleksander said, you can use sip_t as long as the transaction is alive.

The sip_t pointer lives inside an abstract msg_t container and you can
also get a new reference to it with nta_incoming_getrequest(). After
you are done with your sip_t / msg_t reference, you should remove the
reference with msg_destroy().

-- 
Pekka.Pessi mail at nokia.com

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sresolv: DNS response code 5 (refused) not handled / Fallback to second DNS server not working

2009-09-24 Thread Pekka Pessi
2009/9/18 Timo Bruhn voip_v...@web.de:
 [...] When sofia-sip tries to register its user agents at startup, the first 
 dns server is used
 to resolve the server name. The server refuses the request. Now the expected 
 behaviour
 should be a fallback to the second server. Unfortunately this never happens.

Yes, the fallback is probably the right thing to do.

 One way to fix this is to mark the server as temporarily unavailable as I did 
 in the patch
 attached to this mail. The fix is working fine in my test environment.

 Could anyone of the developers please have a look at it to verify that it 
 does not break
 anything else i did not see?

It should not break anything, or at least I don't think it does, but
here is my patch that also falls to the next server on server error
and
 not implemented error. Please give it a try, and report if it fixes
your problems (or crashes and burns), too.

-- 
Pekka.Pessi mail at nokia.com
--- old-sofia-sip/libsofia-sip-ua/sresolv/sres.c	2009-09-24 13:16:38.0 +0300
+++ new-sofia-sip/libsofia-sip-ua/sresolv/sres.c	2009-09-24 13:16:38.0 +0300
@@ -3503,6 +3503,14 @@
 sres_send_dns_query(res, query);
 query-q_retry_count++;
   }
+  else if (error == SRES_AUTH_ERR ||
+	   error == SRES_UNIMPL_ERR ||
+	   error == SRES_SERVER_ERR) {
+dns-dns_icmp = res-res_now;
+sres_cache_free_answers(res-res_cache, reply);
+/* Resend query/report error to application */
+sres_resend_dns_query(res, query, 0);
+  }
   else if (!error  reply) {
 /* Remove the query from the pending list */
 sres_remove_query(res, query, 1);
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Modify sofsip cli to work with PCMA instead of PCMA

2009-09-24 Thread Pekka Pessi
2009/9/14 fabien comte comte_fab...@yahoo.fr
 I want sofsip cli works with PCMA instead of PCMU. How to modify it ?

Just in case you have not figured out it yet: you have to change the
RTP payload type on m= line to 8, too. The rtpmap should work,
provided the payload number on m=audio line and a=rtpmap are same, at
least in principle, but most implementations just look the payload
type number for well-known codecs like PCMU or PCMA.

 I modified ssc_media_gst.c [...] I tryed
 -
   self-sm_pt = 8; /* PT=0 = PCMA */
   /* step: initialize the PT-caps hash table */
   pt_caps = gst_caps_new_simple (application/x-rtp,
  clock-rate, G_TYPE_INT, 8000,
  encoding-name, G_TYPE_STRING, PCMA,
  NULL);

   /* step: describe capabilities in SDP terms */
   /* support only G711/PCMA */
   caps_sdp_str = su_strcat(home, caps_sdp_str,
   v=0\r\n
   m=audio 0 RTP/AVP 0\r\n
   a=rtpmap:8 PCMA/8000\r\n);

   m=audio 0 RTP/AVP 8\r\n
   a=rtpmap:8 PCMA/8000\r\n);

   *dest = strdup(caps_sdp_str);
   su_free(home, caps_sdp_str);
 It does not work (FAILED with 501 Not Implemented Yet)

--
Pekka.Pessi mail at nokia.com

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Wrong answer from sofia-sip

2009-09-24 Thread Pekka Pessi
2009/8/26 Bernhard Suttner sutt...@comdasys.com:
 attached the network trace. You have to decode the first paket as SIP in 
 Wireshark (destination ip).

Contact is used when the callee send caller a BYE request (or OPTIONS
or UPDATE or INFO etc...).

The RFC 3261 (section 18.2.1) specifies how to send the response:
unless you happen to have maddr parameter, the response is sent to the
source address, which is 10.251.0.1. If you can include a maddr
parameter in the incoming INVITE Sofia should send the response to the
address specified in maddr parameter. So you could have request like
this:

INVITE sip:757-2...@10.251.0.101:12004 SIP/2.0
Via: SIP/2.0/UDP 10.27.0.60:5060;branch=z9hG4bK3745033304-3162;maddr=10.27.0.60
From: Aman DECT sip:7074...@10.23.0.203:5060;tag=shorUA_3745033458-3162
To: 757-2026 sip:757-2...@10.23.0.203
Contact: Aman DECT sip:7074...@10.27.0.60:5060
...

and Sofia would respond like this (to 10.27.0.60):

SIP/2.0 100 Trying
Via: SIP/2.0/UDP
10.27.0.60:5060;branch=z9hG4bK3745033304-3162;maddr=10.27.0.60;received=10.251.b0.1
From: Aman DECT sip:7074...@10.23.0.203:5060;tag=shorUA_3745033458-3162
To: 757-2026 sip:757-2...@10.23.0.203
...



--Pekka

 -Ursprüngliche Nachricht-
 Von: Michael Jerris [mailto:m...@jerris.com]
 Gesendet: Mittwoch, 26. August 2009 16:53
 An: sofia-sip-devel
 Betreff: Re: [Sofia-sip-devel] Wrong answer from sofia-sip

 Can you paste the actual sip trace here.

 Mike

 On Aug 26, 2009, at 6:45 AM, Bernhard Suttner wrote:

 Hi,

 I have the following problem (using sofia sip 1.12.9):

 A (non sofia-sip) sends INVITE to B (user agent with sofia-sip)
 B send back a Trying
 B send Ringing and then a 200 OK

 Most important data for the INVITE from A:
 Src IP: 10.251.0.1
 Dest IP: 10.251.0.101
 Contact: 10.27.0.60

 The Trying generated from sofia-sip has the data:
 Src IP: 10.251.0.101
 Dest IP: 10.251.0.1
 VIA: SIP/2.0/UDP 10.27.0.60;branch=ydfasfasfsf;received=10.251.0.1

 The problem is, that B use the IP 10.251.0.1 as destination and not
 the
 contact of the INVITE (that would be 10.27.0.60). Also in the RINGING
 and 200 OK sofia-sip will use the Src-IP and not the Contact addr.

 Can I somehow configure sofia-sip in that way, that it will use the
 CONTACT addr instead of the Src IP?

 Thanks in advance!

 Best regards,
 Bernhard Suttner

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day
 trial. Simplify your report design, integration and deployment - and
 focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Sofia-sip-devel mailing list
 Sofia-sip-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Sofia-sip-devel mailing list
 Sofia-sip-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Sofia-sip-devel mailing list
 Sofia-sip-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel





-- 
Pekka.Pessi mail at nokia.com

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Mac OS X 10.6 build problems

2009-09-24 Thread Pekka Pessi
Any news on this? Perhaps you have something in /usr/local/lib linking
to iconv? What is the intl library?

Try grep -l iconv /usr/lib/* /usr/local/lib/* ...

--Pekka


2009/9/1 Michael Jerris m...@jerris.com:
 I am chasing down this same issue on my box.  I should have fixes sometime
 this week and will push patches for them when I have them.  Note, I did have
 a successfull snow lep build a few weeks back before they did gold master on
 a different box, still trying to chase down what changed sense then.
 Mike
 On Aug 31, 2009, at 7:03 PM, Daniel Corbe wrote:

 gmake[3]: Leaving directory
 `/usr/local/src/sofia-sip-1.12.10/libsofia-sip-ua-glib/su-glib'
 gmake[3]: Entering directory
 `/usr/local/src/sofia-sip-1.12.10/libsofia-sip-ua-glib'
 /bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o
 libsofia-sip-ua-glib.la -rpath /usr/local/lib -version-info 3:0:0
  su-glib/libsu-glib.la -L/usr/local/lib -lglib-2.0 -lintl   -lssl -lcrypto
 -lz   -lpthread
 mkdir .libs
 grep: /usr/lib/libiconv.la: No such file or directory
 sed: /usr/lib/libiconv.la: No such file or directory
 libtool: link: `/usr/lib/libiconv.la' is not a valid libtool archive
 gmake[3]: *** [libsofia-sip-ua-glib.la] Error 1
 gmake[3]: Leaving directory
 `/usr/local/src/sofia-sip-1.12.10/libsofia-sip-ua-glib'
 gmake[2]: *** [all-recursive] Error 1
 gmake[2]: Leaving directory
 `/usr/local/src/sofia-sip-1.12.10/libsofia-sip-ua-glib'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory `/usr/local/src/sofia-sip-1.12.10'
 gmake: *** [all] Error 2
 sh-3.2# cd /usr/lib
 sh-3.2# ls *iconv*
 libiconv.2.4.0.dylib    libiconv.2.dylib        libiconv.dylib

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.
  http://p.sf.net/sfu/bobj-july___
 Sofia-sip-devel mailing list
 Sofia-sip-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Sofia-sip-devel mailing list
 Sofia-sip-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel





-- 
Pekka.Pessi mail at nokia.com

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] nua: call termination after INFO-timeout

2009-07-07 Thread Pekka Pessi
2009/7/7 Stefan Eckel stefan.ec...@c4b.de:
 Some time ago I posted a question about handling the timeout problem with
 INFO messages.

 See: http://article.gmane.org/gmane.comp.telephony.sofia-sip.devel/3402

 We now found a solution, with a simple modification:
...
 I don’t know whether the solution is suitable for public project. We havn’t
 found any disadvantates so far.

Sorry about that, sip_response_terminates_dialog() and how it is used
by nua should be documented better.

INFO is somewhat problematic, the Freeswitch project have turned it as
a generic.purpose method (iow it behaves pretty much like MESSAGE, and
it does not anything to do with INVITE-initiated session. Probably
what is best way to go in a public project.

-- 
Pekka.Pessi mail at nokia.com

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


  1   2   3   4   5   6   >