Hi Brandon!
Back to the original email ....
Brandon Armstead schrieb:
Hello guys,
Is there a method upon using lookup("location") to also pull out the
"socket" information for the original location the UAC registered to,
for scenarios of this example:
P1 & P2 share same usrloc database.
UA1 registers to P1
UA2 registers to P2
UA1 calls UA2
UA1 invites -> P1 -> INVITES -> UA2 (bypassing P2 -- where the actual
nat binding is).
Now upon P1 looking up usrloc for UA2, I would like to recognize that P1
is not the Proxy to deliver the call, and forward the request to P2 to
send to UA2.
So currently I have:
UA1 INVITE -> P1 INVITE -> UA2
I wish to have:
UA1 INVITE -> P1 INVITE -> P2 INVITE -> UA2
Is there an easy method to do this? I have been looking at the new nat
traversal module it looks like it is doable with this (any further input
as far as that?). Also is it possible with the classic Nat Helper
module? Any input is appreciated, thanks!
I think the nat_traversal module can not help you in this case, nor
nathelper.
One possibility would be to spoof at P1 the IP address of P2 -
nevertheless this would cause the reply sent back to P2, but the
transaction is created in P1. (and you need to hack Kamailio for IP
spoofing).
Another easy solution would be: In P1 set a certain branch-flag when the
client registers, e.g. bflag 1. In P2 set a certain branch-flag when the
client registers, e.g. bflag 2.
Now, if a user is called, just make a lookup() and t_relay. Further in
the branch_route check if:
in P1: isbflagset(2) --> forward to P2
in P2: isbflagset(1) --> forward to P1
klaus
------------------------------------------------------------------------
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users