< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] How to got the header defination "h_xxx" by the header name ?


I have use the reSIProcate DEBUG log, got the same wrong result:
 
Supported: replaces
User-Agent: Dn%cb%01
Event: message-summary
Content-Length: 0
 
 
I just want to modify the user agent as: "myua"
 


 
On Fri, Oct 3, 2008 at 11:49 PM, Justin Matthews <jmatthewsr@xxxxxxxxx> wrote:

Not sure why you would get that.  You can take a look at the resip logs to see what message was actually sent to the network and see if it's corrupted before sending.

 

-justin

 

From: Karlsson [mailto:boost.regex@xxxxxxxxx]
Sent: Friday, October 03, 2008 11:05 AM
To: Justin Matthews


Cc: resiprocate-users
Subject: Re: [reSIProcate-users] How to got the header defination "h_xxx" by the header name ?

 

Hi, I have encountering issue when I test it, I modify the User-Agent header to a string, and

use wireshark to capture the SIP message, but got:

 User-Agent: \370L$\000\376\377\377\377\001\000\000\000\f\016\000\000\000\000\000\000\000\000\000\000

 

The attachment is screenshot, why?

On Fri, Oct 3, 2008 at 9:59 PM, Justin Matthews <jmatthewsr@xxxxxxxxx> wrote:

Here is my response from an off-list message asking for additional help on
adding a header using the string representation of the header name.  I
haven't tested this and am not completely sure this is the best way to do
this, but here is my first take:

       const resip::Data headerName("From");
       resip::Data headerValue("some header value here");
       resip::SipMessage resipMsg;

       resip::HeaderBase *headerBase =
HeaderBase::getInstance(resip::Headers::getType(headerName.c_str(),headerNam
e.size()));

       if (headerBase)
       {
               if (resipMsg.exists(*headerBase))
               {
                       resipMsg.remove(*headerBase);
               }
               resipMsg.addHeader(headerBase->getTypeNum(),0,0,
headerValue.c_str(), headerValue.size());

               //may want to make sure that the headers added are valid...
               try {
                       resipMsg.parseAllHeaders();
               } catch (ParseException &)
               {}
       }

-justin



-----Original Message-----
From: resiprocate-users-bounces@xxxxxxxxxxxxxxx
[mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxx] On Behalf Of Scott Godin
Sent: Wednesday, September 10, 2008 11:22 AM
To: Karlsson
Cc: resiprocate-users
Subject: Re: [reSIProcate-users] How to got the header defination "h_xxx" by
the header name ?

Check out this older posting:
http://list.resiprocate.org/archive/resiprocate-devel-old/msg06074.html

Scott

On Tue, Sep 9, 2008 at 4:52 AM, Karlsson <boost.regex@xxxxxxxxx> wrote:
> Hi, I want to know, does there have a way to got the header defination
h_xxx
> by the header name ?
>
> For example, I want to got the h_Vias by "Via" string;
> got the h_From by "From" string;
>
> Thanks a lot.
> _______________________________________________
> resiprocate-users mailing list
> resiprocate-users@xxxxxxxxxxxxxxx
> List Archive: http://list.resiprocate.org/archive/resiprocate-users/
>
_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/