Re: [Sofia-sip-devel] Custom Headers in 200 OK to UPDATE requests Freeswitch

2024-09-02 Thread Andreas Wehrmann

On 02.09.24 11:59, Souradeep Bera wrote:

Hello,
I need to pass some custom headers from Freeswitch in the 200 OK 
response sent for an incoming UPDATE request. But I think the sofia 
sip stack is automatically sending the response, not even allowing me 
to add any custom headers from mod_sofia. Is there anyway I can 
achieve this?

My SIP flow is something like

Freeswitch                        Remote Trunk
INVITE               ->
                          <-- 100 (INVITE)
                          <-- 183 (INVITE)
                          <-- UPDATE
200 (UPDATE). -->
                           <-- 200 (INVITE)
ACK                   >

I require custom headers in the 200 OK sent from Freeswitch to the 
remote trunk for the update request




Hey there,
I think you'd have to ask on the Freeswitch mailing list/forum whether 
that is possible from within Freeswitch.

This list is about the SIP stack only, though it's pretty dead nowadays.

Best regards,
Andreas



___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Reading custom SIP headers

2016-08-29 Thread Andreas Wehrmann
On 08/29/2016 08:32 AM, John Nash wrote:
> I am looking for some way to read value of a custom SIP header (starting
> with X-). I have access to object ssip_t. Which function I can use to
> extract custom SIP header and use its value?
>
>
>
> --
>
>
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

The sip structure contains a member of 'sip_unknown'.
You can use it like this to iterate custom (or "unknown") SIP headers:

sip_unknown_t* unknown_header = sip->sip_unknown;
while( unknown_header )
 {
 if( 0 == strcmp( unknown_header->un_name, "X-MyCustomHeader" ) )
 {
 /* whatever... */
 }

 unknown_header = unknown_header->un_next;
 }

Regards


--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] [FIX] crash when querying adapter addresses failed (Windows)

2016-02-17 Thread Andreas Wehrmann
During long and heavy testruns I encountered seemingly random crashes 
running on Windows 7.
I tracked the problem down to the function

static int win_localinfo(su_localinfo_t const hints[1], su_localinfo_t 
**rresult);

which resides in su_localinfo.c.

If the call to GetAdapterAddresses() fails, the function tries to use 
FormatMessage()
to get an error string to print out.
Unfortunately, the call to FormatMessage() specifies an illegal buffer:

if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
msg, 0, NULL))
 msg = empty;

It SHOULD be:

if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&msg, 0, NULL))
 msg = empty;

Earlier in the function it says:

char const* empty = "";
LPTSTR msg = empty;

Calling FormatMessage() and specifying a pointer to empty (assignment)
is obviously illegal as it requires the address to a pointer.


Best regards,
Andreas


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
___
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_unsubscribe

2015-06-01 Thread Andreas Wehrmann
I've never used the subscription mechanism before, but you might try to 
use NUTAG_M_USERNAME(x).

Regards,
Andreas

On 06/01/2015 11:41 PM, Johannes Bauer wrote:
> Hi everybody!
>
> Fisrt I want to thank you developers for your excelent work on this SIP 
> framework, But as you sure can guess, I have a problem.
> I am using sofia sip to get notified when a busy callee is ready again, using 
> a SUBSCRIBE for a dialog event.
> The first SUBSCRIBE works perfectly, I get a NOTIFY "confirmed" for 
> subscribing and the NOTIFY "terminate" from the callee, when the current call 
> has ended. However when I want to unsubscribe i get error 404 from the callee.
> It seems that the user of the SUBSCRIBE Request is missing. It should be 
> "sip:test@192.168.90.100" but only "sip:192.168.90.100" is sent on the 
> SUBSCRIBE with expire 0.
>
> code looks like this:
>
>   case nua_i_notify:
>
>   
>
>   printf("Notify received, status: %d, %s\n", status, phrase);
>
>   state_start = 0;
>   state_end = 0;
>   state_start = strstr(sip->sip_payload->pl_data, "");
>   state_end = strstr(sip->sip_payload->pl_data, "");
>
>   if((state_start) && (state_end))
>   {
>  state_start += 7; // start after 
>  strncpy_s(state, sizeof(state), state_start, state_end - 
> state_start);
>  printf("state changed to %s\n",state);
>
>  if (!strcmp(state, "terminated"))
>
>  {
> nua_unsubscribe(nh, SIPTAG_EVENT_STR("dialog"), 
> TAG_END());
>
>
> Is it necessary to make a new nua_handle for the unsubscribe.
> When is it necessary to genereate a new handle for operations?
>
> Kind regards
>
>
> --
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] nua_handle_has_register() not working

2014-10-01 Thread Andreas Wehrmann
Hi!

I discovered, that nua_handle_has_register() always returns 0
even when the handle has been used with nua_register()/nua_unregister().

 From what I can see in the code, the same goes for 
nua_handle_has_subscribe() but not for nua_handle_has_invite().
It looks as if the call to nua_stack_set_handle_special() in the client 
transaction has simply been forgotten?

The FreeSwitch fork seems to have the same issue.

Regards,
Andreas


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Session timer stops when receiving '491 Request pending'

2014-09-23 Thread Andreas Wehrmann
Subject says it all.
I ran into an issue with a buggy Asterisk
where the re-INVITE (refresh) from my app would overlap with a re-INVITE 
from the Asterisk.
Both parties respond with '491 Request pending' and that's it.

The bug in Asterisk is that it never actually retries the re-INVITE 
(yes, it's a very old version; no, an upgrade is _not_ possible *grrr*).

The effect is, that I've got a dangling call (re-INVITE from Asterisk 
came because the caller hung up)
because my application only hangs up calls if some kind of higher level 
error occurs.

When I understand RFC3261 correctly, the UAC must retry the request 
after some time and since (again: if I understand correctly)
the UAC/UAS roles are transaction based: Shouldn't BOTH parties retry 
their INVITE requests?

I'll have to backport the fix in Asterisk but isn't this a problem in 
Sofia, too?

Regards,
Andreas


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Request specific handle?

2014-09-09 Thread Andreas Wehrmann
Hi!

Is there a way to somehow provide an outgoing request with a 
context/magic specific to that request?
In my case, the user application shall be able to send SIP INFO requests 
inside an active call.
The application provides a "request_status" callback in which the final 
response of the request is to be delivered.
I have to assume that the application wants to send a couple of SIP INFO 
requests shortly after one another.
I've got a nua handle magic, but that one is for the entire call.

I was thinking of something like this:

struct info_ctxt
{
 my_callback_t cb;
};

void sendInfo( my_callback_t cb,  )
{
 info_ctxt = (info_ctxt*)malloc( sizeof( info_ctxt ) );
 info_ctxt->cb = cb;

 nua_info( nua_handle,
NUTAG_RMAGIC_REF( info_ctxt ),
.,
TAG_END() );
}

void sofia_callback(  )
{
 switch( event )
 {
 ...
 case nua_r_info:
 {
 info_ctxt* ctxt = NULL;
 tl_gets( tags, NUTAG_RMAGIC_REF( ctxt ), TAG_END() )
 
 }
 ...
 }
}

Am I dreaming, or do I have to implement my own queue and send INFO 
requests after getting nua_r_info
when a preceding request has completed?

Best regards,
Andreas


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
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 change media mode in active call?

2014-09-04 Thread Andreas Wehrmann

On 09/04/2014 03:19 PM, Michael Jerris wrote:
> You can do the actual sdp structure as well.  For sure you will need the m 
> lines in the sdp, if you do the structure, it can be sparse just like the 
> string.
>
>

I rewrote my function to create the SDP as string and supply it to NUA 
using USER_SDP_STR,
that works just fine.

Another question though:

I tried to use SOATAG_LOCAL_SDP and SOATAG_REMOTE_SDP within my 
nua_i_state callback,
but it gives me an assertion:

WARNING: tag soa::remote_sdp directly used by tl_gets()
Assertion failed: tt->tt_class == ref_tag_class

Is it illegal to use these tags in that context?
Their _REF version are working.

How would I get the structure to the local SDP when I'm not in the 
nua_i_state callback?
Would I use soa_get_local_sdp() using the session object directly from 
the nua handle?
I mean like so:

soa_get_local_sdp( nua_handle->nh_soa, &l_sdp, NULL, NULL );

I don't feel safe accessing members of the nua handle directly, that's 
why I'm asking.

Thanks a lot,

Andreas


--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Typo in soa_tag.h

2014-09-04 Thread Andreas Wehrmann
Hi!

I just came across a problem that prevents the use of 
SOATAG_LOCAL_SDP_STR_REF.
In soa_tag.h this

SOFIAPUBVAR tag_typedef_t soatag_session_sdp_str_ref;

should be

SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str_ref;

MSVC complained about the undeclared identifier 
'soatag_local_sdp_str_ref' when
I used the tag with tl_gets while handling nua_i_state.

The current Freeswitch master seems to have the problem also.

Regards,

Andreas

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
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 change media mode in active call?

2014-09-04 Thread Andreas Wehrmann
Alright, from the beginning:

---
That's how I create the stack:

sip_stack = nua_create( sip_root,
sip_evt_dispatcher,
reinterpret_cast< nua_magic_t* >( this ),
TAG_IF( (! uas_id.empty()), SIPTAG_USER_AGENT_STR( 
uas_id.c_str() ) ),
SIPTAG_ALLOW_STR( 
"INVITE,ACK,CANCEL,BYE,OPTIONS,PRACK,UPDATE,MESSAGE" ),
NUTAG_URL( my_url.c_str() ),
TAG_END() );

---
Placing a call involves these calls:

nh = nua_handle( sip_stack, reinterpret_cast< nua_hmagic_t* >( this ),
 SIPTAG_TO( to ),
 TAG_IF( (NULL != from), SIPTAG_FROM( from ) ),
 TAG_IF( ((NULL == from) && (strlen(from_user ? from_user : 
"") > 0)), NUTAG_M_USERNAME( from_user ) ),
 TAG_IF( session_timer.useSessionTimer(), 
NUTAG_SESSION_REFRESHER( nua_local_refresher ) ),
 TAG_IF( session_timer.useSessionTimer(), NUTAG_MIN_SE( 
session_timer.minimumSessionExpires() ) ),
 TAG_IF( session_timer.useSessionTimer(), 
NUTAG_SESSION_TIMER( session_timer.sessionExpires() ) ),
 TAG_IF( session_timer.useSessionTimer(), 
NUTAG_REFRESH_WITHOUT_SDP( 1 ) ),
 TAG_END() );


nua_invite( nh,
TAG_IF( (! additional_header_str.empty()), SIPTAG_HEADER_STR( 
additional_header_str.c_str() ) ),
SOATAG_USER_SDP_STR( sdp_os.str().c_str() ),
SOATAG_RTP_SELECT( SOA_RTP_SELECT_COMMON ),
TAG_END() );

---
Accepting a call looks like this:

nua_respond( reinterpret_cast< nua_handle_t* >( call_id() ),
 status_code,
 sip_status_phrase( status_code ),
 TAG_IF( strlen( sdp_str ), SOATAG_USER_SDP_STR( sdp_str ) ),
 TAG_IF( (! aux_codecs.empty()), SOATAG_AUDIO_AUX( 
aux_codecs.c_str() ) ),
 TAG_IF( strlen( reason_str ), SIPTAG_REASON_STR( reason_str ) 
),
 TAG_IF( use_session_timer, NUTAG_SESSION_REFRESHER( 
nua_local_refresher ) ),
 TAG_IF( use_session_timer, NUTAG_MIN_SE( 
session_timer.minimumSessionExpires() ) ),
 TAG_IF( use_session_timer, NUTAG_SESSION_TIMER( 
session_timer.sessionExpires() ) ),
 TAG_IF( use_session_timer, NUTAG_REFRESH_WITHOUT_SDP( 1 ) ),
 TAG_END() );

---
My first (naive) attempt was trying to update the media mode like so:

std::string sdp_media_mode_line( "a=" );
sdp_media_mode_line.append( media_mode.sdp_str() );
nua_invite( reinterpret_cast< nua_handle_t* >( call_id() ),
SOATAG_USER_SDP_STR( sdp_media_mode_line.c_str() ),
TAG_END() );

Of course this doesn't work since SOA doesn't know what media that attribute 
belongs to...
I didn't try to include the media line (yet).

What I'm basically trying to do is to change a certain attribute for all media 
of a certain type at once.
Is there a more elegant way than USER_SDP_STR, or is it the recommended way to 
go?


Regards,

Andreas


03.09.2014, 15:23, "Michael Jerris" :
>  I know it works with USER_SDP_STR, what exactly is your call to 
> update/invite?  are you doing ACTIVE_AUDIO(1) ?
>
>  On Sep 3, 2014, at 9:13 AM, Andreas Wehrmann  wrote:
>>   Hi!
>>
>>   I'm somewhat at a loss here.
>>   I'm in a SIP call that I made or accepted with one of
>>   a=[inactive|recvonly|sendonly|sendrecv] in the SDP.
>>   There is only one media (audio).
>>   When I make or answer a call, I create the complete SDP and provide it
>>   to nua with SOATAG_USER_SDP_STR which is working just fine.
>>
>>   Now I would like to be able to change the media mode mid-call using the
>>   same SDP as before with a new media mode setting, but how do I do that?
>>   I tried calling nua_update/nua_invite using SOATAG_ACTIVE_AUDIO but it
>>   was to no avail.
>>
>>   Is SOATAG_ACTIVE_AUDIO the way to go or should I be doing something
>>   different?
>>
>>   Any help is appreciated.
>>
>>   Best regards,
>>   Andreas

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
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 change media mode in active call?

2014-09-03 Thread Andreas Wehrmann

On 09/03/2014 03:13 PM, Andreas Wehrmann wrote:
> Hi!
>
> I'm somewhat at a loss here.
> I'm in a SIP call that I made or accepted with one of
> a=[inactive|recvonly|sendonly|sendrecv] in the SDP.
> There is only one media (audio).
> When I make or answer a call, I create the complete SDP and provide it
> to nua with SOATAG_USER_SDP_STR which is working just fine.
>
> Now I would like to be able to change the media mode mid-call using the
> same SDP as before with a new media mode setting, but how do I do that?
> I tried calling nua_update/nua_invite using SOATAG_ACTIVE_AUDIO but it
> was to no avail.
>
> Is SOATAG_ACTIVE_AUDIO the way to go or should I be doing something
> different?
>
> Any help is appreciated.
>
> Best regards,
> Andreas
>
>
>
>

I forgot to mention, that the SDP sent out when calling 
nua_update/nua_invite is not even the original SDP but a new minimal SDP
that doesn't seem to reflect the current state of the call/media.



--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] How to change media mode in active call?

2014-09-03 Thread Andreas Wehrmann
Hi!

I'm somewhat at a loss here.
I'm in a SIP call that I made or accepted with one of 
a=[inactive|recvonly|sendonly|sendrecv] in the SDP.
There is only one media (audio).
When I make or answer a call, I create the complete SDP and provide it 
to nua with SOATAG_USER_SDP_STR which is working just fine.

Now I would like to be able to change the media mode mid-call using the 
same SDP as before with a new media mode setting, but how do I do that?
I tried calling nua_update/nua_invite using SOATAG_ACTIVE_AUDIO but it 
was to no avail.

Is SOATAG_ACTIVE_AUDIO the way to go or should I be doing something 
different?

Any help is appreciated.

Best regards,
Andreas



--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] any way to bind client to specific interface(eth/wlan).

2014-08-02 Thread Andreas Wehrmann

On 08/02/2014 02:08 AM, Luca Olivetti wrote:
> El 02/08/14 00:28, Nikos Balkanas ha escrit:
>
>>  Oh, and the other patches are needed too
>>
>>  http://code.google.com/p/danube-voip/source/browse/sofia-sip/patches/
>>
>>  Bye
>>  --
>>   Luca
>>
>>
>> ​Any reason why these were never commited to main branch?
> No idea, but (and I could be wrong) I suppose the original developers
> have abandoned the project, given what happened with nokia.
>
>

Does anyone of the FreeSwitch guys have commit-access to the Sofia 
repository?
Maybe with their help we could update and improve Sofia's main branch.


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] any way to bind client to specific interface(eth/wlan).

2014-08-01 Thread Andreas Wehrmann

On 08/01/2014 08:17 AM, Saiyam Doshi wrote:
> Hello,
>
> In nua_create(), providing NUATAG_URL("sip:*:*") is taking 127.0.0.1 as 
> client iP, if i call nua_create prior to any interface available(Ethernet an 
> Wlan both are down).
>
> After this even if i up ethernet and it gets ip, all request are routed via 
> 127.0.0.1 ip only.
>
> I have checked NUTAG_DETECT_NETWORK_UPDATES(), but its only works with OS x. 
> I am using linux.
>
>
> So, is there any way to bind client to take ip from specific 
> interface(eth/wlan).
>
> Or any tag can be used with nua_create() to do the same.
>
> Thanks.
>   
> Regards,
> Saiyam Doshi
>

Hi!

I took a look at the code and it looks like this is only implemented for 
OSx.

Regards,
Andreas


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Example compilation

2014-07-21 Thread Andreas Wehrmann
Well, the complete SDP as a char string you want the stack to respond with.
If you don't know what SDP is, you should probably read a little bit 
more about SIP in general:

SIP: http://www.rfc-editor.org/rfc/rfc3261.txt
SDP: http://www.rfc-editor.org/rfc/rfc2327.txt

I don't have too much time to look into this, but I think there are a 
lot of test programs that compile when you build Sofia.
Maybe you should start there, I believe there is a simple UA client 
among them...

Regards,
Andreas

On 07/21/2014 08:19 AM, Nikos Balkanas wrote:
> Ty.
>
> What does it expect for an SDP string? What does it mean? What is it used
> for?
>
> Seems these examples are outdated. I managed to fix some of them (operation
> for op_t, etc.) but I still have some more i could use some help:
>
> nua_callstate_t (undeclared identifier) and NUTAG__REF.
>
> I also assume that oper_ctx_[u,t] is the same as operation.  These examples
> have lots of errors...
>
>
> On Mon, Jul 21, 2014 at 8:16 AM, Andreas Wehrmann 
> wrote:
>
>> On 07/21/2014 05:06 AM, Nikos Balkanas wrote:
>>> I'm going through the examples in the site.
>>>
>>> In app_i_invite it states:
>>>
>>>nua_respond(nh, 200, "OK", SOA_USER_SDP(magic->sdp), TAG_END());
>>>
>>> Looking at the nua_respond documentation, SOA_USER_SDP is a tag, that is
>>> not defined and gcc errs. Furthermore, magic is my application and
>> doesn't
>>> have an sdp field.
>>> These seem like hard errors. What can i do?
>>>
>>> TIA,
>>> Nikos
>>>
>> Hi,
>>
>> SOA_USER_SDP should indeed be SOATAG_USER_SDP which comes from here:
>> libsofia-sip-ua/soa/sofia-sip/soa_tag.h
>>
>> You can build your own SDP string and provide it using SOATAG_USER_SDP_STR.
>> I guess that's how most people use it.
>>
>> Regards,
>> Andreas
>>
>>
>>
>> --
>> Want fast and easy access to all the code in your enterprise? Index and
>> search up to 200,000 lines of code with a free copy of Black Duck
>> Code Sight - the same software that powers the world's largest code
>> search on Ohloh, the Black Duck Open Hub! Try it now.
>> http://p.sf.net/sfu/bds
>> ___
>> Sofia-sip-devel mailing list
>> Sofia-sip-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>>


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Example compilation

2014-07-20 Thread Andreas Wehrmann

On 07/21/2014 05:06 AM, Nikos Balkanas wrote:
> I'm going through the examples in the site.
>
> In app_i_invite it states:
>
>   nua_respond(nh, 200, "OK", SOA_USER_SDP(magic->sdp), TAG_END());
>
> Looking at the nua_respond documentation, SOA_USER_SDP is a tag, that is
> not defined and gcc errs. Furthermore, magic is my application and doesn't
> have an sdp field.
> These seem like hard errors. What can i do?
>
> TIA,
> Nikos
>

Hi,

SOA_USER_SDP should indeed be SOATAG_USER_SDP which comes from here:
libsofia-sip-ua/soa/sofia-sip/soa_tag.h

You can build your own SDP string and provide it using SOATAG_USER_SDP_STR.
I guess that's how most people use it.

Regards,
Andreas


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Crash when system time jumps

2014-06-12 Thread Andreas Wehrmann

On 06/12/2014 02:30 PM, Michael Jerris wrote:
> +   /* check it there are still things queued, if there are, that means 
> everything scheduled is > 15 days in the future */
> +/* in this case, we had a large time shift, we should schedule for 15 
> days in the future (which is probably still before now) */
> +   /* and this should sort itself out on the next run through */
> +if ( !agent->sa_out.completed->q_head && !agent->sa_out.trying->q_head 
> && !agent->sa_out.inv_calling->q_head &&
> +!agent->sa_out.re_list && 
> !agent->sa_in.inv_confirmed->q_head && !agent->sa_in.preliminary->q_head &&
> +!agent->sa_in.completed->q_head && 
> !agent->sa_in.inv_completed->q_head && !agent->sa_in.re_list ) {
>  SU_DEBUG_9(("nta: timer not set\n" VA_NONE));

Thanks for the patch.
I wasn't even aware of this issue.

Regards,
Andreas


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] ACK(SDP) is not send by UDP

2014-02-23 Thread Andreas Wehrmann
Could you provide an example code to reproduce the problem?
I cannot promise to find a solution, but I would like to take a look at 
the code.

Regards,
Andreas

On 02/19/2014 08:05 PM, Guilherme César Pilon wrote:
> Hello,
>
> I'm using sofia-sip-1.12.11 and i'm having o problem when i need to send an
> ACK with a SDP and this message is bigger than 1400
>
> bytes. The usual behavior would be to try sending the message by TCP (but
> the calle does not accept TCP, only UDP), and if the
>
> connection is not established, send it by UDP anyway. But, when sofia tries
> with TCP and the connection is not established, it does
>
> not send by UDP.
>
> Here is the log where the error occurs:
>
> nua: nua_stack_set_params: entering
> nta: selecting scheme sip
> tport_tsend(0x814cc10) tpn = */10.10.35.11:5060
> tport_resolve addrinfo = 10.10.35.11:5060
> tport_by_addrinfo(0x814cc10): not found by name */10.10.35.11:5060
> nta: ACK (900450185) too large for UDP, trying TCP
> tport_tsend(0x814ced8) tpn = tcp/10.10.35.11:5060
> tport_resolve addrinfo = 10.10.35.11:5060
> tport_by_addrinfo(0x814ced8): not found by name tcp/10.10.35.11:5060
> tport_alloc_secondary(0x814ced8): new secondary tport 0x81538b0
> tport_base_connect(0x81538b0): connecting to tcp/10.10.35.11:5060/sip
> tport(0x81538b0): set timer at 2000 ms because idle since send
> tport_queue(0x81538b0): queueing 0x814f7a0 for tcp/10.10.35.11:5060
> nta: sent ACK (900450185) to tcp/10.10.35.11:5060
> nua(0x814fe58): call state changed: completing -> ready, sent answer
> nua: nua_application_event: entering
> nua: nua_application_event: entering
> tport_connected(0x81538b0): events ERR
> nta_agent: tport: Connection refused
> tport_close(0x81538b0): tcp/10.10.35.11:5060/sip
> tport_connected error1:0
> tport_connected error2:0
> nta: timer set next to 4495 ms
> tport_wakeup_pri(0x814cc10): events IN
> tport_recv_event(0x814cc10)
> tport_recv_iovec(0x814cc10) msg 0x8157560 from (udp/10.10.107.204:5060) has
> 347 bytes, veclen = 1
>
> Just making it clear, i do not want the ACK sent by TCP, i want it sent by
> UDP. Other messages bigger than ~1,4k are sent by UDP, just the ACK
>
> seems to have this problem.
>
> If someone could help me i would be grateful.
>
>
>
> --
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
>
>
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
___
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_invite to IP Adress (DNS problem)

2013-11-27 Thread Andreas Wehrmann
Before trying this and that and assuming something goes through, here's 
a suggestion:

On your MAC: start Wireshark (you do know that, right?) and repeat the test.
That way, you'll know exactly what goes where from whom and you'll be 
able to
inspect the packets one by one.
Wireshark actually has a nice feature that can list all VoIP calls it 
happened to notice while sniffing network traffic.

Regards,
Andy

On 11/27/2013 07:25 PM, Alexander Heinrich wrote:
> Actually the port should be open.
>
> Now I’m getting some new logs and a new experience. (I increased the
> NTA_TIMER_C() to 1)
>
> When I try to call in my network I’m still getting a bad output:
>
> * tport_wakeup_pri(0x14d48680): events IN*
> *tport_recv_event(0x14d48680)*
> *tport_recv_iovec(0x14d48680) msg 0x14d1ab70 from (udp/192.168.178.145:5060) 
> has
> 304 bytes, veclen = 1*
> *tport_deliver(0x14d48680): msg 0x14d1ab70 (288 bytes) from
> udp/192.168.178.82:5060/sip next=0x0*
> *nta: received 100 Trying for INVITE (898641285)*
> *nta: 100 Trying is going to a transaction*
> *nta_outgoing: RTT is 420.385 ms*
> *tport_release(0x14d48680): 0x14e8bc90 by 0x14d1a900 with 0x14d1ab70 
> (preliminary)*
> *nua: nua_application_event: entering*
> **
> *  *
> * Event nua_r_invite *
> * Status 100 *
> * Trying*
> *  *
> **
> * nta: timer set next to 9919 ms*
> *nta: timer C fired, CANCEL and timeout INVITE (898641285)*
> *tport_tsend(0x14d48680) tpn = UDP/192.168.178.82:5060*
> *tport_resolve addrinfo = 192.168.178.82:5060*
> *tport_by_addrinfo(0x14d48680): not found by name UDP/192.168.178.82:5060*
> *tport_vsend returned 296*
> *nta: sent CANCEL (898641285) to UDP/192.168.178.82:5060*
> *tport_pend(0x14d48680): pending 0x14d1b190 for udp/192.168.178.145:5060
> (already 1)*
> *nta_outgoing_timer: 0/0 resent, 1/0 tout, 0/0 term, 0/1 free*
> *nta: timer set next to 500 ms*
> *tport_wakeup_pri(0x14d48680): events IN*
> *tport_recv_event(0x14d48680)*
> *tport_recv_iovec(0x14d48680) msg 0x14e8b470 from (udp/192.168.178.145:5060) 
> has
> 833 bytes, veclen = 1*
> *tport_deliver(0x14d48680): msg 0x14e8b470 (399 bytes) from
> udp/192.168.178.82:5060/sip next=0x0*
> *nta: received 200 OK for CANCEL (898641285)*
> *nta: 200 OK is going to a transaction*
> *nta_outgoing: RTT is 240.489 ms*
> *tport_release(0x14d48680): 0x14d1b190 by 0x14d1b6c0 with 0x14e8b470*
> *tport_wakeup_pri(0x14d48680): events IN*
> *tport_recv_event(0x14d48680)*
> *tport_recv_iovec(0x14d48680) msg 0x14e8adb0 from (udp/192.168.178.145:5060) 
> has
> 418 bytes, veclen = 1*
> *tport_deliver(0x14d48680): msg 0x14e8adb0 (402 bytes) from
> udp/192.168.178.82:5060/sip next=0x0*
> *nta: received 487 Request Terminated for INVITE (898641285)*
> *nta: 487 Request Terminated is going to a transaction*
> *tport_release(0x14d48680): 0x14e8bc90 by 0x14d1a900 with 0x14e8adb0*
> *tport_tsend(0x14d48680) tpn = UDP/192.168.178.82:5060*
> *tport_resolve addrinfo = 192.168.178.82:5060*
> *tport_by_addrinfo(0x14d48680): not found by name UDP/192.168.178.82:5060*
> *tport_vsend returned 290*
> *nta: sent ACK (898641285) to UDP/192.168.178.82:5060*
> *nta: outgoing_free(0x14d1b8e0)*
> *nua(0x14e8c170): call state changed: calling -> init*
> *nua(0x14e8c170): removing session usage*
> *soa_destroy(static::0x14d1d780) called*
> *nta_leg_destroy(0x14e8bb80)*
> *nua: nua_application_event: entering*
> **
> *  *
> * Event nua_r_invite *
> * Status 487 *
> * Request Terminated*
> *  *
>
>
> But in the recent calls section of my Mac App I can see that someone was 
> trying
> to call.
> As an attachment I’m sending you a screenshot.
>
> I tried the TPORT_Log thing (seen in the output) and I think RTP packets 
> should
> come through, because calling from the Mac App to my iPhone works perfectly.
> Greetings,
> Alexander Heinrich
>
>
> On 27 Nov 2013, at 10:58, Dave Horton  <mailto:d...@dchorton.com>> wrote:
>
> > Are you actually listening for RTP packets on the port you are advertising 
> > in
> > the INVITE (2) ?  If not, and the SIP signaling you are generating
> > otherwise looks ok, I would suspect that the Mac app experiences failure in
> > sending initial RTP to that port (receives ICMP destination unreachable 
> > since
> > nothing is listening on that port) and reacts according to what you are 
> > seeing.
> >
> >
> > On Nov 27, 2013, at 9:09 AM, Alexander Heinrich  > <mailto:alexan...@sn0wfreeze.de>> wrote:
> >
> > I thought that, too
> >
> > So I downloaded a SIP App from the Appstore and tried to call the Mac App 
> > with
> > the SIP Ap

Re: [Sofia-sip-devel] nua_invite to IP Adress (DNS problem)

2013-11-27 Thread Andreas Wehrmann
But then I guess it's a problem on the other end since there is nothing else 
you can do.
If the Mac-App responds with 100 - Trying it MUST have received your INVITE 
(otherwise where would 100 come from?).

Did you write the Mac-App yourself or is it some third-party app you're trying 
to call?
I would suggest that if you're trying to write a Soft-phone that you get your 
hands on another
Soft-phone which is known to work. So you have something to test your 
application against.

Regards,
Andreas




Alexander Heinrich  schrieb am 9:13 Mittwoch, 
27.November 2013:
 
Yes this is actually the problem. 

When I’m trying to call somebody the App which should receive the call doesn’t 
not start to ring and I’m not able to accept the call. 

But I know, that it receiving a message from the caller, because the Mac App 
starts to bounce in the dock like it should do. 

I hope you understand what I mean. 

It works like that 

iPhone —> Sending invite on local Network —> Mac - App 
iPhone <—  100 Trying  <— Mac-App 

And that’s it. The Mac-App does not show, that it gets an invite. And it’s 
actually not ringing. 

Thanks for your assistance.

Greetings, 
Alexander Heinrich





On 27 Nov 2013, at 09:01, Andreas Wehrmann  wrote:

Actually, this looks ok to me.
>You send an INVITE and get a response of 100 - Trying which is perfectly 
>normal.
>Whether the peer you're calling sends 180 - Ringing or not is up to him since 
>this is optional.
>
>The log "not found by name" should not worry you, I'm not entirely sure what 
>Sofia is trying to do there,
>I'm guessing it's trying to do a reverse lookup which probably fails resulting 
>in this supposed error log
>(I get the same log in my application but everything works).
>
>What problem remains now?
>Can you not establish the call?
>
>Regards,
>Andreas
>
>
>
>
>
>Alexander Heinrich  schrieb am 22:21 Dienstag, 
>26.November 2013:
> 
>Thanks for your help, but this still doesn’t work for me.
>
>
>Here’s my output: 
>
>
> nta: timer A fired, retransmit INVITE (89860)
>tport_release(0x14deafc0): 0x14ef5bd0 by 0x14ef6330 with 0x0
>tport_tsend(0x14deafc0) tpn = */192.168.178.82:5060
>tport_resolve addrinfo = 192.168.178.82:5060
>tport_by_addrinfo(0x14deafc0): not found by name */192.168.178.82:5060
>tport_vsend returned 687
>nta: resent INVITE (89860) to */192.168.178.82:5060
>
>
>And that’s my actual code: 
>
>
>  url_string_t *url = URL_STRING_MAKE(sipAddress) ;
>    sip_to_t *to = sip_to_create(NULL, url);
>    
>
>    op.handle = nua_handle(app.nua, NULL,SIPTAG_TO(to), TAG_END());
>  
>nua_invite(op.handle,SOATAG_USER_SDP_STR("m=audio 2 RTP/AVP 0\n"
>                                             "a=rtpmap:0 PCMU/8000\n"
>                                             "v = 0\n"
>                                             "o=Alex\n"
>                                             "s=Audio"),
>               SIPTAG_TO(to),
>               TAG_END());
>    
>I don’t know why the address could not be found. 
>tport_by_addrinfo(0x14deafc0): not found by name */192.168.178.82:5060
>
>
>Some of you said, that binding to a specifc interface could help. So I tried 
>binding to my IP:
>  app.nua= nua_create(app.root,
>                               event_callback,
>                               NULL,
>                              NUTAG_URL("sip:192.168.178.145:5060"),
>                             NUTAG_AUTOALERT(1),
>                             NTATAG_PASS_100(1),
>                             NTATAG_PASS_408(1),
>                             TAG_END());
>And I’m actually getting a different output. 
>
>
>I’ll try to explain what the output says, so you don’t have to read everything:
>I’m sending an invite to the correct IP address. The SIP client is answering 
>100 Trying like it should do. 
>Normally that should be followed by 180 ringing automatically. 
>But at the end nta says, that the timer is not set. 
>
>
>I tried setting different timers, too. Is there a specific tag for the nta 
>timer? So it could start ringing automatically ? 
>
>
>
>
>
>
> 
> Event nua_i_state 
> Status 0  
> INVITE sent
>  
> 
> nta: timer A fired, retransmit INVITE (898622277)
>tport_release(0x15557090): 0x1554ea60 by 0x1554cd10 with 0x0
>tport_tsend(0x15557090) tpn = */192.168.178.82:5060
>tport_resolve addrinfo = 192.168.178.82:5060
>tport_by_addrinfo(0x15557090): not found by name */192.168.178.82:5060
>tport_vsend returned 697
>nta: resent INVITE (898622277) to */192.168.178.82:5060
>tport_pend(0x15557090): pending 0x1554ea60 for udp/192.168.17

Re: [Sofia-sip-devel] nua_invite to IP Adress (DNS problem)

2013-11-27 Thread Andreas Wehrmann
Actually, this looks ok to me.
You send an INVITE and get a response of 100 - Trying which is perfectly normal.
Whether the peer you're calling sends 180 - Ringing or not is up to him since 
this is optional.

The log "not found by name" should not worry you, I'm not entirely sure what 
Sofia is trying to do there,
I'm guessing it's trying to do a reverse lookup which probably fails resulting 
in this supposed error log
(I get the same log in my application but everything works).

What problem remains now?
Can you not establish the call?

Regards,
Andreas





Alexander Heinrich  schrieb am 22:21 Dienstag, 
26.November 2013:
 
Thanks for your help, but this still doesn’t work for me.

Here’s my output: 

 nta: timer A fired, retransmit INVITE (89860)
tport_release(0x14deafc0): 0x14ef5bd0 by 0x14ef6330 with 0x0
tport_tsend(0x14deafc0) tpn = */192.168.178.82:5060
tport_resolve addrinfo = 192.168.178.82:5060
tport_by_addrinfo(0x14deafc0): not found by name */192.168.178.82:5060
tport_vsend returned 687
nta: resent INVITE (89860) to */192.168.178.82:5060

And that’s my actual code: 

  url_string_t *url = URL_STRING_MAKE(sipAddress) ;
    sip_to_t *to = sip_to_create(NULL, url);
    

    op.handle = nua_handle(app.nua, NULL,SIPTAG_TO(to), TAG_END());
  
nua_invite(op.handle,SOATAG_USER_SDP_STR("m=audio 2 RTP/AVP 0\n"
                                             "a=rtpmap:0 PCMU/8000\n"
                                             "v = 0\n"
                                             "o=Alex\n"
                                             "s=Audio"),
               SIPTAG_TO(to),
               TAG_END());
    
I don’t know why the address could not be found. tport_by_addrinfo(0x14deafc0): 
not found by name */192.168.178.82:5060

Some of you said, that binding to a specifc interface could help. So I tried 
binding to my IP:
  app.nua= nua_create(app.root,
                               event_callback,
                               NULL,
                              NUTAG_URL("sip:192.168.178.145:5060"),
                             NUTAG_AUTOALERT(1),
                             NTATAG_PASS_100(1),
                             NTATAG_PASS_408(1),
                             TAG_END());
And I’m actually getting a different output. 

I’ll try to explain what the output says, so you don’t have to read everything:
I’m sending an invite to the correct IP address. The SIP client is answering 
100 Trying like it should do. 
Normally that should be followed by 180 ringing automatically. 
But at the end nta says, that the timer is not set. 

I tried setting different timers, too. Is there a specific tag for the nta 
timer? So it could start ringing automatically ? 



 
 Event nua_i_state 
 Status 0  
 INVITE sent
  
 
 nta: timer A fired, retransmit INVITE (898622277)
tport_release(0x15557090): 0x1554ea60 by 0x1554cd10 with 0x0
tport_tsend(0x15557090) tpn = */192.168.178.82:5060
tport_resolve addrinfo = 192.168.178.82:5060
tport_by_addrinfo(0x15557090): not found by name */192.168.178.82:5060
tport_vsend returned 697
nta: resent INVITE (898622277) to */192.168.178.82:5060
tport_pend(0x15557090): pending 0x1554ea60 for udp/192.168.178.145:5060 
(already 0)
nta_outgoing_timer: 1/1 resent, 0/1 tout, 0/0 term, 0/1 free
nta: timer set next to 1000 ms
tport_wakeup_pri(0x15557090): events IN
tport_recv_event(0x15557090)
tport_recv_iovec(0x15557090) msg 0x1554b1c0 from (udp/192.168.178.145:5060) has 
304 bytes, veclen = 1
tport_deliver(0x15557090): msg 0x1554b1c0 (288 bytes) from 
udp/192.168.178.82:5060/sip next=0x0
nta: received 100 Trying for INVITE (898622277)
nta: 100 Trying is going to a transaction
nta_outgoing: RTT is 510.482 ms
tport_release(0x15557090): 0x1554ea60 by 0x1554cd10 with 0x1554b1c0 
(preliminary)
nua: nua_application_event: entering

  
 Event nua_r_invite 
 Status 100  
 Trying
  
 
 tport_wakeup_pri(0x15557090): events IN
tport_recv_event(0x15557090)
tport_recv_iovec(0x15557090) msg 0x156b52c0 from (udp/192.168.178.145:5060) has 
304 bytes, veclen = 1
tport_deliver(0x15557090): msg 0x156b52c0 (288 bytes) from 
udp/192.168.178.82:5060/sip next=0x0
nta: received 100 Trying for INVITE (898622277)
nta: 100 Trying is going to a transaction
tport_release(0x15557090): 0x1554ea60 by 0x1554cd10 with 0x156b52c0 
(preliminary)
nua: nua_application_event: entering

  
 Event nua_r_invite 
 Status 100  
 Trying
  
 
 nta: timer not set

Greetings, 
Alexander Heinrich --
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_

Re: [Sofia-sip-devel] nua_invite to IP Adress (DNS problem)

2013-11-25 Thread Andreas Wehrmann

On 11/25/2013 12:20 AM, Alexander Heinrich wrote:
> Good evening dear developers,
>
> I’m currently stuck in another problem.
> I am able to retrieve incoming calls. So my nua_create should be right.
>
> In my nua_invite I’m trying to connect to an IP Address directly. I am using 
> IP4, but the computer which I try to call does run IP6, too.
> When I try to connect sofia sip is not able to find out the way to my 
> computer and I get a timeout in the end.
>
> I am still using an iOS Device for testing, so I am not able to use the DNS 
> resolver.
> Is it possible to deactivate the resolver directly in my code ?
>
> Here’s my invite:
>
>url_string_t *url = URL_STRING_MAKE(“sip:alex@192.168.178.82:5060") ;
>  sip_to_t *to = sip_to_create(NULL, url);
>
>  op.handle = nua_handle(app.nua, NULL,SIPTAG_TO(to), TAG_END());
> //op.leg = nta_leg_tcreate(app.agent,nta_callback, NULL, SIPTAG_TO(to), 
> TAG_END());
>
>  nua_invite(op.handle,SOATAG_USER_SDP_STR("m=audio 2 RTP/AVP 0\n"
>   "a=rtpmap:0 PCMU/8000\n"
>   "v = 0\n"
>   "o=Alex\n"
>   "c=IN IP4 127.0.0.1\n"
>   "s=Audio"),
> TAG_END());
> Here’s my Log Output:
>
> --- cut ---
>
>
> When I try using the SOATAG_ADDRESS Feature:
>
>nua_invite(op.handle,SOATAG_USER_SDP_STR("m=audio 2 RTP/AVP 0\n"
>   "a=rtpmap:0 PCMU/8000\n"
>   "v = 0\n"
>   "o=Alex\n"
>   "c=IN IP4 127.0.0.1\n"
>   "s=Audio"),
> SOATAG_ADDRESS("192.168.178.82")
> TAG_END());
>
>
>

You seem to be confusing addresses in the SIP header and media addresses.
With c= or SOATAG_ADDRESS you put an address in the SDP you're sending out;
that is: The address you want the remote peer to send media to (will 
most probably be the host you're calling from).

The other thing is the SIP URI you're trying to call which is a 
completely different story.
Creating a TO header works like this:

sip_to_t* to = sip_to_create( NULL, URL_STRING_MAKE( 
"sip:alex@192.168.178.82:5060" ) );
nua_invite( handle, SIPTAG_TO( to ), ..., TAG_END() );

Hope this helps,

Andreas


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Fwd: Re: Sending nua_invite - DNS Error 503

2013-11-19 Thread Andreas Wehrmann

 Original Message 
Subject:Re: [Sofia-sip-devel] Sending nua_invite - DNS Error 503
Date:   Tue, 19 Nov 2013 21:19:37 +0100
From:   Alexander Heinrich 
To: andreas_wehrm...@yahoo.at



Hey Andreas,

you were right but how can I disable the DNS Lookup in Sofia Sip?

Do you have any idea ?

Greetings,
Alexander Heinrich




I wouldn't know; In my projects I don't use names at all, just naked 
addresses.
Did you try Tim Na's Patch?

Regards


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] status of sofia sip

2013-11-18 Thread Andreas Wehrmann

On 11/18/2013 02:15 PM, Michael Jerris wrote:
> Pekka is no longer at Nokia.  I think I am the only one with commit access to 
> the gitorious tree still around and responding at all.  I don't have the 
> ability to roll releases.  There are still plenty of people working on 
> sofia-sip from what I can see, but yeah, no official maintainer who is around 
> and actively working on anything.
>
> Mike
>
>

So am I right to assume that Pekka doesn't participate anymore
and there is no lead maintainer at all?

Andreas


--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] status of sofia sip

2013-11-18 Thread Andreas Wehrmann

On 11/18/2013 10:04 AM, Dave Horton wrote:
> Hi Andreas -
>
> Yes, I went back and read your question.  Looks like it never really got 
> answered, and then sidetracked into a specific bug fix discussion.  And while 
> it would be great to get fixes from Freeswitch back in, that clearly isn't 
> happening yet.  If I am reading the commit history in gitorious correctly (as 
> you'd mentioned, just finding out that is where it was hosted was a fairly 
> random occurrence), things ground to a halt a couple of years ago with 
> Pekka's last commit.  Also, Freeswitch uses nua but I prefer to use nta in 
> most of my projects.  I see a handful of merge requests being opened but not 
> being addressed.
>
> For now I've created my own clone on gitorious, like a few others have done.  
> I suppose like others that have done this I will can cherry-pick commits that 
> look useful from other people's clones, but this is slapdash and does kind of 
> both concern me and sadden me to see a useful product that seems to be dying 
> slowly from lack of support.  I'd be interested in feedback that either (a) 
> tells me I'm wrong, and why or (b) provides suggestion on other (modern, 
> supported, open, C/C++) sip stacks that I ought to be looking at.
>
> Dave
>
>
I would need to agree with you there.
I was often wondering who is responsible for Sofia.
That would seem to be Pekka but he seems to be concerned with other 
things (I'm not blaming him, just pointing it out)
and there's apparently nobody else?

What I find a little bit odd is that the official branch of Sofia seems 
to have come to a halt although there seem to be lots of people
using it. The question that bothers me is: Why didn't changes from these 
people flow back to the official version?
(guess that's because Pekka is (the only?) maintainer and just didn't 
have the time).

The FreeSwitch guys seem to do a good job but the I think the sofia-sip 
version in the FreeSwitch repo is to be considered a fork,
not just a branch of the official repo?

I think this library needs more maintainers.

Thoughts, anyone?



--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] status of sofia sip

2013-11-17 Thread Andreas Wehrmann

On 11/17/2013 04:53 PM, Dave Horton wrote:
> I've been using sofia sip quite happily for a few years in various projects, 
> but I am wondering about whether it is still being actively supported.  I'm 
> heading into a new project where I will need a lot of 3GPP headers that don't 
> appear to have been implemented in sofia sip, and I've also come across a bug 
> or two in the current header implementation.  I'd be happy to chip in with 
> patches, but I'm not clear whether this code base is being actively supported 
> by any key person or group I should coordinate with.
>

Hey there!

I've posted the same questions a couple of weeks ago.
Sofia-SIP is being actively maintained in the FreeSWITCH project (see 
http://www.freeswitch.org/).
If you take a look at their GIT history 
(http://fisheye.freeswitch.org/browse/freeswitch.git; under libs/sofia-sip)
you will find quite a few changes since the last official release.
I would like to see those changes merged back too, but to me it seems 
this is not going to happen soon.

Regards,
Andreas


--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sending nua_invite - DNS Error 503

2013-11-17 Thread Andreas Wehrmann

On 11/18/2013 12:12 AM, Huang, Kun-Yao wrote:
> Try binding to a specific interface instead of 0.0.0.0. Sofia SIP chooses an 
> arbitrary interface for out-going requests when you bind to 0.0.0.0
>
> http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg04427.html
> http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg03185.html
>
> Kun-Yao Huang
>
>

I don't have any experience with iOS, but how about resolving the DNS 
manually and then
use the resolved address with Sofia?
I know this is ugly...

Regards,
Andreas


--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Starting with Sofia SIP(registrating)

2013-11-12 Thread Andreas Wehrmann
Your NUTAG_URL is flawed, it must represent the local-URL where your device can 
be reached, try "0.0.0.0"

Regards,
Andreas






Alexander Heinrich  schrieb am 0:46 Dienstag, 
12.November 2013:
 
Hey developers, 

I am currently working on an iPhone port of Sofia SIP. 
I already got the library compiled for the iPhone and its running. 
But now I am not getting any further. 

I used the short message example provided by gitorious for sending and 
receiving messages. 

And now I am struggling here: 
* Connecting to a SIP Server ( in this case iptel.org) 

Here’s my code. I don’t know what is right and what isn’t 

 nua = nua_create(root, 
                     event_callback, 
                     NULL, 
                     NUTAG_REGISTRAR("sip:sfdsip:vghl9...@iptel.org:5060"),
                     SIPTAG_FROM_STR("sip:sfdsip:vghl9...@iptel.org:5060"),
                     NUTAG_M_USERNAME("sfdsip"),
                     NUTAG_URL("sip:sfdsip:vghl9...@iptel.org:5060"),
             TAG_END()); 

My Output: 
su_socket_port_init(0x1565f460, 0x10e19c) called
su_pthread_port_init(0x1565f460, 0x10e19c) called
nua: nua_create: entering
su_socket_port_init(0x15562270, 0x10e19c) called
su_pthread_port_init(0x15562270, 0x10e19c) called
nua: nua_stack_init: entering
nua: nua_stack_set_params: entering
soa_create("default", 0x15582e40, 0x155a1e20) called
soa_set_params(static::0x15679800, ...) called
soa_set_params(static::0x15679800, ...) called
nta_agent_create: initialized hash tables
nta_agent_create: initialized transports
nta_agent_create: initialized random identifiers
nta_agent_create: initialized timer
nta_agent_create: initialized resolver
tport_create(): 0x15664fc0
nta: master transport created
tport_bind_server(0x15664fc0) to */iptel.org:5060/sip
tport_bind_server(0x15664fc0): calling tport_listen for udp
tport_alloc_primary(0x15664fc0): new primary tport 0x155a1560
tport_listen(0x15664fc0): bind(pf=2 udp/[212.79.111.155]:5060): Can't assign 
requested address
tport_bind_server(0x15664fc0): calling tport_listen for tcp
tport_alloc_primary(0x15664fc0): new primary tport 0x155a1560
tport_listen(0x15664fc0): bind(pf=2 tcp/[212.79.111.155]:5060): Can't assign 
requested address
nta: bind(iptel.org:5060;transport=*): Can't assign requested address
nua: initializing SIP stack failed
nua: nua_stack_deinit: entering
sres_sofia_update(0x15661230, -1, -1)
sres_sofia_update(0x0, -1, -1)
tport_destroy(0x15664fc0)
su_kqueue_port_deinit(0x15562270) called



I tried the nua_register method, too. 
I don’t know which one I have to use for my registration at iptel.org. 
I want that every SIP call works over my SIP Account at iptel 
(Very much I’s by the way… Perhaps I am a bit egoistic 😉) 

I hope there are still some cool developers, who could help me here. 
Because this topic is really not that public. 

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Cant using nua_invite to initial call.

2013-08-09 Thread Andreas Wehrmann

On 08/09/2013 11:21 AM, ThanhTruong wrote:
> Hi ,
>
> this is full loglevel for all and set to 9(max) I think.
>
> in this stack, i can receive invite, send/receive register, respond of 
> register.
>
> :(
> But with invite, it is not live nua_register, nua_subscribe so, i am getting 
> this issue.
>
> Thank you for your help.
>   
>
> ThanhTruong
>
>
> 
>

Maybe you should write a little test app in which you do nothing but 
initiate an outgoing call.
If that works, you can try to integrate that into your existing app and 
try to find the differences
if it doesn't work.

Regards,
Andreas


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Cant using nua_invite to initial call.

2013-08-09 Thread Andreas Wehrmann

On 08/09/2013 10:57 AM, ThanhTruong wrote:
> Hi sir,
>
> When I tried with your code, change to my sdp and get this log from 
> nua_invite.
> nua_params.c:480 nua_stack_set_params() nua: nua_stack_set_params: entering
> soa.c:282 soa_clone() soa_clone(static::0xe9bd050, 0xe490080, 0x2b52284121d0) 
> called
> soa.c:405 soa_set_params() soa_set_params(static::0x2b521c27d9d0, ...) called
> nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
> soa.c:405 soa_set_params() soa_set_params(static::0x2b521c27d9d0, ...) called
> nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
> nua_dialog.c:338 nua_dialog_usage_add() nua(0x2b52284121d0): adding session 
> usage
> nta.c:4322 nta_leg_tcreate() nta_leg_tcreate(0x2b521860a290)
> soa.c:1302 soa_init_offer_answer() 
> soa_init_offer_answer(static::0x2b521c27d9d0) called
> soa.c:1426 soa_generate_offer() soa_generate_offer(static::0x2b521c27d9d0, 0) 
> called
> nua_stack.c:271 nua_stack_event() nua(0x2b52284121d0): event r_invite 900 
> Internal error at nua_client.c:711
> nua_session.c:4135 signal_call_state_change() nua(0x2b52284121d0): call state 
> changed: init -> init
> nua_stack.c:271 nua_stack_event() nua(0x2b52284121d0): event i_state 900 
> Internal error at nua_client.c:711
> nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
> nua_stack.c:271 nua_stack_event() nua(0x2b52284121d0): event i_terminated 900 
> Internal error at nua_client.c:711
> nua_dialog.c:397 nua_dialog_usage_remove_at() nua(0x2b52284121d0): removing 
> session usage
> nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
> nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
> soa.c:358 soa_destroy() soa_destroy(static::0x2b521c27d9d0) called
> nta.c:4375 nta_leg_destroy() nta_leg_destroy(0x2b521860a290)
>
> Let me tell more about my scenario:
> + first I have one nh to handle incoming INVITE from my client.
> + when I get one invite from client(xlite) I call your code to send one 
> invite to another sip server. and get this error.
>   code is:
> nua_handle_t* nh_a = NULL;
>  sip_to_t* to = sip_to_create( NULL, URL_STRING_MAKE( 
> "sip:372@59.120.208.196" ) );
>  nh_a = nua_handle( nua, NULL,
>SIPTAG_TO( to ),
>TAG_END() );
>  nua_invite( nh_a,
>  SOATAG_USER_SDP_STR( r_sdp),
>  TAG_END() );
>
> and I see we get 900 Internal error.
> :(

Is it possible to increase the log level even more?
I don't see why this shouldn't work; maybe it has to do something with 
how you setup your SIP stack in the first place?
But that's just a wild guess.


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Cant using nua_invite to initial call.

2013-08-09 Thread Andreas Wehrmann

On 08/09/2013 10:30 AM, ThanhTruong wrote:
> Hi,
>
> I have used ngrep -p -q -W byline port 5060 in this server and did not see 
> any invite message sent out.
>
> I think sofia-sip handling it and drop it, not send it out.
>
> is there any way to get it work ? do you have any example code to send invite 
> to one sip server ? (only how to use nua_invite to send one INVITE message to 
> one server)
>
> Thanks,
>
>   
> ThanhTruong
>
>
> ____
>   From: Andreas Wehrmann 
> To: ThanhTruong 
> Cc: "sofia-sip-devel@lists.sourceforge.net" 
> 
> Sent: Friday, August 9, 2013 3:19 PM
> Subject: Re: [Sofia-sip-devel] Cant using nua_invite to initial call.
>   
>
>
>

This is a (very much) stripped down example from my code
(NOTE: that I didn't include the SDP string here!):

nua_handle_t* nh = NULL;
sip_to_t* to = sip_to_create( NULL, URL_STRING_MAKE( "sip:bla@something" 
) );
nh = nua_handle( sip_stack, NULL,
  SIPTAG_TO( to ),
  TAG_END() );
nua_invite( nh,
 SOATAG_USER_SDP_STR( sdp_os.str().c_str() ),
 TAG_END() );



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Cant using nua_invite to initial call.

2013-08-09 Thread Andreas Wehrmann

On 08/09/2013 09:48 AM, ThanhTruong wrote:
> hi,
>
> I have enabled log level and see some log but cant know where is my issue ?
>
> nua_common.c:108 nh_create_handle() nua: nh_create_handle: entering
> nua.c:633 nua_invite() nua: nua_invite: entering
> nua_stack.c:529 nua_signal() nua(0x2b52184f5940): sent signal r_invite
> nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
> nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
> nua_stack.c:569 nua_stack_signal() nua(0x2b52184f5940): recv signal r_invite
> nua_params.c:480 nua_stack_set_params() nua: nua_stack_set_params: entering
> soa.c:405 soa_set_params() soa_set_params(static::0x2b5218638ba0, ...) called
> soa.c:1052 soa_set_user_sdp() soa_set_user_sdp(static::0x2b5218638ba0, (nil), 
> 0x2b521c32bca4, -1) called
> soa.c:890 soa_set_capability_sdp() 
> soa_set_capability_sdp(static::0x2b5218638ba0, (nil), 0x2b521c32bca4, -1) 
> called
> soa.c:2568 soa_init_sdp_connection_with_session() 
> soa_init_sdp_connection_with_session: selected IN IP4  (a local 
> address)
> nua_stack.c:271 nua_stack_event() nua(0x2b52184f5940): event r_invite 491 
> Request Pending
> nua_stack.c:359 nua_application_event() nua: nua_application_event: entering
> nua.c:366 nua_handle_magic() nua: nua_handle_magic: entering
>
> but Invite does not send out.
> nua_invite (nh,  NUTAG_URL (nua_url),
>  SOATAG_USER_SDP_STR("m=audio 8000 RTP/AVP 8 0\nc=IN IP4 
> 127.0.0.1\n"),
>  SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
>  SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL),
>  TAG_END());
>
>

This line looks suspicious:

nua_stack.c:271 nua_stack_event() nua(0x2b52184f5940): event r_invite 491 
Request Pending

How did you make you make sure 'nothing goes out'?
Did you check with Wireshark?
Looking at the log, I would say your INVITE gets out but is rejected with 491.

Regards



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Cant using nua_invite to initial call.

2013-08-08 Thread Andreas Wehrmann

On 08/09/2013 06:32 AM, ThanhTruong wrote:
> Hi all,
>
> I am back and have a stupid question that i cant send invite to SIP server 
> using nua_invite.
>
> i have tried :
>
> nua_invite (nh, NUTAG_URL (nua_url),
>  SOATAG_ADDRESS("127.0.0.1:8000"),
>  NUTAG_EARLY_MEDIA (1), TAG_END ());
>
> but I did not see any invite sent.
>
> any one can help to send one invite to one sip server ?
>
> thank all in advance.
>
>   
> ThanhTruong
>

Increase the log level and find out what Sofia says about your request,
maybe that will give you a hint.

Regards,
Andreas


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
___
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 register message construct

2013-06-13 Thread Andreas Wehrmann

On 06/13/2013 10:09 AM, Andreas Wehrmann wrote:
> Hey there!
>
> Nothing to do with the problem but I just wanted to say that you can
> simplify/strengthen
> the code for building the auth string by doing it like this code:
>
> "sip" is of type , which is delivered by NUA to the
> callback:
>
> sip_www_authenticate_t const* www_auth = sip->sip_www_authenticate;
> char const* scheme = www_auth->au_scheme;
> const char* realm = msg_params_find( www_auth->au_params, "realm=" );
> char auth_str[ 8192 ] = { 0 };
> snprintf( auth_str, 8192, "%s:%s:%s:%s",
> scheme, realm,
> "USERNAME",
> "PASSWORD" );
> nua_authenticate( nh, NUTAG_AUTH( auth_str ), TAG_END() );
>
>

Just to be thorough: The code above should check whether sheme or realm 
is NULL;
Just in case.



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-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] sip register message construct

2013-06-13 Thread Andreas Wehrmann

On 06/13/2013 09:34 AM, ThanhTruong wrote:
>   
> For handling register authentication in callback I used:
>   
> if(evt == nua_r_register && (status == 401 || status == 407))
>{
>   if (sip && sip->sip_www_authenticate && 
> sip->sip_www_authenticate->au_params)
>   {
> const char realm[] = "realm=\"";
> for (const char *param = (const 
> char*)sip->sip_www_authenticate->au_params[0]; param != NULL; ++param)
> {
>size_t param_strlen = strlen(param);
>if (param_strlen > sizeof(realm) && 
> strncmp(realm, param, sizeof(realm) - 1) == 0)
>{
>   std::string realm_val(param + 
> sizeof(realm) - 1, param_strlen - sizeof(realm));
>std::stringstream digest;
>   digest << "Digest:\"" << realm_val 
> << "\"" << ":" << m_userName << ":" << m_passWord;
>   
> nua_authenticate(m_registrationHandle, NUTAG_AUTH(digest.str().c_str()), 
> TAG_END());
>}
> }
>   }
>}
>   
>

Hey there!

Nothing to do with the problem but I just wanted to say that you can 
simplify/strengthen
the code for building the auth string by doing it like this code:

"sip" is of type , which is delivered by NUA to the 
callback:

sip_www_authenticate_t const* www_auth = sip->sip_www_authenticate;
char const* scheme = www_auth->au_scheme;
const char* realm = msg_params_find( www_auth->au_params, "realm=" );
char auth_str[ 8192 ] = { 0 };
snprintf( auth_str, 8192, "%s:%s:%s:%s",
   scheme, realm,
   "USERNAME",
   "PASSWORD" );
nua_authenticate( nh, NUTAG_AUTH( auth_str ), TAG_END() );


Hope it helps :-)


Regards,

Andreas


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-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] How to get default SIP_FROM host

2012-09-02 Thread Andreas Wehrmann
On 09/03/2012 08:19 AM, Andreas Wehrmann wrote:
> Hello everbody!
>
> If you create an outgoing request and don't provide a SIP FROM user,
> sofia inserts one for you.
>
> Now, in my case I want to make an outgoing call and provide just the
> user part (the calling number) and let the host part be chosen by sofia.
>
> Is there some way to do this?
> Or is there a way to query the default host sofia would use?
>
> I tried to create a FROM user using the URI calling-number@0.0.0.0
> hoping that sofia would replace the dummy address with the real address
> (like it does in SDP processing) but it wouldn't work.
>
>
> Regards,
>
> Andreas
>

The public cannot see the example URI, so here it is again:

calling-number (at) 0 . 0 . 0 . 0


Regards,

Andreas

-- 
Dipl.-Ing. (FH) Andreas Wehrmann
Software Development
--
Center Communication Systems GmbH
A-1210 Wien, Ignaz-Köck-Straße 19
Sitz in Wien
FN 796 88p, Firmenbuchgericht Wien
www.centersystems.com

Tel.: +43 (0) 190 199 - 3616
Mobile: +43 (0) 664 884 75916
Fax: +43 (0) 190 199 - 2110
E-Mail: a.wehrm...@centersystems.com

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] How to get default SIP_FROM host

2012-09-02 Thread Andreas Wehrmann
Hello everbody!

If you create an outgoing request and don't provide a SIP FROM user, 
sofia inserts one for you.

Now, in my case I want to make an outgoing call and provide just the 
user part (the calling number) and let the host part be chosen by sofia.

Is there some way to do this?
Or is there a way to query the default host sofia would use?

I tried to create a FROM user using the URI calling-number@0.0.0.0
hoping that sofia would replace the dummy address with the real address
(like it does in SDP processing) but it wouldn't work.


Regards,

Andreas

-- 
Dipl.-Ing. (FH) Andreas Wehrmann
Software Development
--
Center Communication Systems GmbH
A-1210 Wien, Ignaz-Köck-Straße 19
Sitz in Wien
FN 796 88p, Firmenbuchgericht Wien
www.centersystems.com

Tel.: +43 (0) 190 199 - 3616
Mobile: +43 (0) 664 884 75916
Fax: +43 (0) 190 199 - 2110
E-Mail: a.wehrm...@centersystems.com

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel