Jean-Marc V. Liotier
2004-Mar-06  10:54 UTC
[Asterisk-Users] Grandstream Budgetone SIP registration fails
This is a very basic problem, and I feel stupid to resort to the list to
solve it, but after three hours pulling my hair trying all combinations
of a handful of parameters and getting nowhere I fail to see the path
leading to a solution.
I just got a pair of Budgetones. I have played a little with Asterisk
before, for example using Gnophone to call the talking clock, to leave
voicemail and receive it by email or to call the Digium IVR - basic
stuff but this is hust to point out that I am not completely lost with
Asterisk. Although I am new to the SIP part I have probably read all
that there is to read about configuring a SIP phone with Asterisk : it
seems like a very simple process and it makes not succeeding even more
frustrating... Whatever solution I find I will add to the wiki !
Here is the Asterisk console output of what the phone initially sends
when it attempts SIP registration :
Sip read: 
REGISTER sip:192.168.1.30 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bK4f3dc531eb4f14dc
From: <sip:6040@192.168.1.30>;tag=eb4f14dc11187288
To: <sip:6040@192.168.1.30>
Contact: *
Call-ID: 365d952bded45bf0@192.168.1.40
CSeq: 102 REGISTER
Expires: 0
User-Agent: Grandstream SIP UA 1.0.4.23
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0
Here is the relevant section of sip.conf :
[6040]
username=6040
secret=mysecret
type=friend
                                                                                
The phone is on a static IP address. I have tried various possibly useful
additions I picked along my readings such as :
defaultip=192.168.1.40
auth=md5
reinvite=no
nat=no
qualify=1000
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
But it makes no difference to my authentication problem, so I stuck to
the most basic possible set of parameters.
Now the worst part is that at some point I got a working setup, but I
changed something afterward to try to make it better, but I neglected
taking note of the working setup and I broke it again. I never found the
working setup again... Next time I'll make a backup copy of the working
setup before trying to ameliorate it...
On a successful attempt, here is the Asterisk console output of what the
phone initially sends when it attempts SIP registration :
Sip read: 
REGISTER sip:192.168.1.30 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bK43770e17dbdb1738
From: <sip:poste40@192.168.1.30>;tag=1c6ad3084cb9ac64
To: <sip:poste40@192.168.1.30>
Contact: <sip:poste40@192.168.1.40>
Proxy-Authorization: DIGEST username="poste40",
realm="asterisk",
algorithm=MD5, uri="sip:192.168.1.30", nonce="4c7355bd",
response="7c3304ec9ffa7069de64ed17ef72f14d"
Call-ID: 5875e220123e627a@192.168.1.40
CSeq: 103 REGISTER
Expires: 3600
User-Agent: Grandstream SIP UA 1.0.4.23
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0
It is different from what the phone sent before a failed attempt. The
main difference is that the 'Contact: *' line of the failed attempt is
replaced by :
Contact: <sip:poste40@192.168.1.40>
Proxy-Authorization: DIGEST username="poste40",
realm="asterisk",
algorithm=MD5, uri="sip:192.168.1.30", nonce="4c7355bd",
respo
Since this is the initial packet in the SIP session and it is emitted by
the client, I infer that the solution of my problem certainly lies in
the configuration of the phone. Admin password, IP configuration and SIP
server address being proved correct since I access the phone's
administrative interface and the phones reaches the , the only remaining
parameters that have been changed are :
SIP User ID: 6040
Authenticate ID: 6040
Authenticate Password: mysecret
Now what ? I tried countless combinations of those parameters with the
basic configuration on the server, but I can't find the working one. The
answer is probably very simple and very obvious...
Someone on the list certainly has a working setup with Asterisk and
Grandstream Budgetone phones, I would be grateful if their SIP
configuration was posted to the list. Quite unexpectedly I found no
complete example of such working setup on the Web, maybe because it was
so simple that no one thought that posting it would be useful to anyone.
One I get mine working I shall post the parameters !
Tony Mountifield
2004-Mar-06  14:04 UTC
[Asterisk-Users] Re: Grandstream Budgetone SIP registration fails
In article <1078595645.9560.49.camel@Senecio>, Jean-Marc V. Liotier <asterisk-users@lists.digium.com> wrote:> Someone on the list certainly has a working setup with Asterisk and > Grandstream Budgetone phones, I would be grateful if their SIP > configuration was posted to the list. Quite unexpectedly I found no > complete example of such working setup on the Web, maybe because it was > so simple that no one thought that posting it would be useful to anyone. > One I get mine working I shall post the parameters !Well my sip.conf looks like this: ------------------------------------------------------------------------------ ; ; SIP Configuration for Asterisk ; [general] port = 5060 ; Port to bind to bindaddr = 0.0.0.0 ; Address to bind to context=from-sip-external ; send unknown SIP callers to this context allow=ulaw allow=ilbc ; ; Tony's phone ; [2000] type=friend username=2000 secret=password host=dynamic context=from-sip-internal mailbox=2000 callerid=2000 dtmfmode=info ; ; Rachel's phone ; [2001] type=friend username=2001 secret=password host=dynamic context=from-sip-internal mailbox=2001 callerid=2001 dtmfmode=info ------------------------------------------------------------------------------ Then in the admin interface for Tony's phone I have the following: IP address: dynamic from DHCP SIP server: IP of Asterisk server Outbound proxy: empty SIP User ID: 2000 Authenticate ID: 2000 Auth password: password Vocoder choices (in order): PCMU, PCMA, then others .... SIP user ID is phone number: Yes SIP Registration: Yes Clear reg on reboot: No Reg expiration: 3 Early dial: No .... Local SIP port: 5060 Local RTP port: 5004 Use random port: No NAT Traversal: No .... Send DTMF: Via SIP INFO .... I think that's all the likely relevant ones. Hope this helps Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org
Jean-Marc V. Liotier
2004-Mar-08  09:39 UTC
[Asterisk-Users] Grandstream Budgetone SIP registration fails
On Sun, 2004-03-07 at 13:03, Philipp von Klitzing answered off-list:> > > [6040] > > defaultip=192.168.1.40 > > Replace this with "host=dynamic" and see what happens.That's it ! Thinking it was going to make things easier to diagnose, I had chosen to set the phones with a static IP. Apparently, wether defaultip is set or not, when the phone uses a static IP address, some assumptions are made about authentication. I do not understand what they are and which side assumes something, but it prevents SIP registration. Setting host=dynamic even though I use static IP addresses solved the problem. Many hours went into finding that out. If somebody has a clue about how the a static IP address influences the SIP registration process, I would be happy to know about it.> > reinvite=no > > That paramter does not exist - use "canreinvite=" instead of "reinvite=" > This is a common error, and there are even examples on the web that > include this faulty setup option.I also saw it in several examples.> > dtmfmode=rfc2833 > > For voicemail I had to switch to =info, but if =rfc works fine for you > then stick with it.Thanks for all that advice, and thanks to others who contributed to this thread. Now that I have completed my first Grandstream to Grandstream call via the Asterisk server I feel much better and I can't wait for the QuadBRI to arrive so I can really begin to make useful stuff ! Here is my current working configuration : - In sip.conf : [6040] username=6040 secret=mysecret host=dynamic type=friend canreinvite=no dtmfmode=info disallow=all allow=ulaw allow=alaw - On the phone side : SIP User ID: 6040 Authenticate ID: 6040 Authenticate Password: mysecret SIP User ID is phone number: Yes (everything else is default) Nothing special about that configuration, so I guess it's not worthy of a wiki addition. What would be and should really should be looked into is the failure of SIP registration when a static IP is set without "host=dynamic". -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040308/a1a732b6/attachment.pgp
Matthew Marlowe
2004-Mar-08  11:59 UTC
[Asterisk-Users] Grandstream Budgetone SIP registration fails
Does using registration via ip instead of user/pass provide any better stability or anything of the liking? -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Olle E. Johansson Sent: Monday, March 08, 2004 12:50 PM To: Asterisk Users Subject: Re: [Asterisk-Users] Grandstream Budgetone SIP registration fails Jean-Marc V. Liotier wrote:> On Sun, 2004-03-07 at 13:03, Philipp von Klitzing answered off-list: > >>>[6040] >>>defaultip=192.168.1.40 >> >>Replace this with "host=dynamic" and see what happens. > > > That's it ! > > Thinking it was going to make things easier to diagnose, I had chosen > to set the phones with a static IP. Apparently, wether defaultip is > set or not, when the phone uses a static IP address, some assumptions > are made about authentication. I do not understand what they are and > which side assumes something, but it prevents SIP registration. > Setting host=dynamic even though I use static IP addresses solved theproblem.> > Many hours went into finding that out. If somebody has a clue about > how the a static IP address influences the SIP registration process, I> would be happy to know about it.Registration is simply a way for a SIP device to tell the PBX "I'm here, place any calls to this IP address". To be able to do so, most configurations require the client to authenticate. If you configure a static address, the PBX already know how to reach the client and no registration is therefore needed (and not allowed in asterisk). Enabling registration makes the SIP device mobile across the network. Configuring a static address locks it in. /Olle _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users