Miguel Goncalves wrote:
> hello there..
>
>
> this could seem easy but i just cant see it..
>
> im trying to retrieve and rtsp url that is in a sip invite message 
> header, on content_type section of the header.. like this:
>
>  SIP/2.0 200 OK
>   Via: SIP/2.0/UDP 
> 192.168.0.110:51458;rport=51458;branch=z9hG4bKDrt305Hmycr8H
>   Record-Route: <sip:[email protected]:6060;lr>
>   Record-Route: <sip:[email protected]:4060;lr>
>   From: <sip:[email protected]>;tag=BX8rFa5N6v9BS
>   To: <sip:[email protected]>;tag=1265391275
>   Call-ID: 18988e35-d90e-122c-cca6-001dba24c9ef
>   CSeq: 116677944 INVITE
>   Contact: <sip:[email protected]:8010>
>   Content-Type: message/external-body; access-type="URL"; 
> expiration="Sat, 01 January 2011 09:00:00 GMT"; 
> URL="rtsp://127.0.0.1:5554/test"
>   User-Agent: eXosip/3.1.0
>   Content-Length: 0
>
> im trying to get the content type on the callback of the event 
> nua_r_invite with this:
>
> void app_r_invite(int status, char const *phrase,
>            nua_t *nua, cliente *cli,
>            nua_handle_t *nh, sip_t const *sip,
>            tagi_t tags[])
> {
>
>  printf(": INVITE : %03d %s\n", status, phrase);
>
>
>    if (!sip) {
>        printf(": NOTIFY sip=%p,nh=%p\n", sip, nh);
>        return;
>    }
>
>      if ( status == 200 )
>    {
>        if(sip)
>        {
>
>            char *header;
>            header = sip_header_as_string( cli->home, (void*) 
> sip->sip_content_type);
>              printf("\nCONTENT TYPE -> %s\n", header);
>        }
>
> but i just keep getting :
> INVITE : 200 OK
>
> CONTENT TYPE -> (null)
>
> can anyone help please? Where should i get the content_type and how?
>
> Miguel
>


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to