title: How to configure multiple trunks in asterisk?
body: <p>I have two accounts at ovh for my sip trunks.
  First is a classic sip &amp; second is a sip trunk.</p>
  
  <p>In my sip.conf:</p>
  
  <pre><code>[general]
  language=fr
  bindport=5060
  bindaddr=0.0.0.0
  srvlookup=yes
  canreinvite=no
  defaultexpiry=3600
  registertimeout=30
  registerattempts=0
  disallow=all
  allow=ulaw
  allowguest=no
  alwaysauthreject=yes
  nat=yes
  autocreatepeer=yes
  
  register =&gt; 0033972XXXXXX:PASS1@sip.ovh.fr
  register =&gt; 0033972YYYYYY:PASS2@siptrunk.ovh.net
  
  [trunk-test]
  disallow=all
  type=friend
  secret=PASS2
  host=siptrunk.ovh.net
  fromdomain=sip.ovh.fr;siptrunk.ovh.net
  fromuser=0033972YYYYYY
  username=0033972YYYYYY
  nat=yes;force_rport,comedia
  context=depuis-ovh
  insecure=port,invite
  qualify=yes
  dtmfmode=inband
  allow=ulaw
  
  [vers-ovh]
  disallow=all
  type=friend
  secret=PASS1
  host=sip.ovh.fr
  fromdomain=sip.ovh.fr
  fromuser=0033972XXXXXX
  username=0033972XXXXXX
  nat=yes
  context=ManageOperator
  insecure=invite,port
  qualify=yes
  dtmfmode=inband
  allow=ulaw
  </code></pre>
  
  <p>In my extensions.conf</p>
  
  <pre><code>[general]
  static=yes
  writeprotect=no
  clearglobalvars=no
  
  [globals]
  
  [depuis-ovh]
  exten =&gt; s, 1, Answer()
  exten =&gt; s, n, AGI(NPCallCenterAsterisk/agi/app,services/42/country/EN)
  exten =&gt; s, n, Hangup()
  
  [ManageOperator]
  exten =&gt; s, 1, Answer()
  exten =&gt; s, n, AGI(NPCallCenterAsterisk/agi/app.php,manageOperator);
  exten =&gt; s, n, Hangup()
  </code></pre>
  
  <p>When I call <code>0033972YYYYYY</code>, it works fine. The "depuis-ovh" context calls the AGI.
  But when I call <code>0033972XXXXXX</code>, the call gets hung up immediately.</p>
  
  <p>Do you have some ideas what the issue is?</p>
  
  <p>NOTE: <code>0033972XXXXXX</code> &amp; <code>0033972YYYYYY</code> works fine separately, when only one of them is configured.</p>