[Asterisk-Users] Realtime does not work yet, ...

Ronald Wiplinger ronald at elmit.com
Sun Mar 13 18:27:52 MST 2005


Matthew Boehm wrote:

>Are you sure that NAT is set correctly everywhere? I sometimes forget to set
>the phone to be NAT aware.
>
>That is weird that 'sip show peers/users' doesn't show the phone both times.
>
>Have you stopped/started asterisk since these changes? Do it again just to
>make sure.
>
>The only thing I can say is that this works in our office. Asterisk is on
>public IP while phones are all inside private network, NAT'd to outside.
>
>-Matthew
>  
>
Matthew,

I came a big step further!
I rebooted the Grandstream and now I get both: sip show users/peers
However, it is still not working ;-(

Calling to 621 (Grandstream) is working, but from 621 will give me in 
*CLI a:
Mar 14 09:03:30 NOTICE[29502]: chan_sip.c:2917 process_sdp: No 
compatible codecs!

I used these working settings of the the sip.conf to create the database 
record:

; Test phone set 621 (Grandstream BudgeTone 101)
[621]  
type=friend
username=621
secret=Password
nat=yes
host=dynamic
context=inhouse           
canreinvite=yes
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
qualify=1000
mailbox=621 at other
pickupgroup=1

After changing the nat field from int(1) to varchar(5) I used the 
following script to create this table with one record again:
DROP TABLE sip_buddies;
CREATE TABLE sip_buddies (
  id int(11) NOT NULL auto_increment,
  name varchar(80) NOT NULL default '',
  accountcode varchar(20) default NULL,
  amaflags varchar(7) default NULL,
  callgroup varchar(10) default NULL,
  callerid varchar(80) default NULL,
  canreinvite char(3) default 'yes',
  context varchar(80) default NULL,
  defaultip varchar(15) default NULL,
  dtmfmode varchar(7) default NULL,
  fromuser varchar(80) default NULL,
  fromdomain varchar(80) default NULL,
  host varchar(31) NOT NULL default '',
  incominglimit int(2) default NULL,
  outgoinglimit int(2) default NULL,
  insecure varchar(4) default NULL,
  language char(2) default NULL,
  mailbox varchar(50) default NULL,
  md5secret varchar(80) default NULL,
  nat varchar(5) NOT NULL default 'yes',
  permit varchar(95) default NULL,
  deny varchar(95) default NULL,
  mask varchar(95) default NULL,
  pickupgroup varchar(10) default NULL,
  port varchar(5) NOT NULL default '',
  qualify char(3) default NULL,
  restrictcid char(1) default NULL,
  rtptimeout char(3) default NULL,
  rtpholdtimeout char(3) default NULL,
  secret varchar(80) default NULL,
  type varchar(6) NOT NULL default 'friend',
  username varchar(80) NOT NULL default '',
  allow varchar(100) default 'g729;ilbc;gsm;ulaw;alaw',
  disallow varchar(100) default 'all',
  musiconhold varchar(100) default NULL,
  regseconds int(11) NOT NULL default '0',
  ipaddr varchar(15) NOT NULL default '',
  cancallforward char(3) default 'yes',
  PRIMARY KEY  (id),
  UNIQUE KEY name (name),
  KEY name_2 (name)
) TYPE=MyISAM ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `sip_buddies`
--

INSERT INTO sip_buddies VALUES 
(1,'621',NULL,NULL,NULL,'\"Demo\",<621>','yes','inhouse',NULL,'rfc2833',NULL,NULL,'dynamic',NULL,NULL,NULL,NULL,'621 at other',NULL,'yes',NULL,NULL,NULL,'1','','999',NULL,NULL,NULL,'Password','friend','621','ulaw;alaw','all',NULL,0,'','yes');

since the qualify field is only 3 characters, I changed it from 1000 to 
999. Could I change the field length to 4 characters, to get 1000 in 
again, without breaking it on another place?

and:

>>You are right, ... but the sip.conf will not be updated anyway, if I do
>>not want to loose all my settings.
>>
>>    
>>
>>>rtcachefriends=yes
>>>; Cache realtime friends by adding them to the internal list
>>>; just like friends added from the config file only on a
>>>; as-needed basis.
>>>
>>>rtnoupdate=yes
>>>; do not send the update request over realtime.
>>>
>>>rtautoclear=yes
>>>; Auto-Expire friends created on the fly on the same schedule
>>>; as if it had just registered when the registration expires
>>>; the friend will vanish from the configuration until requested
>>>; again.  If set to an integer, friends expire
>>>; within this number of seconds instead of the
>>>; same as the registration interval
>>>
>>>      
>>>
BTW, is there an easy way to find out what has changed for the config files?



bye

Ronald




More information about the asterisk-users mailing list