Hello Mike,
Thank you for your suggestion, it works !!
I modified the url passed to the NUTAG_URL on nua_create() as following :
NUTAG_URL("sip:external-ip:local-port;maddr=local-ip")
The Via header of outgoing REQUEST becames :
Via: SIP/2.0/UDP external-ip:local-port;rport;branch=z9hG4....
However, this still is not exactly what I need. It's my mistake that did
not explain my question completely during the last post. I have local-ip,
local-port which I want the sip stack to bind to, and I also have its
corresponding external-ip external-port obtained by stun (not use sofia-sip
api). So, I want the outgoing Via header as following, and sip stack still
bind to local-ip:local-port.
Via: SIP/2.0/UDP external-ip:external-port;branch=z9hG4....
Is there any possible way to do this ? If my wish is simply not possible,
what should I try to do ? modify rport, or some else ways ??
I very appreciate your help, Mike. And thanks for all your reading, look
forward to the reply.
On 4/23/07, Michael Jerris <[EMAIL PROTECTED]> wrote:
If you add ;maddr=1.2.3.4 where 1.2.3.4 is the interface ip to bind to,
to the end of the url that you pass to the NUTAG_URL on nua_create then it
binds to the address specified in maddr but properly uses the first part of
that url for the via and contact.
Mike
------------------------------
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *James Tsai
*Sent:* Monday, April 23, 2007 7:52 AM
*To:* [email protected]
*Subject:* [Sofia-sip-devel] Duplicated VIA headers of SIP REQUEST
Dear all,
Did anyone know how to modify the Via header of outgoing SIP REQUEST by
using nua level apis? Because I want to fill the external IP of NAT that I
obtained (by using some else mechanism outside of sofia-sip).
I add "SIPTAG_VIA_STR("SIP/2.0/UDP external_ip")" when creating the handle
that is used to sent out SIP REQUEST. But it cause the duplicated Via header
of REQUEST i sent, as following :
Via: SIP/2.0/UDP 192.168.1.100;rport;branch=z9hG4b......
Via: SIP/2.0/UDP external_ip
(It is not exactly I need)
By using nua level api, is that any possible way to replace or remove the
original Via header generated by sofia-sip stack ?
Thanks for your reading, and looking forward to any possible solution?
--
James.CM.Tsai
--
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel