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: [email protected] 
[mailto:[email protected]] On Behalf Of 
Jonas Nyman
Sent: den 24 oktober 2013 09:14
To: [email protected]
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
_______________________________________________
Linphone-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/linphone-users

Reply via email to