Help set up sip trunk to fxo gateway to pstn - no dial in or out

I’m new to FreePBX, but have read a ton of forums and my VoIP equip manuals.
I have a Draytek Vigor 3300V+ router with a 4-port FXO card installed on IP 10.10.10.1
My server is 10.10.10.4

All my extensions are registered and can dial one another without a problem. However, I can not figure out how to get the FXO card in my router to connect my PSTN lines via SIP to my asterisk box.

The router manual is here:
http://www.draytek.com/user/SupportAppnotes.php?Id=83
The notes on Asterisk / FXO functionality do not make sense to me and need help from you guys!! I have searched everywhere for help but am lost. I even tried this manual config mentioned here: http://www.draytek.com/user/SupportAppnotesDetail.php?ID=85

When I configure the FXO card I give it the config shown in the attachments.
SIP Protocol Configured like this:

SIP Account for FXO / PSTN card config like this:

This shows my FXO ports active and ready

This is my FXO port1 config

In asterisk my set up my sip account for trunk 1 like this:

host=10.10.10.1
username=1001
secret=1001
type=friend
qualify=no
insecure=very
dtmfmode=rfc2833
disallow=all
context=from-pstn
allow=ulaw&g729&g723.1
trustrpid=no
sendrpid=no
canreinvite=no

and my register string:
1001:[email protected]/1001

I set up this via the “Custom SIP Trunk” in freepbx

Help!!!

EDIT:
When I dial out: “All circuits are busy now”

Ok,

You have massively overconfigured the device!

First off, you don’t need a registration string, the device has a static IP and is on the same LAN. Registration strings are used to have devices advise the SIP UA of their IP (kinda like dynamic DNS).

Second, have you licensed g.729? Do you need it? g.729 is licensed compression technology that you must purchase from digium. Also g.723.1 is not a valid CODEC. To see all CODEC use the ‘core show translation’ command in Asterisk.

Now, on to the config. All you want this thing to do is send calls to Asterisk and terminate calls send from Asterisk. You don’t need the authentication.

Your trunk should be:

host=10.10.10.1
type=friend
qualify=yes
insecure=port,invite
disallow=all
allow=ulaw
sendrpid=no
canreinvite=no
dtmfmode=rfc2833

With regard to the Vigor, I referenced VoIP example 2, Basic Calling Method. The Asterisk example used MGCP and was horribly convoluted.

On the Vigor proxy page check active, outbound proxy and fill in the IP address of the Asterisk box 10.10.10.4 That should be good for inbound calls.

Most gateways do not require SIP authentication. Can you leave everything blank in the SIP account except the name? If not you want to build backwards for a minimum config.

I think the majority of your issue was the CODEC and no proxy address.

Now, what you need to do to be successful at this:

1 - Tell us what version of Asterisk and FreePBX you have and how you installed them

2 - Read the Asterisk SIP documentation, sample.sip.conf is available for every version in the Asterisk svn. Here is a link to the 1.8 version:

http://svn.asterisk.org/svn/asterisk/branches/1.8/configs/sip.conf.sample

3 - voip-info has a great sip summary page. It is a must link for anyone configuring Asterisk (I refer to it constantly):

http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf

You must learn how to read and use the Asterisk log. Set your putty screen buffer to 10,000 lines

1 - Set everything off type these commands one at a time(core set verbose 0, core set debug 0, sip set debug off)

2 - Now try them one at a time:

For SIP Debug

3 - ‘sip set debug’ (you can add the ip parameter and the IP address of the peer)

4 - turn off sip debug ‘sip set debug off’

5 - dialplan debug ‘core set verbose 16’

6 - turn dial plan debug off ‘core set verbose 0’

7 - system debug ‘core set debug 128’

8 - core set debug off

Different combinations of these will reveal the information you need to troubleshoot.

I looked all over the Vigor site. I could not find an actual manual for the device, just sample configs. The CLI looks useful. Like anything else it needs to be learned and the quirks.

Firstly, Thank you SO MUCH for your thoughtful and comprehensive response. Your info was so helpful to me, and to others I’m sure. I have read the links you sent and made the suggested changes. My codec was the g729 but I don’t need it for any particular reason so I changed it (see below).
QUOTE: "Most gateways do not require SIP authentication. Can you leave everything blank in the SIP account except the name? If not you want to build backwards for a minimum config."
RESPONSE: I tried to take out everything but the Router FXO interface requires a un/pw combo. So I left it 1001/1001 but there is an option below that says “Call without Registration:” And I set it to “enable” from the default disable. I assume this means “don’t send un/pw”. What do you think?

In the suggested trunk settings from your previous post: should there be a “context=from-pstn” or something like that included?

My Versions:
(From FreePBX 2.8.1.5) configuring Asterisk (Ver. 1.8.11.0)

In Asterisk SIP settings, should NAT settings be set to yes, no, never or route? I am using NAT for internet access, but my Asterisk server is on same physical network as router and my router FXO card is sending out calls through PSTN - So I have this set to “no” currently.

I have Public IP set, since I do not route VoIP traffic past my network (PSTN connection only). Is this correct?

since I am using Grandstream GXP2110 phones & my FXO card only supports g726, g729, g723.1, g711u/a, I have non-standard g726 set to “yes” and in my trunk settings I put in “allow=g726”. My phones only support PCMU/A, G722, G723.1, G726-32, iLBC. I removed ULAW from option because it didn’t look like it was installed? (see below codec chart)

On voip-info.org I read “For Grandstream phones: set dtmfmode=info” And “dtmfmode=info ; either RFC2833 or INFO for the BudgeTone” So should I change this in trunk settings? What about on my FXO port config? Currently it’s set to rfc2883 both in asterisk and FXO port.

Here are my codecs from asterisk:

     Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

           g723   gsm  ulaw  alaw g726aal2 adpcm  slin lpc10  g729 speex  ilbc  g726  g722 siren7 siren14 slin16  g719 speex16 testlaw
     g723     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
      gsm     -     -  3001  3002     8999  3001  3000  8999     - 25997 28996  8999  4999      -       -   8998     -   25995    3001
     ulaw     -  5001     -     1     6000     2     1  6000     - 22998 25997  6000  2000      -       -   5999     -   22996       2
     alaw     -  5001     1     -     6000     2     1  6000     - 22998 25997  6000  2000      -       -   5999     -   22996       2
 g726aal2     -  7999  3000  3001        -  3000  2999  8998     - 25996 28995  8998  4998      -       -   8997     -   25994    3000
    adpcm     -  6000  1001  1002     6999     -  1000  6999     - 23997 26996  6999  2999      -       -   6998     -   23995    1001
     slin     -  5000     1     2     5999     1     -  5999     - 22997 25996  5999  1999      -       -   5998     -   22995       1
    lpc10     -  9999  5000  5001    10998  5000  4999     -     - 27996 30995 10998  6998      -       -  10997     -   27994    5000
     g729     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
    speex     -  9000  4001  4002     9999  4001  4000  9999     -     - 29996  9999  5999      -       -   9998     -   26995    4001
     ilbc     -  8999  4000  4001     9998  4000  3999  9998     - 26996     -  9998  5998      -       -   9997     -   26994    4000
     g726     -  7000  2001  2002     7999  2001  2000  7999     - 24997 27996     -  3999      -       -   7998     -   24995    2001
     g722     -  8999  4000  4001     9998  4000  3999  9998     - 26996 29995  9998     -      -       -   3999     -   20996    4000
   siren7     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
  siren14     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
   slin16     - 12998  7999  8000    13997  7999  7998 13997     - 30995 33994 13997  3999      -       -      -     -   16997    7999
     g719     -     -     -     -        -     -     -     -     -     -     -     -     -      -       -      -     -       -       -
  speex16     - 16998 11999 12000    17997 11999 11998 17997     - 34995 37994 17997  7999      -       -   4000     -       -   11999
  testlaw     -  5001     2     3     6000     2     1  6000     - 22998 25997  6000  2000      -       -   5999     -   22996       -

and here is my log from asterisk full:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK04db3ee0
From: "Unknown" <sip:[email protected]>;tag=as0f06f185
To: <sip:10.10.10.1>;tag=2287315620
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
content-type: application/sdp
Allow: INVITE, ACK, INFO, OPTIONS, NOTIFY, REFER, CANCEL, BYE
Content-Length: 272

v=0
o=username 0 0 IN IP4 0.0.0.0
s=session
c=IN IP4 0.0.0.0
t=0 0
m=audio 0 RTP/AVP 0 8 18 4 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
[Jul 8 16:44:27] VERBOSE[5662] chan_sip.c: --- (9 headers 13 lines) ---
[Jul 8 16:44:27] VERBOSE[5662] chan_sip.c: Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
[Jul 8 16:44:28] VERBOSE[5645] config.c: == Parsing '/etc/asterisk/res_pktccops.conf': [Jul 8 16:44:28] VERBOSE[5645] config.c: == Found
[Jul 8 16:45:01] VERBOSE[5630] asterisk.c: -- Remote UNIX connection
[Jul 8 16:45:01] VERBOSE[28902] asterisk.c: -- Remote UNIX connection disconnected
[Jul 8 16:45:27] VERBOSE[5662] chan_sip.c: Reliably Transmitting (no NAT) to 10.10.10.1:5060:
OPTIONS sip:10.10.10.1 SIP/2.0 
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK6754512a 
Max-Forwards: 70 
From: "Unknown" <sip:[email protected]>;tag=as1936f60f 
To: <sip:10.10.10.1> 
Contact: <sip:[email protected]:5060> 
Call-ID: [email protected]:5060 
CSeq: 102 OPTIONS 
User-Agent: FPBX-2.8.1(1.8.11.0) 
Date: Sun, 08 Jul 2012 21:45:27 GMT 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH 
Supported: replaces, timer 
Content-Length: 0 


---
[Jul 8 16:45:27] VERBOSE[5662] chan_sip.c: 
<--- SIP read from UDP:10.10.10.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK6754512a
From: "Unknown" <sip:[email protected]>;tag=as1936f60f
To: <sip:10.10.10.1>;tag=120317160
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
content-type: application/sdp
Allow: INVITE, ACK, INFO, OPTIONS, NOTIFY, REFER, CANCEL, BYE
Content-Length: 272

v=0
o=username 0 0 IN IP4 0.0.0.0
s=session
c=IN IP4 0.0.0.0
t=0 0
m=audio 0 RTP/AVP 0 8 18 4 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
[Jul 8 16:45:27] VERBOSE[5662] chan_sip.c: --- (9 headers 13 lines) ---
[Jul 8 16:45:27] VERBOSE[5662] chan_sip.c: Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
[Jul 8 16:46:27] VERBOSE[5662] chan_sip.c: Reliably Transmitting (no NAT) to 10.10.10.1:5060:
OPTIONS sip:10.10.10.1 SIP/2.0 
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK754a2ddd 
Max-Forwards: 70 
From: "Unknown" <sip:[email protected]>;tag=as68004d73 
To: <sip:10.10.10.1> 
Contact: <sip:[email protected]:5060> 
Call-ID: [email protected]:5060 
CSeq: 102 OPTIONS 
User-Agent: FPBX-2.8.1(1.8.11.0) 
Date: Sun, 08 Jul 2012 21:46:27 GMT 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH 
Supported: replaces, timer 
Content-Length: 0 


---
[Jul 8 16:46:27] NOTICE[5662] chan_sip.c: Registration from '<sip:[email protected]>' failed for '10.10.10.41:5060' - No matching peer found
[Jul 8 16:46:27] VERBOSE[5662] chan_sip.c: 
<--- SIP read from UDP:10.10.10.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK754a2ddd
From: "Unknown" <sip:[email protected]>;tag=as68004d73
To: <sip:10.10.10.1>;tag=2543903276
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
content-type: application/sdp
Allow: INVITE, ACK, INFO, OPTIONS, NOTIFY, REFER, CANCEL, BYE
Content-Length: 272

v=0
o=username 0 0 IN IP4 0.0.0.0
s=session
c=IN IP4 0.0.0.0
t=0 0
m=audio 0 RTP/AVP 0 8 18 4 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
[Jul 8 16:46:27] VERBOSE[5662] chan_sip.c: --- (9 headers 13 lines) ---
[Jul 8 16:46:27] VERBOSE[5662] chan_sip.c: Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
[Jul 8 16:47:27] VERBOSE[5662] chan_sip.c: Reliably Transmitting (no NAT) to 10.10.10.1:5060:
OPTIONS sip:10.10.10.1 SIP/2.0 
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK08e751b7 
Max-Forwards: 70 
From: "Unknown" <sip:[email protected]>;tag=as3024c902 
To: <sip:10.10.10.1> 
Contact: <sip:[email protected]:5060> 
Call-ID: [email protected]:5060 
CSeq: 102 OPTIONS 
User-Agent: FPBX-2.8.1(1.8.11.0) 
Date: Sun, 08 Jul 2012 21:47:27 GMT 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH 
Supported: replaces, timer 
Content-Length: 0 


---
[Jul 8 16:47:28] VERBOSE[5662] chan_sip.c: 
<--- SIP read from UDP:10.10.10.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK08e751b7
From: "Unknown" <sip:[email protected]>;tag=as3024c902
To: <sip:10.10.10.1>;tag=458416752
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
content-type: application/sdp
Allow: INVITE, ACK, INFO, OPTIONS, NOTIFY, REFER, CANCEL, BYE
Content-Length: 272

v=0
o=username 0 0 IN IP4 0.0.0.0
s=session
c=IN IP4 0.0.0.0
t=0 0
m=audio 0 RTP/AVP 0 8 18 4 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
[Jul 8 16:47:28] VERBOSE[5662] chan_sip.c: --- (9 headers 13 lines) ---
[Jul 8 16:47:28] VERBOSE[5662] chan_sip.c: Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
[Jul 8 16:48:28] VERBOSE[5662] chan_sip.c: Reliably Transmitting (no NAT) to 10.10.10.1:5060:
OPTIONS sip:10.10.10.1 SIP/2.0 
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK7efffa21 
Max-Forwards: 70 
From: "Unknown" <sip:[email protected]>;tag=as67ff091c 
To: <sip:10.10.10.1> 
Contact: <sip:[email protected]:5060> 
Call-ID: [email protected]:5060 
CSeq: 102 OPTIONS 
User-Agent: FPBX-2.8.1(1.8.11.0) 
Date: Sun, 08 Jul 2012 21:48:28 GMT 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH 
Supported: replaces, timer 
Content-Length: 0 


---
[Jul 8 16:48:28] VERBOSE[5662] chan_sip.c: 
<--- SIP read from UDP:10.10.10.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.10.4:5060;branch=z9hG4bK7efffa21
From: "Unknown" <sip:[email protected]>;tag=as67ff091c
To: <sip:10.10.10.1>;tag=3281003956
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
content-type: application/sdp
Allow: INVITE, ACK, INFO, OPTIONS, NOTIFY, REFER, CANCEL, BYE
Content-Length: 272

v=0
o=username 0 0 IN IP4 0.0.0.0
s=session
c=IN IP4 0.0.0.0
t=0 0
m=audio 0 RTP/AVP 0 8 18 4 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
[Jul 8 16:48:28] VERBOSE[5662] chan_sip.c: --- (9 headers 13 lines) ---
[Jul 8 16:48:28] VERBOSE[5662] chan_sip.c: Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
[Jul 8 16:48:51] NOTICE[5650] chan_iax2.c: No registration for peer '7777' (from 127.0.0.1)
[Jul 8 16:48:51] NOTICE[5649] chan_iax2.c: No registration for peer '7777' (from 127.0.0.1)
[Jul 8 16:49:04] VERBOSE[5662] netsock2.c: == Using SIP RTP TOS bits 184
[Jul 8 16:49:04] VERBOSE[5662] netsock2.c: == Using SIP RTP CoS mark 5
[Jul 8 16:49:04] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:1] ResetCDR("SIP/763-0000001a", "") in new stack
[Jul 8 16:49:04] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:2] NoCDR("SIP/763-0000001a", "") in new stack
[Jul 8 16:49:04] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:3] Progress("SIP/763-0000001a", "") in new stack
[Jul 8 16:49:04] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:4] Wait("SIP/763-0000001a", "1") in new stack
[Jul 8 16:49:05] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:5] Progress("SIP/763-0000001a", "") in new stack
[Jul 8 16:49:05] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:6] Playback("SIP/763-0000001a", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack
[Jul 8 16:49:05] VERBOSE[28915] file.c: -- <SIP/763-0000001a> Playing 'silence/1.gsm' (language 'en')
[Jul 8 16:49:06] VERBOSE[28915] file.c: -- <SIP/763-0000001a> Playing 'cannot-complete-as-dialed.gsm' (language 'en')
[Jul 8 16:49:11] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:7] Wait("SIP/763-0000001a", "1") in new stack
[Jul 8 16:49:11] NOTICE[5662] chan_sip.c: Registration from '<sip:[email protected]>' failed for '10.10.10.23:5060' - No matching peer found
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [2143845635@from-internal:8] Congestion("SIP/763-0000001a", "20") in new stack
[Jul 8 16:49:12] WARNING[28915] channel.c: Prodding channel 'SIP/763-0000001a' failed
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: == Spawn extension (from-internal, 2143845635, 8) exited non-zero on 'SIP/763-0000001a'
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [h@from-internal:1] Macro("SIP/763-0000001a", "hangupcall") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("SIP/763-0000001a", "1?endmixmoncheck") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,9)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:9] NoOp("SIP/763-0000001a", "End of MIXMON check") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:10] GotoIf("SIP/763-0000001a", "1?nomeetmemon") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,15)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:15] NoOp("SIP/763-0000001a", "MEETME_RECORDINGFILE=") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:16] GotoIf("SIP/763-0000001a", "1?noautomon") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,18)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:18] NoOp("SIP/763-0000001a", "TOUCH_MONITOR_OUTPUT=") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:19] GotoIf("SIP/763-0000001a", "1?noautomon2") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,25)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:25] NoOp("SIP/763-0000001a", "MONITOR_FILENAME=") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:26] GotoIf("SIP/763-0000001a", "1?skiprg") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,29)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:29] GotoIf("SIP/763-0000001a", "1?skipblkvm") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,32)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:32] GotoIf("SIP/763-0000001a", "1?theend") in new stack
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Goto (macro-hangupcall,s,34)
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: -- Executing [s@macro-hangupcall:34] Hangup("SIP/763-0000001a", "") in new stack
[Jul 8 16:49:12] VERBOSE[28915] app_macro.c: == Spawn extension (macro-hangupcall, s, 34) exited non-zero on 'SIP/763-0000001a' in macro 'hangupcall'
[Jul 8 16:49:12] VERBOSE[28915] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/763-0000001a'

I feel like I am closer since at least the message changed when I dial - now it’s “Your call can’t be completed as dialed, please check number and dial again” (then gives busy tones).

Suggestions? My guess is that it’s a connection issue with the trunk FXO port?

What did you mean in your response when you said "Most gateways do not require SIP authentication. Can you leave everything blank in the SIP account except the name? If not you want to build backwards for a minimum config."
What is it to “build backwards for a minimum config”?

In the suggested trunk settings from your previous post: should there be a “context=from-pstn” Yes forgot that

In Asterisk SIP settings, should NAT settings be set to yes, no, never or route? Never, since you don’t need NAT

I removed ULAW from option because it didn’t look like it was installed? (see below codec chart) You have, the number is the time to transcode between CODEC’s

On voip-info.org I read “For Grandstream phones: set dtmfmode=info” And “dtmfmode=info ; either RFC2833 or INFO for the BudgeTone” So should I change this in trunk settings? What about on my FXO port config? Currently it’s set to rfc2883 both in asterisk and FXO port. One would hope in the 8 years since that was written Granstream has fixed their rfc2833 implementation. The key point is that the device and Asterisk have to agree on the method of DTMF transmission.

From: “Unknown” sip:[email protected];tag=as1936f60f
To: sip:10.10.10.1
Something in your trunk is still not matching what the gateway is sending

Suggestions? My guess is that it’s a connection issue with the trunk FXO port? No it’s because the call is coming in from an unknown source. Set anonymous SIP on and make sure you have an any/any catch all route and you will find it works. This is a troubleshooting step, not a solution.

Most gateways do not require SIP authentication. Can you leave everything blank in the SIP account except the name? Since the gateway is in your trusted network why worry about authentication? It just adds another layer of needless complexity. Most gateways will send a call anonymously.

“Call without Registration:” And I set it to “enable” from the default disable. I assume this means “don’t send un/pw”. What do you think? It simply means that the gateway will send the call irrespective of the registration status. Since you have a static IP you don’t need to register so this option should be enabled.

“Most gateways do not require SIP authentication. Can you leave everything blank in the SIP account except the name? If not you want to build backwards for a minimum config.” It the same simplicity issue I discussed before. Why add extra layers of complexity?

What is it to “build backwards for a minimum config”? You want the least number of identity options (like fromuser, user, secret…) in your SIP trunk. The more you have the more chances you have to make a mistake. A trunk should contain the least number of parameters to uniquely identify the peer for inbound calls and to authenticate with the UA on outbound calls.

Hope this helps.

ucan fix??? i have the same problem and not working? do you have the solution??

The solution is in this thread. You need to read all the information provided and ask a specific question if you can’t figure it out.

The issue was a bad device. The fxo card was defective somehow. I don’t trust draytek anymore I provide VoIP services or products. They don’t even know how to config their own equipment. I bought a grand stream external 8 port fxo gateway instead. Works pretty well.

hi there, i am also struggling with setting this up. i cant get any calls whether outgoing or incoming to route through my asterix pbx. i already have several cards installed in the pbx that are working fine. when i check my quadroFXO communication tables i get this response:
***************************** SIP message buffer start *****************************
OPTIONS sip:192.168.10.95 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.252:5060;branch=z9hG4bK40ed529c;rport
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as47dcd555
To: sip:192.168.10.95
Contact: sip:[email protected]:5060
Call-ID: [email protected]:50 60
CSeq: 102 OPTIONS
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Wed, 04 Dec 2013 13:19:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

***************************** SIP message buffer end ******************************

15:19:25 Try to send SIP message # (04/12/2013 13:19:25:362 GMT) # UDP # 484 bytes # buff size 0 # from: 192.168.10.95:5060 # to: 192.168.10.252:5060

***************************** SIP message buffer start *****************************
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.252:5060;rport=5060;branch=z9hG4bK40ed5 29c
To: sip:192.168.10.95
From: “Unknown” sip:[email protected];tag=as47dcd555
CSeq: 102 OPTIONS
Call-ID: [email protected]:50 60
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, UPDATE
Supported: replaces, norefersub
Server: Epygi Quadro SIP User Agent/v5.1.16 (QUADRO-FXO)
Content-Length: 0

***************************** SIP message buffer end ****************************

if i understand correctly the asterix set up is fine, as in the asterix is recieving the signal but the quadro isnt recieving the signal. i tried follwing the earlier post and reading elastix without tears and tried setting it up as described SPA3000… i have follwed other links found on the net but still no joy. all i basically want this device to do is either forward the lines to be used in the pbx or share the lines… something along those lines.

any help in this matter would be greatly appreciated.