<pre>Hi Guys,<br><br>We have just set up Asterisk 1.0.7 with (CVS Head) for a realtime enviorment using MySQL & Asterisk Addons.<br><br>I have populated the "sip_buddies" table with the same information that is came from our
sip.conf, however registration seems to fail for the <br>softphone we have set up.<br><br>Does anyone have any idea what we have done? Asterisk Console Message when SIP try to login<br><span style="color: rgb(255, 0, 0);">
Aug 5 11:52:31 NOTICE[8941]: chan_sip.c:9518 handle_request_register: Registration from 'vinodmalani <<a href="mailto:sip:400@192.168.0.34">sip:400@192.168.0.34</a>>' failed for '<a href="http://192.168.0.112">192.168.0.112
</a>'<br><br><span style="color: rgb(0, 0, 0);">*CLI> dial 400@mycontext </span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">*CLI> -- Executing Dial("OSS/dsp", "SIP/400")
</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Aug 5 12:24:06 WARNING[9008]: chan_sip.c:1780 create_addr: No such host: 400</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
Destroying call '<a href="mailto:062eb8b7544d47895a99c70013100b94@127.0.0.1">062eb8b7544d47895a99c70013100b94@127.0.0.1</a>'</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Aug 5 12:24:06 NOTICE[9008]: app_dial.c:1091 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination)
</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);"> == Everyone is busy/congested at this time (1:0/0/1)</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);"> -- Executing Answer("OSS/dsp", "Ringing")
</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);"> << Console call has been answered >></span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
<-- SIP read from <a href="http://192.168.0.112:5060">192.168.0.112:5060</a>:</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">--- (0 headers 0 lines) Nat keepalive ---
</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Aug 5 12:24:19 WARNING[9008]: pbx.c:2334 __ast_pbx_run: Timeout, but no rule 't' in context 'mycontext'</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
<< Hangup on console >></span><br style="color: rgb(0, 0, 0);"><br>SIP DEBUG MESSAGE ( for reference )<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);"><-- SIP read from <a href="http://192.168.0.112:5060">
192.168.0.112:5060</a>:</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">REGISTER sip:<a href="http://192.168.0.34">192.168.0.34</a> SIP/2.0</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
Via: SIP/2.0/UDP <a href="http://192.168.0.112:5060">192.168.0.112:5060</a>;rport;branch=z9hG4bK46E3233E27ED47DABD0B778CE4D37C87</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">From: vinodmalani <
<a href="mailto:sip:400@192.168.0.34">sip:400@192.168.0.34</a>>;tag=1345370993</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">To: vinodmalani <<a href="mailto:sip:400@192.168.0.34">sip:400@192.168.0.34
</a>></span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Contact: "vinodmalani" <sip:400@192.168.0.112:5060></span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
Call-ID: <a href="mailto:E862870D99084D8EAE98225AB0774939@192.168.0.34">E862870D99084D8EAE98225AB0774939@192.168.0.34</a></span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">CSeq: 55251 REGISTER</span>
<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Expires: 1800</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Max-Forwards: 70</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
User-Agent: X-Lite release 1103m</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Content-Length: 0</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">--- (11 headers 0 lines)---</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Using latest request as basis request</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
Sending to <a href="http://192.168.0.112">192.168.0.112</a> : 5060 (NAT)</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Transmitting (NAT) to <a href="http://192.168.0.112:5060">192.168.0.112:5060
</a>:</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">SIP/2.0 403 Forbidden</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Via: SIP/2.0/UDP <a href="http://192.168.0.112:5060">
192.168.0.112:5060</a>;branch=z9hG4bK46E3233E27ED47DABD0B778CE4D37C87;received=<a href="http://192.168.0.112">192.168.0.112</a>;rport=5060</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">From: vinodmalani <
<a href="mailto:sip:400@192.168.0.34">sip:400@192.168.0.34</a>>;tag=1345370993</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">To: vinodmalani <<a href="mailto:sip:400@192.168.0.34">sip:400@192.168.0.34
</a>>;tag=as740959f2</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Call-ID: <a href="mailto:E862870D99084D8EAE98225AB0774939@192.168.0.34">E862870D99084D8EAE98225AB0774939@192.168.0.34</a></span>
<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">CSeq: 55251 REGISTER</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">User-Agent: Asterisk PBX</span><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Contact: <<a href="mailto:sip:400@192.168.0.34">sip:400@192.168.0.34
</a>></span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Content-Length: 0</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
---</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Aug 5 12:24:39 NOTICE[9008]: chan_sip.c:9518 handle_request_register: Registration from 'vinodmalani <<a href="mailto:sip:400@192.168.0.34">
sip:400@192.168.0.34</a>>' failed for '<a href="http://192.168.0.112">192.168.0.112</a>'</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Scheduling destruction of call '<a href="mailto:E862870D99084D8EAE98225AB0774939@192.168.0.34">
E862870D99084D8EAE98225AB0774939@192.168.0.34</a>' in 15000 ms</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Destroying call '<a href="mailto:E862870D99084D8EAE98225AB0774939@192.168.0.34">E862870D99084D8EAE98225AB0774939@192.168.0.34
</a>'</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);"><-- SIP read from <a href="http://192.168.0.112:5060">192.168.0.112:5060</a>:</span><br style="color: rgb(0, 0, 0);">
<br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">--- (0 headers 0 lines) Nat keepalive ---</span><br><br><span style="color: rgb(51, 0, 51);">i am describing entire files that we have used
</span><br></span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 0, 153);">extconfig.conf :- content</span><br>[settings]<br>sippeers => mysql,cdr,sip_buddies<br>sipusers => mysql,cdr,sip_buddies<br>
;sipfriends => mysql,cdr,sip_buddies<br>realextension => mysql,cdr,extensions_table <br><br style="color: rgb(51, 51, 153);"><span style="color: rgb(51, 0, 153);">extensions.conf : content</span><br>[general]
<br>static=no / yes ( tried with both)
<br>writeprotect=yes / no ( tried with both)
<br><br>[mycontext]<br>switch => Realtime/mycontext@realextension<br><br><span style="color: rgb(51, 0, 153);">res_mysql.conf :- content</span><br>[general]
<br>dbhost = <a href="http://127.0.0.1">127.0.0.1</a>
<br>dbname = cdr
<br>dbuser = root
<br>dbpass =
<br>dbport = 3306
<br>dbsock = /tmp/mysql.sock<br><br><span style="color: rgb(51, 0, 153);">sip.conf : content</span><br>[general]<br>type=friend<br>;rtcachefriends = yes<br>;rtcache=yes<br>nat=yes
/ no ( tried with both )<br>( tried with both with DB parameters & without it, but same result of failure )<br>localnet=<a href="http://192.168.0.0/255.255.255.0">192.168.0.0/255.255.255.0</a><br>dbhost = <a href="http://127.0.0.1">
127.0.0.1</a>
<br>dbname = cdr
<br>dbuser = root
<br>dbpass =
<br>dbport = 3306
<br>dbsock = /tmp/mysql.sock<br><br><span style="color: rgb(51, 0, 153);">Modules.conf</span><br>[modules]<br>autoload=yes<br>noload => pbx_gtkconsole.so<br>;load => pbx_gtkconsole.so<br>noload => pbx_kdeconsole.so
<br>noload => app_intercom.so<br>load => chan_modem.so<br>load => res_musiconhold.so<br>noload => chan_alsa.so<br>noload => res_odbc.so<br>noload => libodbc.so<br>noload => pbx_wilcalu.so<br>noload => cdr_odbc.so
<br>load => cdr_addon_mysql.so<br>load => chan_oss.so<br><br>[global]<br>chan_modem.so=yes<br><br>these modules<br>1. noload => chan_alsa.so<br>2. noload => res_odbc.so<br>3. noload => libodbc.so<br>4. noload => pbx_wilcalu.so
<br>5. noload => cdr_odbc.so<br> gave us problem when we updated CVS so we decided to block them... but even after that asterisk was wroking fine with sip.conf & extensions.conf wtih static entries<br><br><br><br>
sip_buddeis table of mysql :- content<br>+---+------+------------+---------+----------+--------------------+------------+----------+----------+---------+---------+-----------+--------+---------+---------+--------+----------+----+-------+-----+-----+------------+-----+--------+------------+-----------+---------------+--------+-------+---------+---------+------------------------+------------+-----------+-------+---------+---------------+
<br>| id| name | accountcode| amaflags| callgroup| callerid | canreinvite| context | defaultip| dtmfmode| fromuser| fromdomain| host | insecure| language| mailbox| md5secret| nat| permit| deny| mask| pickupgroup| port| qualify| restrictcid| rtptimeout| rtpholdtimeout| secret | type | username| disallow| allow | musiconhold| regseconds| ipaddr| regexten| cancallforward|
<br>+---+------+------------+---------+----------+--------------------+------------+----------+----------+---------+---------+-----------+--------+---------+---------+--------+----------+----+-------+-----+-----+------------+-----+--------+------------+-----------+---------------+--------+-------+---------+---------+------------------------+------------+-----------+-------+---------+---------------+
<br>| 2 | vinod| | | | "vinodmalani" <400>| yes | mycontext| | rfc2833 | | | dynamic| | | | | no | | | | | | | | | | testing| friend| 400 | all | g729;ilbc;gsm;ulaw;alaw| | 0 | ip-addr of sip client ( tried with ip & null) | 400| yes|
<br>+---+------+------------+---------+----------+--------------------+------------+----------+----------+---------+---------+-----------+--------+---------+---------+--------+----------+----+-------+-----+-----+------------+-----+--------+------------+-----------+---------------+--------+-------+---------+---------+------------------------+------------+-----------+-------+---------+---------------+
<br><br>extensions_table of mysl :- content<br>+---+----------+------+---------+-------+--------+<br>| id| context | exten| priority| app | appdata|<br>+---+----------+------+---------+-------+--------+<br>| 3 | mycontext| 400 | 2 | Dial | SIP/400|
<br>| 4 | mycontext| 400 | 1 | Answer| Ringing|<br>+---+----------+------+---------+-------+--------+<br><br><br>CLI > realtime mysql status<br>Connected to <a href="mailto:cdr@127.0.0.1">cdr@127.0.0.1</a>, port 3306 with username root for 9 seconds.
<br><br>*CLI> realtime load sippeers name vinod<br> Column Name Column Value<br> -------------------- --------------------<br> id 2<br> name vinod
<br> callerid "vinodmalani" <400><br> canreinvite yes<br> context mycontext<br> dtmfmode rfc2833<br> host dynamic
<br> nat no<br> secret testing<br> type friend<br> username 400<br> disallow all<br> allow g729
<br> allow ilbc<br> allow gsm<br> allow ulaw<br> allow alaw<br> regseconds 0<br> regexten 400
<br> cancallforward yes<br><br>but CLI > sip show users & sip show peers does't give us any result<br><br>Asterik Console Message : when reloaded<br><br>Binding sippeers to mysql/cdr/sip_buddies<br>
Binding sipusers to mysql/cdr/sip_buddies<br>Binding realextensions to mysql/cdr/extensions_table<br>MySQL Realtime Reloaded<br><br>and my cdr table has the records in it..........<br><br>its working with static sip.cong file :- contents of it
<br>[400]<br>reinvite=no<br>canreinvite=no<br>disallow=all<br>allow=ulaw<br>allow=gsm<br>dtmfmode=rfc2833<br>type=friend
<br>host=dynamic<br>callerid = "vinodmalani" <400>
<br>secret=password<br>nat=no<br>qualify = 1000<br>context = mycontext<br><br>but with realtime god bless me. <br><br>Any help very much appreciated. <br><br>Thanks,<br><br>vinod malani<br></pre>