Summary:ASTERISK-11876: [patch] Registration when using fromuser@fromdomain:pass@host is incomplete
Reporter:Steve Davies (one47)Labels:
Date Opened:2008-04-18 09:21:58Date Closed:2009-05-20 06:57:57
Versions:Frequency of
Environment:Attachments:( 0) sip-reg-fromdom.dpatch
( 1) sip-reg-fromdom2.dpatch
Description:The standard SIP registration line is:
which can be extended as

In this 2nd form, sip channel fails to set fromdomain correctly, to the REGISTER command is sent as
 REGISTER sip:host SIP/2.0
instead of
 REGISTER sip:fromdomain SIP/2.0

This is supported by the existing comments in chan_sip.c


This was discovered when connecting to a Finnish service, where registration failed unless the fromdomain was sent correctly, and unusually fromdomain was not the same as username.

Untested patch which patches against both 1.2.25 and 1.4.19 is attached - Will add feedback when I've tried the patch in the lab.
Comments:By: Steve Davies (one47) 2008-04-18 10:56:05

Fixed a silly mistake in the patch, which is now tested on our 1.2.x rig, and seems to work exactly as intended.

By: Olle Johansson (oej) 2008-04-18 13:36:56

Will check this next week or during the weekend. It'll be an Asterisk SIP week in Orlando :-)

Thank you for your contribution and fix!

By: Steve Davies (one47) 2008-04-21 06:18:47

As an aside, I suspect that there is a similar issue with the code that "pokes" a server. After the registration is completed, the OPTIONS request uses "fullcontact" in its request, if there is no registration, it uses "tohost" - I suspect that it might be worth using "fromdomain" if it is set, in the same way we do elsewhere in chan_sip.

Of course in the poke-sip-peer case, as long as we get a reply, we don't care if it is "404 I hate your request headers" - As long as we get *something* back. :)

By: Digium Subversion (svnbot) 2008-07-01 09:52:25

Repository: asterisk
Revision: 126902

U   branches/1.4/channels/chan_sip.c

r126902 | oej | 2008-07-01 09:52:15 -0500 (Tue, 01 Jul 2008) | 7 lines

Use domain part of SIP uri in register= configuration as fromdomain.

Reported by: one47
     sip-reg-fromdom2.dpatch uploaded by one47 (license 23)
(closes issue ASTERISK-11876)



By: Olle Johansson (oej) 2008-07-01 09:55:43

Next week took a long time. Sorry.