Working Sipura 3000 or Linksys 3102 configuration?

Hello

I’m having a problem with the Linksys 3102: With incoming PSTN calls, I can hear the caller through the X-Ten softphone, but he can’t hear me. The problem is worse with Sjphone and the GrandStream 100 hardphone, as I get no sound in either direction.

FWIW…

  • the SIP client, the PBX and the Linksys are all connected to a switch, with no firewall anywhere

  • the only way I can get the Linksys to notify the PBX of an incoming PSTN call is using the following settings:

  • PSTN Line > PSTN-To-VoIP Gateway Setup > PSTN Ring Thru Line 1 = yes
  • User 1 > Call Forward Settings > Cfwd All Dest = fxo (where “fxo” is the account also used in PSTN Line > Subscriber Information to register with the PBX)

Dial plans in either “Line 1” or “PSTN Line” don’t make it.

Could someone upload his configuration of the Linksys (File > Save as file) so I can compare with what I have?

Since both ends use G711u as their default codec and there’s no firewall between them, I suspect I’m totally wrong when it comes to configuring the Linksys as a simple SIP gateway (no use for the FXS port at this point). Possibly some routing issue.

Thank you.

(FYI, I’m not using the WAN interface and the Linksys is connected to
the LAN using the familiar 192.168.0.0/24 plan, the PBX is sitting on
the same LAN, and no firewall is involved. This is straight PSTN ->
Linksys -> LAN -> PBX.)

No matter what I try, I still have the following road-blocks:

  1. If I don’t forward calls to the PBX through User 1 > Cfwd All Dest,
    Linksys doesn’t notify the PBX of incoming calls. Syslogd does show
    that the Linksys detects the call. Using a dial plan under PSTN Line
    doesn’t work

  2. When calls do get set, the internal extension can hear PSTN caller,
    but PSTN caller can’t hear internal extension : routing problem?

Since the 3102 doesn’t come with any documentation and I’m told it’s
sufficiently different from the 3000 that I shouldn’t rely on
documentation for the latter… if some 3102 experts out there could
take a quick look at my configuration and what I tried and see if
there’s something obvious missing/wrong, I’d be very grateful.

codecomplete.free.fr/linksys_3102_bad_config/

Thank you.

I used the SPA3000 documentation for configuring the SPA3102. The only difference in the two units is the packaging, and the router functionality in the 3102 (absent in the 3000).

If I understand you correctly, the call is being established. This means the SIP signaling is fine. Hence the routing is not the issue here.
Also, voice only in 1 direction usually implies a firewall issue.

  1. Are you really really sure that the firewall on your PC is not the problem? Try disabling the firewall on your PC, just to make sure.
  2. If that doesn’t work, then did you check to see if one phone has put the other party on mute? (It happens).
  3. Make sure that your SIP phone and the SPA are not both using the same port at the same time. Change the port setting on the SPA to 5062 or 5064, and check again.

Also, could you post your sip debugging log? (The one from the asterisk CLI, not the one generated by syslogd on the SPA).
Also, I can send you my SPA config when I get home – that will save you at least a week of effort. It took me almost 3 weeks to get it working right! The dialplans, and the FXO timers took a while to figure out …it’s only when I got hold of the old SPA-3000 docs that I figured out how it works! I have that too, in case you need it.

– Sarv

Fred,
I took a quick look at your SPA-3102 config on the router side. There are some serious issues there. The SPA hasn’t acquired a WAN side IP address. Let’s start with a clean slate. First of all, reset the SPA to factory settings.
Then, under the WAN Setup tab, first enable web access from the WAN side.
Next, turn off the SPA’s DHCP server. Then, Set your SPA to Bridge mode. This way, all IP addresses on your local network will be handed out by your main DHCP server, and all devices will now be located on a single LAN. ANd now assign a static IP address for your SPA (192.168.1.200, or some such address on your LAN, but outside the range of your DHCP addresses).
Save and reboot for changes to take effect. Now, check to see if you can access the web interface from a PC on the same network.
If so, then at least the router part is OK.
Then, at that point, let me know, and I can walk you through the setup. You don’t need to do anything in “call forward settings” under “User 1”. All you need is a good dial plan …I can help you once you get to that point.
Cheers,
– Sarv

[quote=“fredtheman”]Hello

I’m having a problem with the Linksys 3102: With incoming PSTN calls, I can hear the caller through the X-Ten softphone, but he can’t hear me. The problem is worse with Sjphone and the GrandStream 100 hardphone, as I get no sound in either direction.

FWIW…

  • the SIP client, the PBX and the Linksys are all connected to a switch, with no firewall anywhere

  • the only way I can get the Linksys to notify the PBX of an incoming PSTN call is using the following settings:

  • PSTN Line > PSTN-To-VoIP Gateway Setup > PSTN Ring Thru Line 1 = yes
  • User 1 > Call Forward Settings > Cfwd All Dest = fxo (where “fxo” is the account also used in PSTN Line > Subscriber Information to register with the PBX)

Dial plans in either “Line 1” or “PSTN Line” don’t make it.

Could someone upload his configuration of the Linksys (File > Save as file) so I can compare with what I have?

Since both ends use G711u as their default codec and there’s no firewall between them, I suspect I’m totally wrong when it comes to configuring the Linksys as a simple SIP gateway (no use for the FXS port at this point). Possibly some routing issue.

Thank you.[/quote]

Well, I’m interested in SPA3102 configuration working with Asterisk, too.
Can you tell me how to set up sip.conf and extensions.conf in Asterisk and what is the configuration of SPA3102 to work both together?

I’d like my SIP phones (ext. 3000 and 3001) can dial an outgoing call via SPA3102 FXO for numbers starting with “0” and all incoming calls from PSTN (FXO) will be forwarded to extensions 3001 and 3002.

Thank’s.

Hi Stary,
Sorry for the delay in getting back to you …it’s been a busy week at work. Anyway, here is my sip.conf entry for the SPA:

[pstnline]                         ; account name for the SPA gateway
type=peer
username=pstnline       ; same as the pstn account entry in the SPA
context=internal            ; context for internal users that are allowed to dial out over the SPA.
secret=your_password
fromuser=pstnline        ; default callerID, if callerID value does not come through
host=192.168.1.3         ; SPA's IP address on local nwk. [Change this to the IP addr of your SPA]
insecure=very
port=5066                      ; avoid conflict with my IP phone(s) on ports 5060-5063
qualify=no
host=dynamic                ; this device needs to register
nat=yes                           ; not required if SPA and * are on same LAN, but seems to work better
canreinvite=no               ; disallow RTP media stream to bypass *
dtmfmode=info              ; other modes do not seem to work for me!
disallow=all                     ; only the sensible codecs
allow=ulaw                      ; my default codec ...gives excellent quality for even SIP -to- cell phone calls thru SPA
allow=g729                     ; low bandwidth codec, just in case.
allow=alaw                      ; fallback codec ...not sure why I even bothered to include it here
;allow=gsm                     ; SPA-3102 does not have a gsm codec!

In the above, make sure that you replace the word “internal” in the line “context=internal” with whatever context you have you extensions 3000 and 3001 in.

My extensions.conf has the following entries, Before you start reading, an explanation is in order … I have set the SPA to route all incoming phone calls to a *99 extension, Ringing, the *99 extension really rings my two extensions (just like you want it).
I have also set up the SPA so that when a call comes in with no cid name (and cid number may or may not be passed through), the call is processed to see if we have blacklisted number, or if it is a telemarketer. If it is a telemarketer, I play the ‘disconnect tone’ and a pre-recorded message telling them to disconnect and take my number off their list. Usually they hang up at this point. Now, if the caller remains on the line, it is usually a friend whose caller id hasn’t come through; so I try to get their cid name from the internal * database, then, I connect them to my internal IP phones. Note that you don’t have to set up the blacklist or populate the cid database at this point. This code should work just fine without doing any of that. But if you are interested in blacklisting callers or setting up a cid name database for your friends whose cid name don’t show up along with their cid numbers, there are easy commands to do this on the * CLI. [just google for the info.]

<put this code in the context that your extensions 3000 and 3001 are in> 

exten => *99,1,SETCIDNUM(${CALLERIDNUM})                 ; SPA-3102 forwards incoming PSTN calls here
exten => *99,2,LookupBlacklist(j)                                          ; If blacklisted caller, then jump to 103 (2+101)
exten => *99,3,Zapateller(nocallerid)                                    ; zap telemarketers with phone on-hook -- 'line disconnected' signal
exten => *99,4,Set(foo=${CALLERID(name)})                    ; copy cidname into variable 'foo'
exten => *99,5,Set(foo=${CUT(foo, ,1)})                            ; strip trailing space from 'foo'
exten => *99,6,GotoIf($["${foo}" = "UNKNOWN"]?20:7)
exten => *99,7,GotoIf($["${foo}" = "PRIVATE"]?20:8)
exten => *99,8,GotoIf($["${foo}" = "OUT"]?20:9)               ; OUT OF AREA
exten => *99,9,GotoIf($["${foo}" = "UNAVAILABLE"]?20:10)
exten => *99,10,GotoIf($["${foo}" = "WIRELESS"]?25:11)  ; look up cid name from database for wireless callers
exten => *99,11,GotoIf($["${foo}" = "PSTN"]?20:26)          ; look up cid name from database for all other 'no cidname' numbers
exten => *99,20,SetCallerID(,)                                                 ; Clear CID Name to NULL value
exten => *99,21,Answer                                                           ; Let Asterisk pick up the line now (caller is unknown)
exten => *99,22,Zapateller(nocallerid)                                   ; Zap the caller off-hook. Autodialers will disconnect, hopefully
exten => *99,23,Zapateller(nocallerid)
exten => *99,24,Playback(/mnt/kd/asterisk/my_sounds/telemarketer_getlost)
exten => *99,25,LookupCIDName                                          ; Look up cidname corresp. to cidnumber, in internal database
exten => *99,26,Dial(SIP/ABC&SIP/XYZ,30,trj)                      ; Ring SIP phone 1 and SIP phone 2
exten => *99,27,VoiceMail,u3000@default                           ; goto VM if unavailable
exten => *99,28,Playback(vm-goodbye)
exten => *99,29,Hangup()
exten => *99,103,Goto(blacklisted,s,1)                                  ; send blacklisted caller to 'blacklisted' context
exten => *99,127,VoiceMail,b3000@default                          ; goto vm if dialing (on step 26) finds phone busy
exten => *99,128,Playback(vm-goodbye)
exten => *99,129,Hangup()

<here is the 'blacklisted' context ..place it in extensions.conf> 

[blacklisted]                          ; we transfer blacklisted numbers to this context
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Zapateller
exten => s,4,Zapateller
exten => s,5,Playback(ss-noservice)
exten => s,6,Hangup

In the above code, substitute ABC and XYZ on line 26 with your SIP account names for your IP phones that have the extensions 3000 and 3001 respectively. Also substitue your voicemail box number in place of 3000 on lines 27 & 127
On line 24, you will need a telemarketer_getlost.wav file that tells telemarketers to hang up. Make sure that you provide the complete path to that file as shown. [Replace my path with yours]. You can record your own message and use it. If you don’t know how, never mind for now, the code will still work …it will just not execute line 24.

To configure your SPA-3102 …
Unless you really need the built-in router, you are better off disabling it. Note that I am assuming that you have a main router other than the SPA that you can use for DHCP. If so, then proceed as follows…

Under “Router —> WAN Setup” (advanced screen, admin mode):

  1. Set “Internet Connection Setting” to ‘Static IP’.
  2. Under “Remote Management”, set ‘Enable WAN Web Server’ to ‘Yes’. THIS IS IMPORTANT
  3. Under “Static IP Settings”, set your IP address for te SPA to value that is not in conflict with the address range of your DHCP server. Set the gateway addres to that of your main home router.

Under “Router —>Lan Setup” (advanced screen, admin mode):

  1. Set “networking Service” to ‘Bridge’
  2. Set “enable DHCP Server” to ‘No’.
    Leave other settings unchanged

Under “Voice —> System” (advanced screen, admin mode):

  1. Set “Enable Web Admin” to ‘Yes’
  2. Set your admin and user passwords.

Under “Voice --> Regional” (advanced screen, admin mode):
[This is only for North American Users]

  1. Set “CallerID Method” to ‘Bellcore (N. America, China)’.
  2. Set “Caller ID FSK Standard” to ‘Bell 202’.

Under “Voice --> Line 1” (advanced screen, admin mode):
[NOTE: Line 1 refers to the SIP account associated with the FXS port of the SPA]

  1. Set “Line Enable” to ‘Yes’ (if you wish to use the FXS port to connect an analog phone)
  2. Under “SIP Settings”, set “SIP Port” to 5064
  3. Under “Proxy and Registration”, set “Proxy” to , set “Use Outbound Proxy” to ‘No’, “Register” to ‘yes’, “Register Expires” to ‘3600’ (or whatever you feel like).
  4. Under “Subscriber Information”, Set “Display Name” to '‘your_name’, and set the user name and password for the SIp account for the phone attached to the FXS port
  5. Under “Audio Configuration”, “DTMF Tx Method” = “Info” seems to work for me.
  6. Under “VoIP Fallback To PSTN”, Set “Auto PSTN Fallback” to ‘Yes’.
  7. Under “Dial PLan”, set dial plan to:
L:6,S:3,(*xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)

For "Voice —> PSTN Line Settings, the page is too long and I don’t know how to attach the screenshots here…
But I can email you the screenshots

– Sarv

[quote=“stary”]Well, I’m interested in SPA3102 configuration working with Asterisk, too.
Can you tell me how to set up sip.conf and extensions.conf in Asterisk and what is the configuration of SPA3102 to work both together?

I’d like my SIP phones (ext. 3000 and 3001) can dial an outgoing call via SPA3102 FXO for numbers starting with “0” and all incoming calls from PSTN (FXO) will be forwarded to extensions 3001 and 3002.

Thank’s.[/quote]

I forgot to include the extensions.cong setting that allows your internal extensions (3000 and 3001) to call out through the SPA.
Here is the context for that: [ I assume that you are in North America, so I have provided the dialplan for dialing out under the North American Numbering Plan (NANP)]

[pstn] ; Outgoing local & long distance PSTN calls through the SPA-3102
;
exten => _411,1,Dial(${PSTN_GW}/${EXTEN})
exten => _411,2,Congestion()
exten => _411,102,Congestion()

exten => _911,1,Dial(${PSTN_GW}/${EXTEN})
exten => _911,2,Congestion()
exten => _911,102,Congestion()

exten => _1NXXNXXXXXX,1,Dial(${PSTN_GW}/${EXTEN}) ;allows 11 digit NANP numbers to be dialed (i.e. 10 digits prefixed by '1')
exten => _1NXXNXXXXXX,2,Congestion()
exten => _1NXXNXXXXXX,102,Congestion()

exten => _NXXNXXXXXX,1,Dial(${PSTN_GW}/${EXTEN}) ;allows 10 digit NANP numbers to be dialed, without the '1' prefix
exten => _NXXNXXXXXX,2,Congestion()
exten => _NXXNXXXXXX,102,Congestion()

; -------- Explicit Number Blocks to Avoid Getting Scammed ----------------------------------
exten => _1900XXXXXXX,1,Hangup()        ; block access to phone sex and other dubious lines
exten => _900XXXXXXX,1,Hangup()
exten => _1976XXXXXXX,1,Hangup()        ;block access to other dubious lines
exten => _976XXXXXXX,1,Hangup()
exten => _1809XXXXXXX,1,Hangup()        ;block access to the Dominican Republic
exten => _809XXXXXXX,1,Hangup()
exten => _1242XXXXXXX,1,Hangup()        ;block access to Bahamas
exten => _242XXXXXXX,1,Hangup()
exten => _1284XXXXXXX,1,Hangup()        ;block access to British Virgin Islands
exten => _284XXXXXXX,1,Hangup()
exten => _1246XXXXXXX,1,Hangup()        ;block access to Barbados
exten => _246XXXXXXX,1,Hangup()
exten => _1268XXXXXXX,1,Hangup()        ;block access to Antigua
exten => _268XXXXXXX,1,Hangup()
exten => _1345XXXXXXX,1,Hangup()        ;block access to the Cayman Islands
exten => _345XXXXXXX,1,Hangup()
exten => _1664XXXXXXX,1,Hangup()        ;block access to Montserrat
exten => _664XXXXXXX,1,Hangup()
exten => _1758XXXXXXX,1,Hangup()        ;block access to St. Lucia
exten => _758XXXXXXX,1,Hangup()
exten => _1787XXXXXXX,1,Hangup()        ;block access to Puerto Rico
exten => _787XXXXXXX,1,Hangup()
exten => _1869XXXXXXX,1,Hangup()        ;block access to St. Kitts/Nevis
exten => _869XXXXXXX,1,Hangup()
exten => _1876XXXXXXX,1,Hangup()        ;block access to Jamaica
exten => _876XXXXXXX,1,Hangup()
exten => _1441XXXXXXX,1,Hangup()        ;block access to Bermuda
exten => _441XXXXXXX,1,Hangup()
;------------------------------------------------------------------------------------------

You will see above that I have blocked quite a few countries …that’s because I never call those countries, and most $5 per minute scams seem to originate there, outside US jurisdiction.
Better safe than sorry! Of course, if you have legitimate reasons for calling those countries, feel free to take them off the list above!
You may also wish to modify the above dial plan if you wish to call other special 3 digit numbers (?) as well.

Note that, for the above to work, you need to tell * what your PSTN_GW is. To do that, in extensions.conf, under [globals], insert this line:

PSTN_GW=SIP/pstnline            ; All outgoing PSTN calls go to SPA-3102

Finally, don’t forget to include this in your internal context (or whatever context your 3000 and 3001 extensions are located)

include => pstn

For obvious reasons of security, you don’t want to put the above line in your default context!!

I think I have posted the whole setup here, between this post and my previous one. It is possible I missed a few steps somewhere, so let me know if you have trouble getting it to work. I have also emailed you the screenshots for the PSTN Line settings for the SPA-3102.
Good luck.
– Sarv

Hello.

I have been having problems getting both incoming and outgoing working at the same time on my SPA3102.

Once I get the incoming working, I break the outgoing and then vice-versa.

I think it’s mainly because I’m trying to force myself to use the GUI and getting confused on what they consider trunks vs service providers.

Anyway, what setting are you using to tell the SPA3102 to dial *99 on incoming calls?

Thanks,
– Jason

Hi

I can’t make SPA to forward outgoing calls.
In extensions.conf there’s:

exten => _08XXXXXXXX,1,Dial(${PSTN_GW}/${EXTEN})
exten => _08XXXXXXXX,2,Congestion()
exten => _08XXXXXXXX,102,Congestion()

I’m following the instructions from Sarv for the Voice - Regional and Line 1.

Here is the debug log:

[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:2575 do_setnat: Setting NAT on RTP to Off
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:4310 sip_alloc: Allocating new SIP dialog for 1444685315@192.168.128.178 - INVITE (With RTP)
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:14633 handle_request: **** Received INVITE (5) - Command in SIP INVITE
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:2575 do_setnat: Setting NAT on RTP to Off
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:4361 find_call: = Found Their Call ID: 1444685315@192.168.128.178 Their Tag 1299891378 Our tag: as38ceb49d
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:14633 handle_request: **** Received ACK (6) - Command in SIP ACK
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:2089 __sip_ack: Stopping retransmission on '1444685315@192.168.128.178' of Response 20: Match Not Found
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:4361 find_call: = Found Their Call ID: 1444685315@192.168.128.178 Their Tag 1299891378 Our tag: as38ceb49d
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:14633 handle_request: **** Received INVITE (5) - Command in SIP INVITE
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:2575 do_setnat: Setting NAT on RTP to Off
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:5129 process_sdp: T38 state changed to 0 on channel <none>
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:5209 process_sdp: We're settling with these formats: 0xe (gsm|ulaw|alaw)
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:13401 handle_request_invite: Checking SIP call limits for device Vladi
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:3003 update_call_counter: Updating call counter for incoming call
[2007-03-27 14:47:10] DEBUG[10186]: frame.c:1267 ast_codec_choose: Could not find preferred codec - Going for the best codec
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:3805 sip_new: *** Our native formats are 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:3806 sip_new: *** Joint capabilities are 0xe (gsm|ulaw|alaw)
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:3807 sip_new: *** Our capabilities are 0x8000e (gsm|ulaw|alaw|h263)
[2007-03-27 14:47:10] DEBUG[10186]: frame.c:1267 ast_codec_choose: Could not find preferred codec - Going for the best codec
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:3808 sip_new: *** AST_CODEC_CHOOSE formats are 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:3831 sip_new: This channel will not be able to handle video.
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:7980 build_route: build_route: Contact hop: <sip:Vladi@192.168.128.178:5061>
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:13476 handle_request_invite: SIP/Vladi-b7700468: New call is still down.... Trying...
[2007-03-27 14:47:10] DEBUG[10186]: devicestate.c:303 __ast_device_state_changed_literal: Notification of state change to be queued on device/channel SIP/Vladi-b7700468
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:161 ast_device_state: No provider found, checking channel drivers for SIP - Vladi
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1795 pbx_extension_helper: Launching 'Dial'
[2007-03-27 14:47:10] DEBUG[10161]: chan_sip.c:15244 sip_devicestate: Checking device state for peer Vladi
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:287 do_state_change: Changing state for SIP/Vladi - state 1 (Not in use)
[2007-03-27 14:47:10] DEBUG[10324]: app_queue.c:546 changethread:     -- Executing [0899140766@proba:1] Dial("SIP/Vladi-b7700468", "SIP/linksys/0899140766") in new stack
Device 'SIP/Vladi' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:15310 sip_request_call: Asked to create a SIP channel with formats: 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:4310 sip_alloc: Allocating new SIP dialog for (No Call-ID) - INVITE (With RTP)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:2575 do_setnat: Setting NAT on RTP to Off
[2007-03-27 14:47:10] DEBUG[10323]: frame.c:1267 ast_codec_choose: Could not find preferred codec - Going for the best codec
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3805 sip_new: *** Our native formats are 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3806 sip_new: *** Joint capabilities are 0x0 (nothing)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3807 sip_new: *** Our capabilities are 0x8000e (gsm|ulaw|alaw|h263)
[2007-03-27 14:47:10] DEBUG[10323]: frame.c:1267 ast_codec_choose: Could not find preferred codec - Going for the best codec
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3808 sip_new: *** AST_CODEC_CHOOSE formats are 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3810 sip_new: *** Our preferred formats from the incoming channel are 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3831 sip_new: This channel will not be able to handle video.
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:3301 ast_channel_inherit_variables: Not copying variable STACK-proba-0899140766-1.
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:3301 ast_channel_inherit_variables: Not copying variable SIPCALLID.
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:3301 ast_channel_inherit_variables: Not copying variable SIPUSERAGENT.
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:3301 ast_channel_inherit_variables: Not copying variable SIPDOMAIN.
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:3301 ast_channel_inherit_variables: Not copying variable SIPURI.
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:2830 sip_call: Outgoing Call for 0899140766
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3003 update_call_counter: Updating call counter for outgoing call
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:2845 sip_call: Our T38 capability (0), joint T38 capability (0)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:6188 add_sdp: ** Our capability: 0x8000e (gsm|ulaw|alaw|h263) Video flag: False
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:6189 add_sdp: ** Our prefcodec: 0x4 (ulaw)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:6206 add_sdp: This call needs video offers, but there's no video support enabled!
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:6320 add_sdp: -- Done with adding codecs to SDP
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:2381 ast_internal_timing_enabled: Internal timing is disabled (option_internal_timing=0 chan->timingfd=32)
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:6365 add_sdp: Done building SDP. Settling with this capability: 0x8000e (gsm|ulaw|alaw|h263)
    -- Called linksys/0899140766
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:4361 find_call: = Found Their Call ID: 74ceb39c16f37fb0210f902f7b7694d5@10.10.10.1 Their Tag  Our tag: as5edb5476
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:2071 __sip_ack: Acked pending invite 102
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:2089 __sip_ack: Stopping retransmission on '74ceb39c16f37fb0210f902f7b7694d5@10.10.10.1' of Request 102: Match Not Found
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:11641 handle_response_invite: SIP response 404 to standard invite
[2007-03-27 14:47:10] DEBUG[10186]: chan_sip.c:1633 sip_alreadygone: Setting SIP_ALREADYGONE on dialog 74ceb39c16f37fb0210f902f7b7694d5@10.10.10.1
    -- SIP/linksys-099370e0 is circuit-busy
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:1693 ast_hangup: Hanging up channel 'SIP/linksys-099370e0'
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3312 sip_hangup: Hangup call SIP/linksys-099370e0, SIP callid 74ceb39c16f37fb0210f902f7b7694d5@10.10.10.1)
[2007-03-27 14:47:10] DEBUG[10323]: devicestate.c:303 __ast_device_state_changed_literal: Notification of state change to be queued on device/channel SIP/linksys-099370e0
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:161 ast_device_state: No provider found, checking channel drivers for SIP - linksys
[2007-03-27 14:47:10] DEBUG[10161]: chan_sip.c:15244 sip_devicestate: Checking device state for peer linksys
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:287 do_state_change: Changing state for SIP/linksys - state 1 (Not in use)
[2007-03-27 14:47:10] DEBUG[10325]: app_queue.c:546 changethread: Device 'SIP/linksys' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
  == Everyone is busy/congested at this time (1:0/1/0)
[2007-03-27 14:47:10] DEBUG[10323]: rtp.c:1476 ast_rtp_early_bridge: Channel '<unspecified>' has no RTP, not doing anything
[2007-03-27 14:47:10] DEBUG[10323]: app_dial.c:1670 dial_exec_full: Exiting with DIALSTATUS=CONGESTION.
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1795 pbx_extension_helper: Launching 'Congestion'
    -- Executing [0899140766@proba:2] Congestion("SIP/Vladi-b7700468", "") in new stack
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:1633 sip_alreadygone: Setting SIP_ALREADYGONE on dialog 1444685315@192.168.128.178
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:1480 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/Vladi-b7700468'
[2007-03-27 14:47:10] DEBUG[10323]: devicestate.c:303 __ast_device_state_changed_literal: Notification of state change to be queued on device/channel SIP/Vladi-b7700468
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:161 ast_device_state: No provider found, checking channel drivers for SIP - Vladi
[2007-03-27 14:47:10] DEBUG[10161]: chan_sip.c:15244 sip_devicestate: Checking device state for peer Vladi
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:287 do_state_change: Changing state for SIP/Vladi - state 1 (Not in use)
[2007-03-27 14:47:10] DEBUG[10326]: app_queue.c:546 changethread: Device 'SIP/Vladi' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:2393 __ast_pbx_run: Spawn extension (proba,0899140766,2) exited non-zero on 'SIP/Vladi-b7700468'
  == Spawn extension (proba, 0899140766, 2) exited non-zero on 'SIP/Vladi-b7700468'
[2007-03-27 14:47:10] DEBUG[10323]: cdr_addon_mysql.c:210 mysql_log: cdr_mysql: inserting a CDR record.
[2007-03-27 14:47:10] DEBUG[10323]: cdr_addon_mysql.c:226 mysql_log: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield) VALUES ('2007-03-27 14:47:10','Vladi','Vladi','0899140766','proba', 'SIP/Vladi-b7700468','SIP/linksys-099370e0','Congestion','',0,0,'FAILED',3,'','')
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'Vladi'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'Vladi'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is '0899140766'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'proba'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'SIP/Vladi-b7700468'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'SIP/linksys-099370e0'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'Congestion'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is ''
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is '2007-03-27 14:47:10'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is ''
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is '2007-03-27 14:47:10'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is '0'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is '0'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'FAILED'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is 'DOCUMENTATION'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is ''
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is '1174996030.18'
[2007-03-27 14:47:10] DEBUG[10323]: pbx.c:1648 pbx_substitute_variables_helper_full: Function result is ''
[2007-03-27 14:47:10] DEBUG[10323]: channel.c:1693 ast_hangup: Hanging up channel 'SIP/Vladi-b7700468'
[2007-03-27 14:47:10] DEBUG[10323]: chan_sip.c:3312 sip_hangup: Hangup call SIP/Vladi-b7700468, SIP callid 1444685315@192.168.128.178)
[2007-03-27 14:47:10] DEBUG[10323]: devicestate.c:303 __ast_device_state_changed_literal: Notification of state change to be queued on device/channel SIP/Vladi-b7700468
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:161 ast_device_state: No provider found, checking channel drivers for SIP - Vladi
[2007-03-27 14:47:10] DEBUG[10161]: chan_sip.c:15244 sip_devicestate: Checking device state for peer Vladi
[2007-03-27 14:47:10] DEBUG[10161]: devicestate.c:287 do_state_change: Changing state for SIP/Vladi - state 1 (Not in use)
[2007-03-27 14:47:10] DEBUG[10327]: app_queue.c:546 changethread: Device 'SIP/Vladi' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
Really destroying SIP dialog '74ceb39c16f37fb0210f902f7b7694d5@10.10.10.1' Method: INVITE
Really destroying SIP dialog '1444685315@192.168.128.178' Method: INVITE

Shmaize,

IS your SPA set up correctly with the dialplans? (Note that the SPA’s dialplan I gave in my earlier post is different from the * dialplan. Also, it conforms to the North American Numbering Plan [NANP]). A quick look through your debug log indicates that the SPA gets the request but drops it since it cannot find the user (404 error). I also notice from your extensions.conf that you are trying to call an 8-digit number prefixed with a 08. This number is most certainly not in the NANP. SO, you must modify your SPA dial plan to conform to your country’s numbering system (by logging into the SPA over its web interface and making the change there). MY provided stock SPA dialplan will not work.
It’s quite possible that there may be other errors that may need to corrected, but let’s start with this one.
– Sarv

Jsm,
I have pm-ed you my SPA settings screenshot.
– sarv

Everithing works fine now. Just put a Dial plan 2 ( 08xxxxxxxx ), then under “VOIP-to-PSTN Gateway setup” set both “Line1 VOIP Caller DP” and “VOIP Caller default DP” to “2”.
I’m not using an analog telephone attached to the SPA, so I do not enable the Line 1.

Thanks again, Sarv