Outgoing calls not working with Neophone.hu

I’ve recently installed the most recent version of AsteriskNow and trying to configure the following scenario.

2 Voip providers (each with outgoing and incoming calling).
2
Extensions, that should both be rung if a call comes in on either line.
And both lines should also be able to place calls to either provider.

So I’ve created 2 extensions: user1 (exten 10), user2 (exten 20)

Created 1 ring group ringing extension 10 & 20

Created two trunks:

  1. FreePhoneLine (works incoming and outgoing)
  2. NeoPhone (incoming works, outgoing not working)

Neophone trunk config:
allow any cid
outbound caller id: my DID
Dial manipulation rules, none
Trunk Name: NeoPhone
Peer Details:

context=from-trunk
host=sip.neophonex.hu
username=06211234567
secret=password
auth=md5
type=friend
insecure=very
nat=yes
dtmfmode=auto
disallow=all
allow=ulaw&g729
fromdomain=sip.neophonex.hu

User Context: 06211234567
User Details:

secret=password
type=user
context=from-trunk
insecure=port,invite
fromdomain=sip.neophonex.hu

Register: 06211234567:[email protected]/06211234567

Created Dialing plans: FPL and NeoPhone
NeoPhone plan:
061XXXXXXX
06Z0XXXXXXX
06Z1XXXXXXX
06ZXXXXXXX
are added as matching pattern with no prepend, prefix or caller id. And set to go out on trunk NeoPhone.

FPL dialplan set for:
1ZXXXXXXXXX
ZXXXXXXXXX with FPL trunk.

When I place an inbound or outbound call with FreePhoneLine everything works great.

With
Neophone.hu inbound works ok, outbound appears to dial, waits about a
minute produces 1 ring and an immediate hangup. So I am assuming there
is something with the connection to the SIP provider.

In asterisk CLI I did the following checks:
Registrations:
localhost*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
voip.freephoneline.ca:5060 N 1XXXXXXXXXX 165 Registered Fri, 16 Jan 2015 06:01:33
sip.neophonex.hu:5060 N 06211234567 165 Registered Fri, 16 Jan 2015 06:01:31
2 SIP registrations.

Verbose logging when when placing a call:

localhost*CLI>
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [[email protected]:1] Macro("SIP/20-00000008", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [[email protected]:1] Set("SIP/20-00000008", "TOUCH_MONITOR=1421403822.46") in new stack
    -- Executing [[email protected]:2] Set("SIP/20-00000008", "AMPUSER=20") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/20-00000008", "0?report") in new stack
    -- Executing [[email protected]:4] ExecIf("SIP/20-00000008", "1?Set(REALCALLERIDNUM=20)") in new stack
    -- Executing [[email protected]:5] Set("SIP/20-00000008", "AMPUSER=20") in new stack
    -- Executing [[email protected]:6] GotoIf("SIP/20-00000008", "0?limit") in new stack
    -- Executing [[email protected]:7] Set("SIP/20-00000008", "AMPUSERCIDNAME=User2") in new stack
    -- Executing [[email protected]:8] GotoIf("SIP/20-00000008", "0?report") in new stack
    -- Executing [[email protected]:9] Set("SIP/20-00000008", "AMPUSERCID=20") in new stack
    -- Executing [[email protected]:10] Set("SIP/20-00000008", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:11] Set("SIP/20-00000008", "CALLERID(all)="User2" <20>") in new stack
    -- Executing [[email protected]:12] GotoIf("SIP/20-00000008", "0?limit") in new stack
    -- Executing [[email protected]:13] ExecIf("SIP/20-00000008", "1?Set(GROUP(concurrency_limit)=20)") in new stack
    -- Executing [[email protected]:14] GosubIf("SIP/20-00000008", "7?sub-ccss,s,1(from-internal,06304123456)") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/20-00000008", "0?Return()") in new stack
    -- Executing [[email protected]:2] Set("SIP/20-00000008", "CCSS_SETUP=TRUE") in new stack
 
   -- Executing [[email protected]:3] GosubIf("SIP/20-00000008", 
"0?monitor_config,1(from-internal,06304123456):monitor_default,1(from-internal,06304123456)")
 in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/20-00000008", "0?is_exten") in new stack
    -- Executing [[email protected]:2] StackPop("SIP/20-00000008", "") in new stack
    -- Executing [[email protected]:3] Return("SIP/20-00000008", "FALSE") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/20-00000008", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [[email protected]:16] GotoIf("SIP/20-00000008", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,30)
    -- Executing [[email protected]:30] Set("SIP/20-00000008", "CALLERID(number)=20") in new stack
    -- Executing [[email protected]:31] Set("SIP/20-00000008", "CALLERID(name)=User2") in new stack
    -- Executing [[email protected]:32] Set("SIP/20-00000008", "CDR(cnum)=20") in new stack
    -- Executing [[email protected]:33] Set("SIP/20-00000008", "CDR(cnam)=User2") in new stack
    -- Executing [[email protected]:34] Set("SIP/20-00000008", "CHANNEL(language)=en") in new stack
 
   -- Executing [[email protected]:2] Gosub("SIP/20-00000008", 
"sub-record-check,s,1(out,06304123456,yes)") in new stack
    -- Executing [[email protected]:1] GotoIf("SIP/20-00000008", "0?initialized") in new stack
    -- Executing [[email protected]:2] Set("SIP/20-00000008", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("SIP/20-00000008", "NOW=1421403823") in new stack
    -- Executing [[email protected]:4] Set("SIP/20-00000008", "__DAY=16") in new stack
    -- Executing [[email protected]:5] Set("SIP/20-00000008", "__MONTH=01") in new stack
    -- Executing [[email protected]:6] Set("SIP/20-00000008", "__YEAR=2015") in new stack
    -- Executing [[email protected]:7] Set("SIP/20-00000008", "__TIMESTR=20150116-062343") in new stack
    -- Executing [[email protected]:8] Set("SIP/20-00000008", "__FROMEXTEN=20") in new stack
    -- Executing [[email protected]:9] Set("SIP/20-00000008", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("SIP/20-00000008", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("SIP/20-00000008", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("SIP/20-00000008", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] GotoIf("SIP/20-00000008", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,16)
    -- Executing [[email protected]:16] GotoIf("SIP/20-00000008", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
 
   -- Executing [[email protected]:1] NoOp("SIP/20-00000008", 
"Outbound Recording Check from 20 to 06304123456") in new stack
    -- Executing [[email protected]:2] Set("SIP/20-00000008", "RECMODE=dontcare") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/20-00000008", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]:7] Gosub("SIP/20-00000008", "recordcheck,1(yes,out,06304123456)") in new stack
    -- Executing [[email protected]:1] NoOp("SIP/20-00000008", "Starting recording check against yes") in new stack
    -- Executing [[email protected]:2] Goto("SIP/20-00000008", "yes") in new stack
    -- Goto (sub-record-check,recordcheck,9)
    -- Executing [[email protected]:9] ExecIf("SIP/20-00000008", "0?Return()") in new stack
    -- Executing [[email protected]:10] Set("SIP/20-00000008", "__REC_POLICY_MODE=YES") in new stack
    -- Executing [[email protected]:11] Goto("SIP/20-00000008", "startrec") in new stack
    -- Goto (sub-record-check,recordcheck,16)
    -- Executing [[email protected]:16] NoOp("SIP/20-00000008", "Starting recording: out, 06304123456") in new stack
    -- Executing [[email protected]:17] Set("SIP/20-00000008", "AUDIOHOOK_INHERIT(MixMonitor)=yes") in new stack
 
   -- Executing [[email protected]:18] Set("SIP/20-00000008",
 "__CALLFILENAME=out-06304123456-20-20150116-062343-1421403822.46") in 
new stack
    -- Executing [[email protected]:19] 
MixMonitor("SIP/20-00000008", 
"2015/01/16/out-06304123456-20-20150116-062343-1421403822.46.wav,ai(LOCAL_MIXMON_ID),")
 in new stack
    -- Executing [[email protected]:20] Set("SIP/20-00000008", "__MIXMON_ID=0x7ff1d859eca0") in new stack
    -- Executing [[email protected]:21] Set("SIP/20-00000008", "__RECORD_ID=SIP/20-00000008") in new stack
  == Begin MixMonitor Recording SIP/20-00000008
    -- Executing [[email protected]:22] Set("SIP/20-00000008", "__REC_STATUS=RECORDING") in new stack
 
   -- Executing [[email protected]:23] Set("SIP/20-00000008",
 
"CDR(recordingfile)=out-06304123456-20-20150116-062343-1421403822.46.wav")
 in new stack
    -- Executing [[email protected]:24] Return("SIP/20-00000008", "") in new stack
    -- Executing [[email protected]:8] Return("SIP/20-00000008", "") in new stack
    -- Executing [[email protected]:3] ExecIf("SIP/20-00000008", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [[email protected]:4] Set("SIP/20-00000008", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:5] Set("SIP/20-00000008", "_NODEST=") in new stack
    -- Executing [[email protected]:6] Macro("SIP/20-00000008", "dialout-trunk,1,06304123456,,off") in new stack
    -- Executing [[email protected]:1] Set("SIP/20-00000008", "DIAL_TRUNK=1") in new stack
    -- Executing [[email protected]:2] GosubIf("SIP/20-00000008", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/20-00000008", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:4] Set("SIP/20-00000008", "DIAL_NUMBER=06304123456") in new stack
    -- Executing [[email protected]:5] Set("SIP/20-00000008", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:6] Set("SIP/20-00000008", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [[email protected]:7] GotoIf("SIP/20-00000008", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [[email protected]:9] GotoIf("SIP/20-00000008", "0?skipoutcid") in new stack
    -- Executing [[email protected]:10] Set("SIP/20-00000008", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [[email protected]:11] Macro("SIP/20-00000008", "outbound-callerid,1") in new stack
    -- Executing [[email protected]:1] ExecIf("SIP/20-00000008", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [[email protected]:2] ExecIf("SIP/20-00000008", "0?Set(REALCALLERIDNUM=20)") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/20-00000008", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [[email protected]:6] Set("SIP/20-00000008", "USEROUTCID=") in new stack
    -- Executing [[email protected]:7] Set("SIP/20-00000008", "EMERGENCYCID=") in new stack
    -- Executing [[email protected]:8] Set("SIP/20-00000008", "TRUNKOUTCID=06211234567") in new stack
    -- Executing [[email protected]:9] GotoIf("SIP/20-00000008", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [[email protected]:14] ExecIf("SIP/20-00000008", "1?Set(CALLERID(all)=06211234567)") in new stack
    -- Executing [[email protected]:15] ExecIf("SIP/20-00000008", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:16] ExecIf("SIP/20-00000008", "0?Set(CALLERID(all)=)") in new stack
 
   -- Executing [[email protected]:17] ExecIf("SIP/20-00000008",
 "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:18] Set("SIP/20-00000008", "CDR(outbound_cnum)=06211234567") in new stack
    -- Executing [[email protected]:19] Set("SIP/20-00000008", "CDR(outbound_cnam)=") in new stack
[2015-01-16 06:23:43] WARNING[1788]: func_cdr.c:349 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [[email protected]:12] GosubIf("SIP/20-00000008", "0?sub-flp-1,s,1()") in new stack
    -- Executing [[email protected]:13] Set("SIP/20-00000008", "OUTNUM=06304123456") in new stack
    -- Executing [[email protected]:14] Set("SIP/20-00000008", "custom=SIP/NeoPhone") in new stack
 
   -- Executing [[email protected]:15] ExecIf("SIP/20-00000008", 
"0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [[email protected]:16] ExecIf("SIP/20-00000008", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [[email protected]:17] Macro("SIP/20-00000008", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("SIP/20-00000008", "") in new stack
    -- Executing [[email protected]:18] GotoIf("SIP/20-00000008", "0?bypass,1") in new stack
    -- Executing [[email protected]:19] ExecIf("SIP/20-00000008", "1?Set(CONNECTEDLINE(num,i)=06304123456)") in new stack
 
   -- Executing [[email protected]:20] ExecIf("SIP/20-00000008", 
"1?Set(CONNECTEDLINE(name,i)=CID:06211234567)") in new stack
    -- Executing [[email protected]:21] GotoIf("SIP/20-00000008", "0?customtrunk") in new stack
    -- Executing [[email protected]:22] Dial("SIP/20-00000008", "SIP/NeoPhone/06304123456,300,Tt") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/NeoPhone/06304123456
[2015-01-16
 06:24:16] WARNING[1993]: chan_sip.c:4042 retrans_pkt: Retransmission 
timeout reached on transmission 
[email protected] for seqno 102 
(Critical Request) -- See 
https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[2015-01-16
 06:24:16] WARNING[1993]: chan_sip.c:4071 retrans_pkt: Hanging up call 
[email protected] - no reply to our 
critical packet (see 
https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
  == Everyone is busy/congested at this time (1:0/0/1)
 
   -- Executing [[email protected]:23] NoOp("SIP/20-00000008", "Dial
 failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 
18") in new stack
    -- Executing [[email protected]:24] GotoIf("SIP/20-00000008", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [[email protected]:1] Set("SIP/20-00000008", "RC=18") in new stack
    -- Executing [[email protected]:2] Goto("SIP/20-00000008", "18,1") in new stack
    -- Goto (macro-dialout-trunk,18,1)
    -- Executing [[email protected]:1] Goto("SIP/20-00000008", "s-NOANSWER,1") in new stack
    -- Goto (macro-dialout-trunk,s-NOANSWER,1)
 
   -- Executing [[email protected]:1] 
NoOp("SIP/20-00000008", "Dial failed due to trunk reporting NOANSWER - 
giving up") in new stack
    -- Executing [[email protected]:2] Progress("SIP/20-00000008", "") in new stack
    -- Executing [[email protected]:3] Playback("SIP/20-00000008", "number-not-answering,noanswer") in new stack
    -- <SIP/20-00000008> Playing 'number-not-answering.ulaw' (language 'en')
    -- Executing [[email protected]:4] Congestion("SIP/20-00000008", "20") in new stack
[2015-01-16 06:24:17] WARNING[5606][C-00000006]: channel.c:4816 ast_prod: Prodding channel 'SIP/20-00000008' failed
  == Spawn extension (macro-dialout-trunk, s-NOANSWER, 4) exited non-zero on 'SIP/20-00000008' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 06304123456, 6) exited non-zero on 'SIP/20-00000008'
    -- Executing [[email protected]:1] Hangup("SIP/20-00000008", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/20-00000008'
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording SIP/20-00000008
localhost*CLI>

Resolved :slight_smile:

I installed freepbx on my raspberry pi, and re-did everything, but with slightly different settings and everything works now. I’ll paste the settings in case anyone else wants to use neophone.

Peer Settings

type=peer
canreinvite=no
fromdomain=sip.neophonex.hu
username=YOURPHONE#
fromuser=YOURPHONE#
secret=password
host=sip.neophonex.hu
insecure=port,invite
pedantic=no
qualify=300
nat=yes
disallow=all
allow=ulaw&alaw&ilbc
auth=md5

For the USER Context enter your phone number starting with 06…

type=user
secret=password
insecure=port,invite
fromuser=YOURPHONE#
fromdomain=sip.neophonex.hu
context=from-trunk

Register string:

YOURPHONE#:[email protected]

Cheers!