[pjsip] Interesting question: How to make a message be sent to a specific IP/Port, even if the Request URI has an UNRESOLVABLE domain name?

Muthusamy, Balamurugan bmuthusa at qualcomm.com
Wed Aug 12 19:32:45 EDT 2009


This is exactly the option that we came up with and I am implementing to see what could happen.  Let me keep you posted Klaus.

Thank you for the answer.
Bala

-----Original Message-----
From: pjsip-bounces at lists.pjsip.org [mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of Klaus Darilion
Sent: Wednesday, August 12, 2009 4:30 PM
To: pjsip list
Subject: Re: [pjsip] Interesting question: How to make a message be sent to a specific IP/Port, even if the Request URI has an UNRESOLVABLE domain name?

I have never tried pjsip API - can you add arbitrary header? You can try 
adding a Route header before sending the message, e.g:

   Route: sip:10.8.30.52;lr

regards
Klaus

Muthusamy, Balamurugan wrote:
> I am currently using PJSIP for doing load testing, and this is a 
> terrific tool to help us do that.
> 
>  
> 
> For the setup that we have, I need to be able to send REGISTER to a 
> different server/port combination and the INVITEs to a different one, 
> and some of the other MESSAGE to a different server/port combination.
> 
>  
> 
> The only gotcha in all this is that the Request URI for all these 
> messages is going to be the same.  Now, after constructing the message 
> and the pjsip_tx_data *tdata associated for the message, is there a way 
> to force the pjsip to send the requested UAC to a specific IP/Port 
> combination?
> 
>  
> 
> If I give the Request URI to be MESSAGE test10 at 10.8.30.52:5060 
> <mailto:test10 at 10.8.30.52:5060>, then it works, but unfortunately the 
> request URI has to contain test10 at mydomain.com 
> <mailto:test10 at mydomain.com>.   This eventually tries to get resolved in 
> DNS, and it obviously fails.  What would be the best way to send a 
> message to a specific IP/Port?
> 
>  
> 
> FYI, I am currently using: pjsip_endpt_send_request.  In case this 
> helps, here is the stack trace when of how the call is made:
> 
> #0  pjsip_endpt_send_request_stateless (endpt=0x6809f8, tdata=0x6a6c18, 
> token=0x6a7c28,
> 
>     cb=0x443380 <send_msg_callback>) at ../src/pjsip/sip_util.c:1258
> 
> #0  tsx_send_msg (tsx=0x6a7c28, tdata=0x6a6c18) at 
> ../src/pjsip/sip_transaction.c:1803
> 
> #1  0x0000000000443915 in tsx_on_state_null (tsx=0x6a7c28, 
> event=Variable "event" is not available.
> 
> ) at ../src/pjsip/sip_transaction.c:2077
> 
> #2  0x0000000000442dd9 in pjsip_tsx_send_msg (tsx=0x6a7c28, 
> tdata=0x6a6c18) at ../src/pjsip/sip_transaction.c:1582
> 
> #3  0x0000000000444bb6 in pjsip_endpt_send_request (endpt=Variable 
> "endpt" is not available.
> 
> ) at ../src/pjsip/sip_util_statefull.c:114
> 
> #4  0x00000000004048e2 in sendSipMessage (pool=0x6a5b60, 
> from=0x7fbfffe320, to=Variable "to" is not available.
> 
> ) at ../src/samples/simpleua.c:257
> 
> #5  0x00000000004050db in make_register () at ../src/samples/simpleua.c:674
> 
> #6  0x00000000004059d1 in main (argc=Variable "argc" is not available.
> 
>  
> 
> Thanks,
> 
> Bala
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




More information about the pjsip mailing list