<div class="postbody">Hi all<br><br>After a long iam back to forum</div>
<div class="postbody"> </div>
<div class="postbody">back to my own topic and several readings done on this forum<br>how people doing same kind of setup what iam trying to achive<br><br>so here i have done some good developements<br><br>for testing iam doing all in one Server<br>
<br>Step1 :<br><br>Installed in Fresh BOX with Debian<br><br>Asterisk and A2B working Fine<br><br><br>Step2 : registered with SIP account iam able to make calls successfully<br><br>Step3 : <br><br>installed Opensips<br><br>
Made Subscribers to view from A2b Database <br><br>Step4 : changed Asterisk port from 5060 to 5062<br><br>Step5 : Opensip config made changes to register users with Opensips<br>and when they dial 001X call send to Asterisk box <br>
<br><br>route[3]{<br><br>if (uri =~ &quot;sip:001[0-9]@*&quot;){<br>log(1, &quot;Forwarding to Asterisk \n&quot;);<br>rewritehostport(&quot;A2b-asterisk-IP:5062&quot;);<br>route(1);<br>exit;<br>}<br><br>Works Fine, No problems as of now<br>
<br>But to go in advance, i want to use Number of * boxes to achive more Load<br><br>Step5 : added Dispatcher Module in the Opensips<br><br>loadmodule &quot;dispatcher.so&quot;<br>.<br>.<br>.<br>modparam(&quot;dispatcher&quot;,&quot;list_file&quot;,&quot;/usr/local/etc/opensips/dispatcher.cfg&quot;)<br>
.<br>.<br>.<br>.<br>changed route to use dispatcher<br><br>route[3]{<br><br>if (uri =~ &quot;sip:001[0-9]@*&quot;){<br>log(1, &quot;Forwarding to Asterisk \n&quot;);<br>ds_select_dst(&quot;2&quot;,&quot;4&quot;);<br>forward();<br>
route(1);<br>exit;<br>}<br><br><br>My dispatcher Config Looks like below<br><br>dispatcher.cfg<br>2 sip:a2b-asterisk-ip:5062<br>2 sip:a2b-asterisk-ip2:5062<br><br>I have restarted Opensips<br><br>when i dial 0017XXXXXX number the call send Opensips to Asterisk<br>
<br><br><br>Jun 30 01:12:28 opensips[25868]: Forwarding to Asterisk<br>Jun 30 01:12:28 opensips[25868]: DBG:dispatcher:ds_select_dst: set [2]<br>Jun 30 01:12:28 opensips[25868]: DBG:dispatcher:ds_select_dst: alg hash [1]<br>
Jun 30 01:12:28 opensips[25868]: DBG:dispatcher:ds_select_dst: selected [4-2/1] &lt;sip:a2b-asterisk-ip:5062&gt;<br>Jun 30 01:12:28 freeswitch opensips[25868]: DBG:core:mk_proxy: doing DNS lookup...<br>Jun 30 01:12:28 freeswitch opensips[25868]: DBG:core:forward_request: sending:#012INVITE sip:0017XXXXXXXX@opensips-ip:5060 SIP/2.0#015#012Record-Route: &lt;sip:opensips-ip;lr=on&gt;#015#012Via: SIP/2.0/UDP opensips-ip;branch=z9hG4bK28178282572929210914#015#012Via: SIP/2.0/UDP ip-phone-ip:5060;received=ip-phone-ip;branch=z9hG4bK28178282572929210914;rport=5060#015#012From: 4720779942 &lt;sip:4720779942@opensips-ip:5060&gt;;tag=1966722825#015#012To: 0017325824631 &lt;sip:0017XXXXXXX@opensips-ip:5060&gt;#015#012Call-ID: 32167199575863-11502744529360@ip-phoneip#015#012CSeq: 2 INVITE#015#012Contact: &lt;sip:4720779942@ipphone-ip:5060&gt;#015#012Proxy-Authorization: Digest username=&quot;4720779942&quot;, realm=&quot;asterisk&quot;, nonce=&quot;79ee65ba&quot;, uri=&quot;sip:0017XXXXXX@opensips-ip:5060&quot;, response=&quot;3e182f165a5663d0b145d6b55d34e94b&quot;, algorithm=MD5#015#012Max-Forwards: 69#015#012Supported: replaces#015#012User-Agent: Voip Phone 1.0#015#012Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, SUBSCRIBE, PRACK, UPDATE#015#012Content-Type: application/sdp#015#012Content-Length: 319#015#012#015#012v=0#015#012o=4720779942 17025328 32005127 IN IP4 202.63.111.2#015#012s=A conversation#015#012c=IN IP4 ip-phone-ip#015#012t=0 0#015#012m=audio 10028 RTP/AVP 18 4 8 0 9 101#015#012a=rtpmap:18 G729/8000#015#012a=rtpmap:4 G723/8000#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:9 G722/16000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-15#015#012a=sendrecv#015#012.<br>
opensips[25868]: DBG:core:forward_request: orig. len=1087, new_len=1220, proto=1<br><br><br><br>when i ngrep<br>------------<br><br><br>U 2009/06/30 01:59:20.770599 ipphone:5060 -&gt; asterisk-a2b-ip:5060<br>INVITE sip:0017XXXXXXXX@asterisk-a2b-ip:5060 SIP/2.0.<br>
Via: SIP/2.0/UDP ipphone:5060;branch=z9hG4bK2932733762726732719;rport.<br>From: 4720779942 &lt;sip:4720779942@asterisk-a2b-ip:5060&gt;;tag=3037030266.<br>To: 0017XXXXXXXX &lt;sip:0017XXXXXXXX@asterisk-a2b-ip:5060&gt;.<br>
Call-ID: 14399316162240-7371067914582@ipphone.<br>CSeq: 2 INVITE.<br>Contact: &lt;sip:4720779942@ipphone:5060&gt;.<br>Proxy-Authorization: Digest username=&quot;4720779942&quot;, realm=&quot;asterisk&quot;, nonce=&quot;07ba8624&quot;, uri=&quot;sip:0017XXXXXXXX@asterisk-a2b-ip:5060&quot;, response=&quot;5dbe9b2937d0bc3f6e8d25052fff0b6a&quot;, algorithm=MD5.<br>
Max-Forwards: 70.<br>Supported: replaces.<br>User-Agent: Voip Phone 1.0.<br>Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, SUBSCRIBE, PRACK, UPDATE.<br>Content-Type: application/sdp.<br>Content-Length: 319.<br>
.<br>v=0.<br>o=4720779942 69102627 18481147 IN IP4 ipphone.<br>s=A conversation.<br>c=IN IP4 ipphone.<br>t=0 0.<br>m=audio 10034 RTP/AVP 18 4 8 0 9 101.<br>a=rtpmap:18 G729/8000.<br>a=rtpmap:4 G723/8000.<br>a=rtpmap:8 PCMA/8000.<br>
a=rtpmap:0 PCMU/8000.<br>a=rtpmap:9 G722/16000.<br>a=rtpmap:101 telephone-event/8000.<br>a=fmtp:101 0-15.<br>a=sendrecv.<br><br><br>U 2009/06/30 01:59:20.774528 asterisk-a2b-ip:5060 -&gt; ipphone:5060<br>SIP/2.0 100 Giving a try.<br>
Via: SIP/2.0/UDP ipphone:5060;branch=z9hG4bK2932733762726732719;rport=5060.<br>From: 4720779942 &lt;sip:4720779942@asterisk-a2b-ip:5060&gt;;tag=3037030266.<br>To: 0017XXXXXXXX &lt;sip:0017XXXXXXXX@asterisk-a2b-ip:5060&gt;.<br>
Call-ID: 14399316162240-7371067914582@ipphone.<br>CSeq: 2 INVITE.<br>Server: OpenSIPS (1.5.1-notls (i386/linux)).<br>Content-Length: 0.<br>.<br><br><br>U 2009/06/30 01:59:21.650498 asterisk-a2b-ip:5060 -&gt; ipphone:5060<br>
SIP/2.0 407 Proxy Authentication Required.<br>Via: SIP/2.0/UDP ipphone:5060;received=ipphone;branch=z9hG4bK1984515716453028636;rport=5060.<br>From: 4720779942 &lt;sip:4720779942@asterisk-a2b-ip:5060&gt;;tag=3037030266.<br>
To: 0017XXXXXXXX &lt;sip:0017XXXXXXXX@asterisk-a2b-ip:5060&gt;;tag=as0cb075c5.<br>Call-ID: 14399316162240-7371067914582@ipphone.<br>CSeq: 1 INVITE.<br>User-Agent: Asterisk PBX.<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.<br>
Supported: replaces.<br>Proxy-Authenticate: Digest algorithm=MD5, realm=&quot;asterisk&quot;, nonce=&quot;07ba8624&quot;.<br>Content-Length: 0.<br><br>------<br><br>when i enable debug at Asterisk and Look at i see the below error<br>
---------------------------------------------------------------<br><br>&lt;--- SIP read from a2b-asterisk-ip:5060 ---&gt;<br>INVITE sip:0017XXXXXXXXX@a2b-asterisk-ip:5060 SIP/2.0<br>Record-Route: &lt;sip:a2b-asterisk-ip;lr=on&gt;<br>
Via: SIP/2.0/UDP a2b-asterisk-ip;branch=z9hG4bK166.1b7e2827.0<br>Via: SIP/2.0/UDP Ip-phone:5060;received=Ip-phone;branch=z9hG4bK295731884823024293;rport=5060<br>From: 4720779942 &lt;sip:4720779942@a2b-asterisk-ip:5060&gt;;tag=12544334<br>
To: 0017XXXXXXXXX &lt;sip:0017XXXXXXXXX@a2b-asterisk-ip:5060&gt;<br>Call-ID: 16946271051109-143302828620026@Ip-phone<br>CSeq: 1 INVITE<br>Contact: &lt;sip:4720779942@Ip-phone:5060&gt;<br>Max-Forwards: 69<br>Supported: replaces<br>
User-Agent: Voip Phone 1.0<br>Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, SUBSCRIBE, PRACK, UPDATE<br>Content-Type: application/sdp<br>Content-Length: 319<br><br>v=0<br>o=4720779942 31008195 22123120 IN IP4 Ip-phone<br>
s=A conversation<br>c=IN IP4 Ip-phone<br>t=0 0<br>m=audio 10030 RTP/AVP 18 4 8 0 9 101<br>a=rtpmap:18 G729/8000<br>a=rtpmap:4 G723/8000<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:0 PCMU/8000<br>a=rtpmap:9 G722/16000<br>a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-15<br>a=sendrecv<br><br>&lt;-------------&gt;<br>[Jun 30 01:15:29] VERBOSE[24612] logger.c: --- (15 headers 14 lines) ---<br>[Jun 30 01:15:29] VERBOSE[24612] logger.c: Ignoring this INVITE request<br>[Jun 30 01:15:31] VERBOSE[24612] logger.c: Reliably Transmitting (no NAT) to termination-provider-ip:5062:<br>
OPTIONS sip:termination-provider-ip:5062 SIP/2.0<br>Via: SIP/2.0/UDP a2b-asterisk-ip:5062;branch=z9hG4bK6a9fe793;rport<br>From: &quot;asterisk&quot; &lt;sip:asterisk@a2b-asterisk-ip:5062&gt;;tag=as4cf91fd8<br>To: &lt;sip:termination-provider-ip:5062&gt;<br>
Contact: &lt;sip:asterisk@a2b-asterisk-ip:5062&gt;<br>Call-ID: 65a49c0977c6de0a1d2dbbfe757724bd@a2b-asterisk-ip<br>CSeq: 102 OPTIONS<br>User-Agent: Asterisk PBX<br>Max-Forwards: 70<br>Date: Tue, 30 Jun 2009 08:15:31 GMT<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>Supported: replaces<br>Content-Length: 0<br><br><br>---<br>[Jun 30 01:15:32] VERBOSE[24612] logger.c:<br>&lt;--- SIP read from termination-provider-ip:5062 ---&gt;<br>
SIP/2.0 404 Not Found<br>Via: SIP/2.0/UDP a2b-asterisk-ip:5062;branch=z9hG4bK6a9fe793;rport=5062<br>From: &quot;asterisk&quot; &lt;sip:asterisk@a2b-asterisk-ip:5062&gt;;tag=as4cf91fd8<br>To: &lt;sip:termination-provider-ip:5062&gt;;tag=2560d490c3265ff35995c6bbde62a7c3.ee5a<br>
Call-ID: 65a49c0977c6de0a1d2dbbfe757724bd@a2b-asterisk-ip<br>CSeq: 102 OPTIONS<br>Content-Length: 0<br><br>---------<br><br><br>why does Asterisk sending with out any values<br><br>---<br><br>From: &quot;asterisk&quot; &lt;sip:asterisk@a2b-asterisk-ip:5062&gt;;tag=as4cf91fd8<br>
To: &lt;sip:termination-provider-ip:5062&gt;<br><br>---<br><br>Any suggestions<br><br>Ram</div>