[asterisk-users] REGISTER forwarding problem

Alex Balashov abalashov at evaristesys.com
Fri Aug 5 06:32:39 CDT 2011


On 08/04/2011 01:45 PM, Baybal Ni wrote:

> I see 401, but asterisk has my proxy in its trunk list. Can this be
> caused by anything else?

Some sort of failure to match the proxy to the sip.conf peer.

> Is there any way to do it without using path extension?

We do it by having the proxy rewrite the Contact header somewhat 
steganographically.  For instance, if the REGISTER comes into the proxy 
with a Contact of <sip:s at xxx.xxx.xxx.xxx:5060>, we extract those URI 
particles and do:

   remove_hf("Contact");
   append_hf("Contact: <sip:s+xxx.xxx.xxx.xxx.xxx:5060>\r\n");

   (s, xxx.xxx.xxx.xxx and 5060 are filled in by PVs)

On the inbound leg, the request URI of the initial INVITE is parsed and 
these elements are selected back out.

-- 
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the asterisk-users mailing list