I'm having a strange problem with a sip client and 2 asterisk servers
connected together with a sip trunk. Here's a rough layout
sip_client ------ Asterisk A -----[sip trunk] ------ Asterisk B
when the sip client tries to dial an extension on Asterisk B, Asterisk
A sends the invite to B using "sip_client@[ip address of asterisk A]"
rather than the username A uses to talk to B. Of course B refuses the
invite because sip_client registers to asterisk A, not to asterisk B.
If a non-sip device connected to A phones the same extension on B,
everything works fine.
I have insecure=invite on both A and B. I don't understand why A tries
to send the invite with the username its client registers to A with,
rather than the username A registers to B with. When the incomming
call to A (destined for B) doesn't originate on SIP (unistim in this
case), obviously A correctly uses the username it registers at B with,
as the call goes through.
What am I missing here?
Andrew