0
votes

I've installed Asterisk 11 on CentOS 6.4 and MySQL Database real-time. I followed this manual.

I changed all sip.conf, extenstions.conf and extconfig.conf. I could successfully connect Asterisk to MySQL database in real-time. User registration worked fine. However, I couldn't hear any sound from the phone, and I couldn't make a call to another phone.

here is the logs when I make a call to "user 2000" from "user 1000"

[Apr 12 00:24:11] WARNING[19656][C-0000000c]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Apr 12 00:24:11] WARNING[19656][C-0000000c]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Apr 12 00:24:11] WARNING[19656][C-0000000c]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
  == Using SIP RTP CoS mark 5
[Apr 12 00:24:11] WARNING[19656][C-0000000c]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
    -- Executing [2000@from-sip:1] Dial("SIP/1000-0000000b", "SIP/2000|30")
[Apr 12 00:24:11] WARNING[22592][C-0000000c]: pbx.c:1618 pbx_exec: The application delimiter is now the comma, not the pipe.  Did you forget to convert your dialplan?  (Dial(SIP/2000|30))
  == Using SIP RTP CoS mark 5
[Apr 12 00:24:11] ERROR[22592][C-0000000c]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("2000|30", "(null)", ...): Name or service not known
[Apr 12 00:24:11] WARNING[22592][C-0000000c]: chan_sip.c:6204 create_addr: No such host: 2000|30
[Apr 12 00:24:11] WARNING[22592][C-0000000c]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [2000@from-sip:2] VoiceMail("SIP/1000-0000000b", "2000@from-sip")
    -- <SIP/1000-0000000b> Playing 'vm-intro.gsm' (language 'en')
    -- <SIP/1000-0000000b> Playing 'beep.gsm' (language 'en')
    -- Recording the message
    -- x=0, open writing:  /var/spool/asterisk/voicemail/from-sip/2000/tmp/5lOmnn format: wav49, 0x7fa2b80013d8
    -- x=1, open writing:  /var/spool/asterisk/voicemail/from-sip/2000/tmp/5lOmnn format: gsm, 0x7fa2b80049b8
    -- x=2, open writing:  /var/spool/asterisk/voicemail/from-sip/2000/tmp/5lOmnn format: wav, 0x7fa2b80041b8

Do you see what is the problem?

sip.conf

[general]
 context=from-sip                        ; Default context for incoming calls
 ;
 bindport=5060                   ; bindport is the local UDP port that Asterisk will listen on
 bindaddr=0.0.0.0           ; IP address to bind to (0.0.0.0 binds to all)
 ;
 disallow=all                    ; First disallow all codecs
 allow=gsm
 allow=ulaw                      ; Allow codecs in order of preference
 ;
 register => 12121111111:1234:[email protected]/1000

extensions.conf

[general]
 [globals]
 ;
 [from-sip]
 switch =>Realtime

res_config_mysql.conf

[general]
dbhost = 127.0.0.1
dbname = asteriskrealtime
dbuser = root
dbpass = password
dbport = 3306
1
Not an asterisk expert, but these two lines look like a problem; The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (Dial(SIP/2000|30)) and getaddrinfo("2000|30", "(null)", ...): Name or service not known. In other words, your config needs to be updated.Joachim Isaksson
@JoachimIsaksson I followed the manual.. It don't see what I need to change in config files..Jake
The example is probably not updated for the new syntax. It would seem Dial(SIP/2000|30) should be Dial(SIP/2000,30). It's probably generated from the extensions table in the database, the row ` ('from-sip','_X.',1,'Dial','SIP/${EXTEN}|30')` should then be ` ('from-sip','_X.',1,'Dial','SIP/${EXTEN},30')`Joachim Isaksson

1 Answers

1
votes

You have write correct dialplan in extensions table in db.

For asterisk below 1.4 you have use appdata with pipe (|) delimiter, for newer version you have use comma.