Send custom headers in invite

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

 



Hi guys,
i am developing an ios app using pjsip as sip stack
i am trying to send multiple custom headers in my invite, but the code adds
 only the last one

i am looping this code
like


  pjsua_msg_data msg_data;
    pjsip_generic_string_hdr subject;

    pj_str_t hvalue, hname;

     for(NSString *key in [headers allKeys]){



        NSLog(@"Call.m key value in call %@,%@",key,[headers
objectForKey:key] );

        pjsua_msg_data_init(&msg_data);



        hname = pj_str((char *)[key UTF8String]);



        char * headerValue=(char *)[(NSString *)[headers objectForKey:key]
UTF8String];



        hvalue = pj_str(headerValue);



//        pjsip_generic_string_hdr_create(pool1, &hname, &hvalue);

        pjsip_generic_string_hdr_init2 (&subject, &hname, &hvalue);



        pj_list_push_back(&msg_data.hdr_list, &subject);


    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130904/63bdb3fa/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux