title: Either the outbound or inbound call only work in asterisk setup, not both. Why?
body: <p>This is my sip.conf</p>
  
  <pre><code>; inbound configuration
  
  [nexmo-sip]
  fromdomain=sip.nexmo.com
  type=friend
  context=nexmo
  insecure=port,invite
  nat=no
  ;Add your codec list here.
  ; Note: Use "ulaw" for US only, "alaw" for the rest of the world.
  allow=ulaw
  allow=alaw
  allow=G729
  dtmfmode=rfc2833
  
  [nexmo-sip-01](nexmo-sip)
  host=173.193.199.24
  
  [nexmo-sip-02](nexmo-sip)
  host=174.37.245.34
  
  [nexmo-sip-03](nexmo-sip)
  host=5.10.112.121
  
  [nexmo-sip-04](nexmo-sip)
  host=5.10.112.122
  
  [nexmo-sip-05](nexmo-sip)
  host=119.81.44.6
  
  [nexmo-sip-06](nexmo-sip)
  host=119.81.44.7
  
  ;outbound configuration
  
  [general]
  register =&gt; &lt;api-key&gt;:&lt;api-secret&gt;@sip.nexmo.com
  registerattempts=0
  srvlookup=yes  
  context=nexmo-sip1
  
  [nexmo]
  username=&lt;api-key&gt;
  host=sip.nexmo.com
  defaultuser=&lt;api-key&gt;
  fromuser=&lt;myNumber123&gt;  
  fromdomain=sip.nexmo.com
  secret=&lt;api-secret&gt;
  type=friend
  context=nexmo-sip1
  insecure=very
  qualify=yes
  nat=no
  ;Add your codec list here.
  ; Note: Use "ulaw" for US only, "alaw" for the rest of the world.
  allow=ulaw
  allow=alaw
  allow=G729
  dtmfmode=rfc2833
  
  [&lt;myNumber123&gt;]   ; this number is at soft phone client
  type=friend
  context=nexmo-sip1
  host=dynamic
  secret=&lt;myNumber123&gt;
  qualify=yes
  
  [&lt;mynumber123456&gt;]  ; this is my mobile number
  type=friend
  context=nexmo-sip1
  host=dynamic
  secret=&lt;secretkey&gt;
  qualify=yes
  </code></pre>
  
  <p>This is extensions.conf</p>
  
  <pre><code>[general]
  live_dangerously=yes
  [globals]
  
  [nexmo-sip1]
  
  exten =&gt; _X.,1,Dial(SIP/${EXTEN}@nexmo)
  
  [default]
  exten =&gt; s,1,gosub(nexmo-sip1,${EXTEN},1)
  </code></pre>
  
  <p><strong>Setting 1:</strong> If above is the setting of extensions.conf, I am able to make outbound calls from my soft client, but not able to get inbound calls to that soft client</p>
  
  <p><strong>Setting 2:</strong> If I change the settings of extensions.conf as follows, I am able to get incoming calls at softclient, but not able to make outbound calls.</p>
  
  <pre><code>[general]
  live_dangerously=yes
  [globals]
  
  [nexmo-sip1]
  
  exten =&gt; _X.,1,Dial(SIP/${EXTEN},30)
  
  [default]
  exten =&gt; s,1,gosub(nexmo-sip1,${EXTEN},1)
  </code></pre>
  
  <p><strong>Question 1)</strong>   What should I change so that I get both outbound and inbound calls?</p>
  
  <p><strong>Question 2:</strong> When I set extensions.conf as in Setting 1, I don't hear the other side, but I hear both the side conversation when extensions.conf is set as in Setting 2. How to fix that? And this is the log I see when I don't hear</p>
  
  <p>[Jul  1 22:50:38] WARNING[11299]: chan_sip.c:4175 retrans_pkt: Retransmission timeout reached on transmission tvK9cRGNN- for seqno 21 (Critical Response) -- See <a href="https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions" rel="nofollow">https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions</a>
  Packet timed out after 8383ms with no response
  [Jul  1 22:50:38] WARNING[11299]: chan_sip.c:4204 retrans_pkt: Hanging up call tvK9cRGNN- - no reply to our critical packet (see <a href="https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions" rel="nofollow">https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions</a>).</p>
  
  <p>I understand that there are lot of wrong configurations like insecure=very etc. But right now I want to make this prototype to work successfully</p>