linphone-users
[Top][All Lists]
Advanced

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

Re: [Linphone-users] Belle-sip route header


From: Jonas Nyman
Subject: Re: [Linphone-users] Belle-sip route header
Date: Thu, 24 Oct 2013 11:59:29 +0200

Thanks for anyone taking time looking into this.

But the issue have been resolved.

 

My fix:

 

if(!belle_sip_message_get_header(BELLE_SIP_MESSAGE(request),BELLE_SIP_ROUTE)) {

                             if(outbound_proxy) {

                                                          belle_sip_header_address_t * addr = belle_sip_header_address_create(NULL, outbound_proxy);

                                                          belle_sip_header_route_t * routeHeader = belle_sip_header_route_create(addr);

                                                          belle_sip_message_add_header(BELLE_SIP_MESSAGE(request), BELLE_SIP_HEADER(routeHeader));

                             }

}

 

Regards

Jonas Nyman

 

From: address@hidden [mailto:address@hidden On Behalf Of Jonas Nyman
Sent: den 24 oktober 2013 09:14
To: address@hidden
Subject: [Linphone-users] Belle-sip route header

 

Hello,

 

Im currently working on replacing our old sip stack with the new belle-sip.

I have got most of the things working but I cant get the route header to be added.

 

My idea was that when for example the user would make a call I could simply add
the header myself in the following function "_sal_op_send_request_with_contact" in the
file "sal_op_impl.c".
Im trying to add the header like this:

if(!belle_sip_message_get_header(BELLE_SIP_MESSAGE(request), BELLE_SIP_ROUTE)) {

                             SalOpBase * opBase = (SalOpBase*)op;

                             if(opBase  && opBase->route) {

                                                          belle_sip_header_route_t * routeHeader = belle_sip_header_route_parse(opBase->route);                            

                                                          belle_sip_message_add_header(BELLE_SIP_MESSAGE(request), BELLE_SIP_HEADER(routeHeader));

                             }

}

 

The problem im having is that I get the routeHeader and its not NULL but it crashes when I try to cast it via BELLE_SIP_HEADER.

Any help will be greatly appreciated.

 

Regards
Jonas Nyman


reply via email to

[Prev in Thread] Current Thread [Next in Thread]