[Asterisk-Users] SIP-Trunk problem, Please help!!!

OMS asterisk at prizmcom.com
Wed Aug 10 15:56:28 MST 2005


When I put the asterisk server inside NAT,  I do not get any SIP-retransmission problem, SIP-trunk seems to work on all calls.

Why asterisk is occasionally unable to get SIP packets out to SIP gateway when connected to PUBLIC IP?  

Did some body had this problem before?

  ----- Original Message ----- 
  From: OMS 
  To: Asterisk-Users at lists.digium.com 
  Sent: Tuesday, August 09, 2005 4:45 PM
  Subject: [Asterisk-Users] SIP-Trunk problem, Please help!!!


  Hi,
  We are using VOIP-SIP  gateway to route outbound PSTN calls.
  Recently, I am getting   == No one is available to answer at this time 
  message, after making  5 SIP attempts (Retransmitting #5 (no NAT):), 
  and the calls are going out through alternate Zap-trunk.

  I do not see any hit (sip-debug traffic) on the voip-gateway for the failed calls.

  Strange thing is that this is happening randomly, half the call I make are able to get through the SIP-Trunk.

  I will really appreciate any input/suggession on this.

  Obaid.

  Here are my conf files, followed by SIP debug output on asterisk.

  trunk 4= SIP trunk
  24.XX.XXX.101 ---> Asterisk server on Public IP
  209.XXX.XXX.113 ---> SIP gatway

  ---------------iax_additional.conf--------------

  [20]
  username=20
  type=friend
  secret=XXX
  record_out=On-Demand
  record_in=On-Demand
  qualify=no
  notransfer=yes
  mailbox=20 at default
  host=dynamic
  context=from-internal
  callerid="512538XXXX" <20>


  -------------------Sip_additional.conf---------------

  [23]
  username=23
  type=friend
  secret=XXX
  record_out=On-Demand
  record_in=On-Demand
  qualify=no
  port=5060
  nat=never
  mailbox=23 at default
  host=dynamic
  dtmfmode=rfc2833
  context=from-internal
  canreinvite=no
  callerid="SIP Lite" <23>

  [sip-out]
  type=peer
  host=209.XXX.XXX.113

  -----------------Extensions_additional--------------------------

  [outrt-001-sip-out]
  include => outrt-001-Prizm-custom
  exten => _011.,1,Macro(dialout-trunk,4,${EXTEN},)
  exten => _011.,2,Macro(dialout-trunk,1,${EXTEN},)
  exten => _011.,3,Macro(outisbusy) ; No available circuits
  exten => _1NXXNXXXXXX,1,Macro(dialout-trunk,4,${EXTEN},)
  exten => _1NXXNXXXXXX,2,Macro(dialout-trunk,1,${EXTEN},)
  exten => _1NXXNXXXXXX,3,Macro(outisbusy) ; No available circuits
  exten => _NXXXXXX,1,Macro(dialout-trunk,4,${EXTEN},)
  exten => _NXXXXXX,2,Macro(dialout-trunk,1,${EXTEN},)
  exten => _NXXXXXX,3,Macro(outisbusy) ; No available circuits

  [outrt-002-Local]
  include => outrt-002-Local-custom
  exten => _9.,1,Macro(dialout-trunk,1,${EXTEN:1},)
  exten => _9.,2,Macro(dialout-trunk,2,${EXTEN:1},)
  exten => _9.,3,Macro(dialout-trunk,3,${EXTEN:1},)
  exten => _9.,4,Macro(outisbusy) ; No available circuits



  -----------------------------Sip Debug----------------------------


      -- Executing GotoIf("IAX2/20 at 20/4", "1?5:8") in new stack
      -- Goto (macro-record-enable,s,5)
      -- Executing DBget("IAX2/20 at 20/4", "RecEnable=RECORD-OUT/20") in new stack
      -- DBget: varname=RecEnable, family=RECORD-OUT, key=20
      -- DBget: Value not found in database.
      -- Executing SetVar("IAX2/20 at 20/4", "CALLFILENAME=OUT20-20050809-163643-1123619803.36") in 

  new stack
      -- Executing Goto("IAX2/20 at 20/4", "s|14") in new stack
      -- Goto (macro-record-enable,s,14)
      -- Executing GotoIf("IAX2/20 at 20/4", "0?15:99") in new stack
      -- Goto (macro-record-enable,s,99)
      -- Executing NoOp("IAX2/20 at 20/4", "NO RECORDING NEEDED") in new stack
      -- Executing GotoIf("IAX2/20 at 20/4", "0?7") in new stack
      -- Executing SetCallerID("IAX2/20 at 20/4", "512538XXX") in new stack
      -- Executing Goto("IAX2/20 at 20/4", "9") in new stack
      -- Goto (macro-dialout-trunk,s,9)
      -- Executing SetGroup("IAX2/20 at 20/4", "OUT_4") in new stack
      -- Executing CheckGroup("IAX2/20 at 20/4", "5") in new stack
      -- Executing SetVar("IAX2/20 at 20/4", "DIAL_NUMBER=484XXX2") in new stack
      -- Executing SetVar("IAX2/20 at 20/4", "DIAL_TRUNK=4") in new stack
      -- Executing AGI("IAX2/20 at 20/4", "fixlocalprefix") in new stack
      -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
    fixlocalprefix: Added prefix. New number: 1512484XXX2
      -- AGI Script fixlocalprefix completed, returning 0
      -- Executing SetVar("IAX2/20 at 20/4", "OUTNUM=1512484XXX2") in new stack
      -- Executing Cut("IAX2/20 at 20/4", "custom=OUT_4|:|1") in new stack
      -- Executing GotoIf("IAX2/20 at 20/4", "0?19") in new stack
      -- Executing Dial("IAX2/20 at 20/4", "SIP/sip-out/1512484XXX2") in new stack
  We're at 24.XX.XXX.101 port 15202
  Answering/Requesting with root capability 0x4 (ulaw)
  Answering with preferred capability 0x8 (alaw)
  Answering with non-codec capability 0x1 (telephone-event)
  12 headers, 11 lines
  Reliably Transmitting:
  INVITE sip:1512484XXX2 at 209.XXX.XXX.113 SIP/2.0
  Via: SIP/2.0/UDP 24.XX.XXX.101:5060;branch=z9hG4bK6adcaf4f
  From: "512538XXX" <sip:512538XXXX at 24.XX.XXX.101>;tag=as5329d8fe
  To: <sip:1512484XXX2 at 209.XXX.XXX.113>
  Contact: <sip:512538XXX at 24.XX.XXX.101>
  Call-ID: 03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101
  CSeq: 102 INVITE
  User-Agent: Asterisk PBX
  Date: Tue, 09 Aug 2005 20:36:43 GMT
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
  Content-Type: application/sdp
  Content-Length: 242

  v=0
  o=root 2251 2251 IN IP4 24.XX.XXX.101
  s=session
  c=IN IP4 24.XX.XXX.101
  t=0 0
  m=audio 15202 RTP/AVP 0 8 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-16
  a=silenceSupp:off - - - -
   (no NAT) to 209.XXX.XXX.113:5060
      -- Called sip-out/1512484XXX2
  Retransmitting #1 (no NAT):
  INVITE sip:1512484XXX2 at 209.XXX.XXX.113 SIP/2.0
  Via: SIP/2.0/UDP 24.XX.XXX.101:5060;branch=z9hG4bK6adcaf4f
  From: "512538XXX" <sip:512538XXX at 24.XX.XXX.101>;tag=as5329d8fe
  To: <sip:1512484XXX2 at 209.XXX.XXX.113>
  Contact: <sip:512538XXX at 24.XX.XXX.101>
  Call-ID: 03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101
  CSeq: 102 INVITE
  User-Agent: Asterisk PBX
  Date: Tue, 09 Aug 2005 20:36:43 GMT
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
  Content-Type: application/sdp
  Content-Length: 242

  v=0
  o=root 2251 2251 IN IP4 24.XX.XXX.101
  s=session
  c=IN IP4 24.XX.XXX.101
  t=0 0
  m=audio 15202 RTP/AVP 0 8 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-16
  a=silenceSupp:off - - - -

   to 209.XXX.XXX.113:5060
  Retransmitting #2 (no NAT):
  INVITE sip:1512484XXX2 at 209.XXX.XXX.113 SIP/2.0
  Via: SIP/2.0/UDP 24.XX.XXX.101:5060;branch=z9hG4bK6adcaf4f
  From: "512538XXX" <sip:512538XXX at 24.XX.XXX.101>;tag=as5329d8fe
  To: <sip:1512484XXX2 at 209.XXX.XXX.113>
  Contact: <sip:512538XXX at 24.XX.XXX.101>
  Call-ID: 03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101
  CSeq: 102 INVITE
  User-Agent: Asterisk PBX
  Date: Tue, 09 Aug 2005 20:36:43 GMT
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
  Content-Type: application/sdp
  Content-Length: 242

  v=0
  o=root 2251 2251 IN IP4 24.XX.XXX.101
  s=session
  c=IN IP4 24.XX.XXX.101
  t=0 0
  m=audio 15202 RTP/AVP 0 8 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-16
  a=silenceSupp:off - - - -

   to 209.XXX.XXX.113:5060
  Retransmitting #3 (no NAT):
  INVITE sip:1512484XXX2 at 209.XXX.XXX.113 SIP/2.0
  Via: SIP/2.0/UDP 24.XX.XXX.101:5060;branch=z9hG4bK6adcaf4f
  From: "512538XXX" <sip:512538XXX at 24.XX.XXX.101>;tag=as5329d8fe
  To: <sip:1512484XXX2 at 209.XXX.XXX.113>
  Contact: <sip:512538XXX at 24.XX.XXX.101>
  Call-ID: 03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101
  CSeq: 102 INVITE
  User-Agent: Asterisk PBX
  Date: Tue, 09 Aug 2005 20:36:43 GMT
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
  Content-Type: application/sdp
  Content-Length: 242

  v=0
  o=root 2251 2251 IN IP4 24.XX.XXX.101
  s=session
  c=IN IP4 24.XX.XXX.101
  t=0 0
  m=audio 15202 RTP/AVP 0 8 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-16
  a=silenceSupp:off - - - -

   to 209.XXX.XXX.113:5060
  Retransmitting #4 (no NAT):
  INVITE sip:1512484XXX2 at 209.XXX.XXX.113 SIP/2.0
  Via: SIP/2.0/UDP 24.XX.XXX.101:5060;branch=z9hG4bK6adcaf4f
  From: "512538XXX" <sip:512538XXX at 24.XX.XXX.101>;tag=as5329d8fe
  To: <sip:1512484XXX2 at 209.XXX.XXX.113>
  Contact: <sip:512538XXX at 24.XX.XXX.101>
  Call-ID: 03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101
  CSeq: 102 INVITE
  User-Agent: Asterisk PBX
  Date: Tue, 09 Aug 2005 20:36:43 GMT
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
  Content-Type: application/sdp
  Content-Length: 242

  v=0
  o=root 2251 2251 IN IP4 24.XX.XXX.101
  s=session
  c=IN IP4 24.XX.XXX.101
  t=0 0
  m=audio 15202 RTP/AVP 0 8 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-16
  a=silenceSupp:off - - - -

   to 209.XXX.XXX.113:5060
  Retransmitting #5 (no NAT):
  INVITE sip:1512484XXX2 at 209.XXX.XXX.113 SIP/2.0
  Via: SIP/2.0/UDP 24.XX.XXX.101:5060;branch=z9hG4bK6adcaf4f
  From: "512538XXX" <sip:512538XXX at 24.XX.XXX.101>;tag=as5329d8fe
  To: <sip:1512484XXX2 at 209.XXX.XXX.113>
  Contact: <sip:512538XXX at 24.XX.XXX.101>
  Call-ID: 03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101
  CSeq: 102 INVITE
  User-Agent: Asterisk PBX
  Date: Tue, 09 Aug 2005 20:36:43 GMT
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
  Content-Type: application/sdp
  Content-Length: 242

  v=0
  o=root 2251 2251 IN IP4 24.XX.XXX.101
  s=session
  c=IN IP4 24.XX.XXX.101
  t=0 0
  m=audio 15202 RTP/AVP 0 8 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:8 PCMA/8000
  a=rtpmap:101 telephone-event/8000
  a=fmtp:101 0-16
  a=silenceSupp:off - - - -

   to 209.XXX.XXX.113:5060
    == No one is available to answer at this time
      -- Executing Goto("IAX2/20 at 20/4", "s-NOANSWER|1") in new stack
      -- Goto (macro-dialout-trunk,s-NOANSWER,1)
      -- Executing NoOp("IAX2/20 at 20/4", "Dial failed due to NOANSWER") in new stack
      -- Executing Macro("IAX2/20 at 20/4", "dialout-trunk|1|484XXX2|") in new stack
      -- Executing GotoIf("IAX2/20 at 20/4", "1?3:2)") in new stack
      -- Goto (macro-dialout-trunk,s,3)
      -- Executing Macro("IAX2/20 at 20/4", "record-enable|512538XXX|OUT") in new stack
      -- Executing GotoIf("IAX2/20 at 20/4", "0 > 0?2:4") in new stack
      -- Goto (macro-record-enable,s,4)
      -- Executing GotoIf("IAX2/20 at 20/4", "1?5:8") in new stack
      -- Goto (macro-record-enable,s,5)
      -- Executing DBget("IAX2/20 at 20/4", "RecEnable=RECORD-OUT/512538XXX") in new stack
      -- DBget: varname=RecEnable, family=RECORD-OUT, key=512538XXX
      -- DBget: Value not found in database.
      -- Executing SetVar("IAX2/20 at 20/4", 

  "CALLFILENAME=OUT512538XXX-20050809-163649-1123619803.36") in new stack
      -- Executing Goto("IAX2/20 at 20/4", "s|14") in new stack
      -- Goto (macro-record-enable,s,14)
      -- Executing GotoIf("IAX2/20 at 20/4", "0?15:99") in new stack
      -- Goto (macro-record-enable,s,99)
      -- Executing NoOp("IAX2/20 at 20/4", "NO RECORDING NEEDED") in new stack
      -- Executing GotoIf("IAX2/20 at 20/4", "1?7") in new stack
      -- Goto (macro-dialout-trunk,s,7)
      -- Executing GotoIf("IAX2/20 at 20/4", "1?9") in new stack
      -- Goto (macro-dialout-trunk,s,9)
      -- Executing SetGroup("IAX2/20 at 20/4", "OUT_1") in new stack
      -- Executing CheckGroup("IAX2/20 at 20/4", "") in new stack
      -- Executing SetVar("IAX2/20 at 20/4", "DIAL_NUMBER=484XXX2") in new stack
      -- Executing SetVar("IAX2/20 at 20/4", "DIAL_TRUNK=1") in new stack
      -- Executing AGI("IAX2/20 at 20/4", "fixlocalprefix") in new stack
      -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
      -- AGI Script fixlocalprefix completed, returning 0
      -- Executing SetVar("IAX2/20 at 20/4", "OUTNUM=484XXX2") in new stack
      -- Executing Cut("IAX2/20 at 20/4", "custom=OUT_1|:|1") in new stack
      -- Executing GotoIf("IAX2/20 at 20/4", "0?19") in new stack
      -- Executing Dial("IAX2/20 at 20/4", "ZAP/g0/484XXX2") in new stack
      -- Called g0/484XXX2
  Destroying call '03896a42587e3f973b42daad031ea6a3 at 24.XX.XXX.101'
      -- Zap/1-1 answered IAX2/20 at 20/4
      -- Hungup 'Zap/1-1'
    == Spawn extension (macro-dialout-trunk, s, 17) exited non-zero on 'IAX2/20 at 20/4' in macro 

  'dialout-trunk'
    == Spawn extension (from-internal, 484XXX2, 2) exited non-zero on 'IAX2/20 at 20/4'
      -- Executing Macro("IAX2/20 at 20/4", "hangupcall") in new stack
      -- Executing ResetCDR("IAX2/20 at 20/4", "w") in new stack
      -- Executing NoCDR("IAX2/20 at 20/4", "") in new stack
      -- Executing Wait("IAX2/20 at 20/4", "5") in new stack
    == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'IAX2/20 at 20/4' in macro 

  'hangupcall'
    == Spawn extension (from-internal, h, 1) exited non-zero on 'IAX2/20 at 20/4'
      -- Hungup 'IAX2/20 at 20/4'






------------------------------------------------------------------------------


  _______________________________________________
  Asterisk-Users mailing list
  Asterisk-Users at lists.digium.com
  http://lists.digium.com/mailman/listinfo/asterisk-users
  To UNSUBSCRIBE or update options visit:
     http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050810/831a5c20/attachment.htm


More information about the asterisk-users mailing list