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

Re: [reSIProcate-users] Help - Facing problem to send sip message towards proxy


I don't see any problems with the message you pasted into the email. Sending with no To tag is a normal and expected thing. I can only assume at this point that something is going wrong in your fnG_encodeSipPBMsgToSIPStackMessage function.  Since you didn't include that source it's too difficult to understand what is really being sent to GStack->send.

I'm guessing somewhere in that function you are calling param(p_tag) on the From header, thus creating an empty tag value.  Here is the code from the stack where the assert is occuring that explains this:

      // this will assert if you've accessed a parameter that doesn't exist and
      // then the stack has created an empty parameter with no value. Try
      // calling exists(p_foo) before calling param(p_foo)
      if (mValue.empty())
      {
         ErrLog(<< "Accessing defaulted DataParameter: '" << getName() << "'");
      }

Scott

On Wed, Jul 19, 2017 at 6:01 AM, LavanyaKumar <lavanyakumar.s@xxxxxxxxxxx> wrote:

Hi Scott,

 

I tried to send and receive messages using single stack. I’m able to receive messages from stack. But when I’m trying to initiate new INVITE request, I’m getting below error and my application is crashing,

 

ERR | 20170719-141343.157 |  | RESIP | 140643582072576 | DataParameter.cxx:91 | Accessing defaulted DataParameter: 'tag'

B2BServer: DataParameter.cxx:93: virtual std::ostream& resip::DataParameter::encode(std::ostream&) const: Assertion `!mValue.empty()' failed.

ORA-24550: signal received: [si_signo=6] [si_errno=0] [si_code=-6] [si_int=0] [si_ptr=(nil)] [si_addr=0x1f400003d46]

 

I have separate function (fnG_encodeSipPBMsgToSIPStackMessage) to encode sip message, here is the SIP message from my application logs which is generated using makeRequest,

 

INVITE sip:1.1.5695103.en-fe@10.10.30.111:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.2.106:2271;branch=z9hG4bK5615554850bd4935;received=192.168.2.106;rport=0

Max-Forwards: 70

Route: <sip:10.10.30.113:30029>

Contact: <sip:SonetelPBX@49.57.50.46:30029>

To: <sip:1.1.5695103.en-fe@10.10.30.111:5060>

From: "sai_live_fname_2"<sip:sai_live_fname_2@xxxxxxxxxx:5060>;tag=8b7d7e2c

Call-ID: NXp-UyYakfdU4k1ufJyZtA..

CSeq: 1 INVITE

P-Charging-Vector: icid-value=1522390983

Content-Length: 0

 

For new INVITE request, we should not send tag as per RFC. If we are voiding that and send tag for NameAddr type headers with some dummy value, then the request is reaching to proxy. Here is the SIP message for that,

 

INVITE sip:1.1.5695103.en-fe@10.10.30.111:5060 SIP/2.0.

Via: SIP/2.0/UDP 192.168.2.152:30029;branch=z9hG4bKc041.32500907.0.

Via: SIP/2.0/UDP 192.168.2.106:2271;branch=z9hG4bK-524287-1---e93b397d27f01217;rport=2271;received=10.10.30.111.

Max-Forwards: 30.

Route: <sip:10.10.30.113:30029>.

Contact: <sip:SonetelPBX@49.57.50.46:30029>;tag=tag.

To: <sip:1.1.5695103.en-fe@10.10.30.111:5060>;tag=tag.

From: "sai_live_fname_2"<sip:sai_live_fname_2@xxxxxxxxxx:5060>;tag=1b45d73e.

Call-ID: eY-W-3RpyV_JOvtcXaOnTw...

CSeq: 1 INVITE.

P-Charging-Vector: icid-value=769118466.

Content-Length: 0

 

I’m attaching source code and output in separate files. Please suggest me if I’m doing anything wrong.

 

 

Thanks & Regards,

LavanyaKumar S

+91 9603323366

 

From: slgodin@xxxxxxxxx [mailto:slgodin@xxxxxxxxx] On Behalf Of Scott Godin
Sent: Wednesday, July 12, 2017 09:33 PM


To: LavanyaKumar <lavanyakumar.s@xxxxxxxxxxx>
Cc: resiprocate-users@resiprocate.org; resiprocate-devel@resiprocate.org
Subject: Re: [reSIProcate-users] Help - Facing problem to send sip message towards proxy

 

 

 

On Wed, Jul 12, 2017 at 9:30 AM, LavanyaKumar <lavanyakumar.s@xxxxxxxxxxx> wrote:

Hi Scott,

 

Hope you are doing good.

 

Thanks for your previous suggestion. I’m facing another issue while enhancing my application.

 

I have tried to integrate StackThread class in my application by referring stack/test/testStack hxx and cxx files with some minor configuration changes in transport ports. I have taken two SipStack pointers each for receiving, sending and assigned 2271 as receiving port and 2272 as sending port.

 

[Scott] You really only need one SipStack for any SIP based application.  It can both send and receive messages.  The testStack program creates multiple stacks for testing only.

 

When i make a call, I'm receiving the message to application and able to process successfully. But when i'm trying to send new request from application, i'm getting this below error

 

ERR | 20170712-134943.117 |  | RESIP | 140053664692192 | DataParameter.cxx:91 | Accessing defaulted DataParameter: 'tag'

B2BServer: DataParameter.cxx:93: virtual std::ostream& resip::DataParameter::encode(std::ostream&) const: Assertion `!mValue.empty()' failed.

 

When i debugged this i got to know this error is for headerEnum 11, which is of Contact header. Though it is of NameAddr type, tag is not mandatory parameter for Contact right?

 

I'm providing complete output in the attached file ‘Stack_Error2.txt’ . Can you suggest some clue to resolve my issue if i'm doing anything wrong.

 

[Scott]  It is too hard to troubleshoot this without seeing your code.

 

Can we use same SipStack pointer with only one transport to send and receive sip messages which are out of transaction?

 

[Scott]  You only need 1 SipStack and at least one transport.  You cannot pass the same transport to 2 SipStacks. 

 

Also I have few queries in StackThread class. As per your previous comment, process() should be in loop, i couldn't find explicit while or for loop in the file.

Does these statements runs in loop?

 

receiver->process(fdset);

sender->process(fdset);

 

Could you explain how its working?

 

[Scott]  Sorry I forgot testStack got reasonably complicated recently.  testSipStackInvite might be an easier example to read.

Some information here:

and

and

 

 

Thanks & Regards,

LavanyaKumar S

+91 9603323366

 

From: slgodin@xxxxxxxxx [mailto:slgodin@xxxxxxxxx] On Behalf Of Scott Godin
Sent: Thursday, June 29, 2017 08:27 PM
To: LavanyaKumar <lavanyakumar.s@xxxxxxxxxxx>
Cc: resiprocate-users@resiprocate.org; resiprocate-devel@resiprocate.org
Subject: Re: [reSIProcate-users] Help - Facing problem to send sip message towards proxy

 

You need to process in a loop.  Check out stack/test/testStack and other programs in the test directory.   You can use StackThread class to help.

 

There is also info on the wiki for this:  http://www.resiprocate.org/DUM_Threading

 

Just ignore the DUM parts of the wiki page.

 

Good luck,

Scott

 

 

On Wed, Jun 28, 2017 at 3:57 AM, LavanyaKumar <lavanyakumar.s@xxxxxxxxxxx> wrote:

Hi,

 

I'm new to resiprocate. I'm trying to send an INVITE request from my linux machine. I'm able to generate a SIP message. But unable to forward to my proxy with the details filled in Route header. My requirement is to use resip but not dum as our application will handle session.

 

Here i'm attaching my code and output. Not sure whether i missed something.

 

Could someone please help probably with some sample references or examples.

 

We are using resiprocate-1.9.10.

 

Thanks & Regards,

LavanyaKumar S

 


_______________________________________________
resiprocate-users mailing list
resiprocate-users@resiprocate.org
List Archive: http://list.resiprocate.org/archive/resiprocate-users/