Page 1 of 1

Immediate Bye signal

PostPosted: Tue Aug 12, 2014 4:36 pm
by Iz3k34l
ok so im trying out a new SIP provider (flowroute), got them setup and configured everything seems to progress as it needs too (unless im missing something), but the calls aren't going through and in talking with the provider they are telling me they are seeing an immediate 'Bye' response once the call is made, here is the output from the asterisk CLI while a call is being made from start to finish;

Code: Select all
 == Manager 'sendcron' logged on from 127.0.0.1
[Aug 12 16:23:10]     -- Executing [919034214504@default:1] Dial("Local/91903421xxxx@default-73e4,2", "SIP/1903421xxxx@flowroute") in new stack
[Aug 12 16:23:10]     -- Called 1903421xxxx@flowroute
[Aug 12 16:23:12]     -- SIP/flowroute-0004b48f is ringing
[Aug 12 16:23:12]     -- SIP/flowroute-0004b48f is making progress passing it to Local/91903421xxxx@default-73e4,2
[Aug 12 16:23:20]     -- SIP/flowroute-0004b48f answered Local/91903421xxxx@default-73e4,2
[Aug 12 16:23:20]        > Channel Local/91903421xxxx@default-73e4,1 was answered.
[Aug 12 16:23:20]     -- Executing [8369@default:1] Playback("Local/91903421xxxx@default-73e4,1", "sip-silence") in new stack
[Aug 12 16:23:20]     -- <Local/91903421xxxx@default-73e4,1> Playing 'sip-silence' (language 'en')
[Aug 12 16:23:20] WARNING[4646]: file.c:1297 waitstream_core: Unexpected control subclass '-1'
[Aug 12 16:23:20]     -- Executing [8369@default:2] AGI("Local/91903421xxxx@default-73e4,1", "agi://127.0.0.1:4577/call_log") in new stack
[Aug 12 16:23:20]     -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Aug 12 16:23:20]     -- Executing [8369@default:3] AMD("Local/91903421xxxx@default-73e4,1", "2000|2000|1000|5000|120|50|4|256") in new stack
[Aug 12 16:23:20]     -- AMD: Local/91903421xxxx@default-73e4,1 PRIVATE (null) (Fmt: 64)
[Aug 12 16:23:20]     -- AMD: initialSilence [2000] greeting [2000] afterGreetingSilence [1000] totalAnalysisTime [5000] minimumWordLength [120] betweenWordsSilence [50] maximumNumberOfWords [4] silenceThreshold [256]
[Aug 12 16:23:20]     -- AMD: Changed state to STATE_IN_SILENCE
[Aug 12 16:23:22]   == Manager 'sendcron' logged off from 127.0.0.1
[Aug 12 16:23:22]     -- AMD: ANSWERING MACHINE: silenceDuration:2000 initialSilence:2000
[Aug 12 16:23:22]     -- Executing [8369@default:4] AGI("Local/91903421xxxx@default-73e4,1", "VD_amd.agi|8369") in new stack
[Aug 12 16:23:22]     -- Launched AGI Script /var/lib/asterisk/agi-bin/VD_amd.agi
[Aug 12 16:23:23]     -- AGI Script VD_amd.agi completed, returning 0
[Aug 12 16:23:23]     -- Executing [8369@default:5] AGI("Local/91903421xxxx@default-73e4,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
[Aug 12 16:23:23]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
[Aug 12 16:23:24]     -- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
[Aug 12 16:23:24]     -- Executing [8369@default:6] AGI("Local/91903421xxxx@default-73e4,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
[Aug 12 16:23:24]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
[Aug 12 16:23:25]     -- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
[Aug 12 16:23:25]     -- Executing [8369@default:7] Hangup("Local/91903421xxxx@default-73e4,1", "") in new stack
[Aug 12 16:23:25]   == Spawn extension (default, 8369, 7) exited non-zero on 'Local/919034214504@default-73e4,1'
[Aug 12 16:23:25]     -- Executing [h@default:1] DeadAGI("Local/91903421xxxx@default-73e4,1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Aug 12 16:23:26]     -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Aug 12 16:23:26]     -- Executing [h@default:1] DeadAGI("Local/919034214504@default-73e4,2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----16-----6") in new stack
[Aug 12 16:23:27]     -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----16-----6 completed, returning 0
[Aug 12 16:23:27]   == Spawn extension (default, 91903421xxxx, 1) exited non-zero on 'Local/91903421xxxx@default-73e4,2'

Re: Immediate Bye signal

PostPosted: Wed Aug 13, 2014 2:25 pm
by covarrubiasgg
As far as i remember, flowroute requites an specific prefix, may you post you dialplan entry for this carrier?

Also, immediate BYE usually happens to me for a NAT issue, double check you sip.conf and confirm that you externip and localnet values are O.K.

Re: Immediate Bye signal

PostPosted: Wed Aug 13, 2014 2:48 pm
by Iz3k34l
ok so i have done it with and without the prefix and have also included the externip and localnet, here are my setting

Code: Select all
[flowroute]
allow=ulaw
allow=g729
type=friend
secret=secret
username=user_id
host=sip.flowroute.com
dtmfmode=inband
rfc2833compensate=yes
context=trunkinbound
canreinvite=no
insecure=port,invite
fromdomain=sip.flowroute.com
externip=xx.xx.xx.xx
localnet=192.168.40.0/255.255.255.0
nat=yes



Code: Select all
exten => _91XXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXNXXXXXX,2,Dial(SIP/flowroute/user_id*${EXTEN:1},,To)
exten => _91XXXNXXXXXX,n,Hangup


Thanks again

Re: Immediate Bye signal

PostPosted: Wed Aug 27, 2014 4:27 pm
by Iz3k34l
So nobody else?

Found also that its not related to AMD, It does however hang up faster without the AMD process (about 6 seconds), also removed g729 and left only ulaw, so it disallows all then allows ulaws. Its not carrier, which i then checked the firewall setting even added the particular server IP to unlimit it access out, but it still drops after about 6 seconds.

Code: Select all
[Aug 27 16:22:57]   == Parsing '/etc/asterisk/manager.conf': [Aug 27 16:22:57] Found
[Aug 27 16:22:57]   == Manager 'sendcron' logged on from 127.0.0.1
[Aug 27 16:22:57]     -- Executing [91903421xxxx@default:1] AGI("Local/91903421xxxx@default-c435,2", "agi://127.0.0.1:4577/call_log") in new stack
[Aug 27 16:22:57]     -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Aug 27 16:22:57]     -- Executing [91903421xxxx@default:2] Dial("Local/91903421xxxx@default-c435,2", "SIP/intelepeer/1903421xxxx||To") in new stack
[Aug 27 16:22:57]     -- Called intelepeer/1903421xxxx
[Aug 27 16:22:59]     -- SIP/intelepeer-0000000c is making progress passing it to Local/91903421xxxx@default-c435,2
[Aug 27 16:23:01]   == Parsing '/etc/asterisk/manager.conf': [Aug 27 16:23:01] Found
[Aug 27 16:23:01]   == Manager 'sendcron' logged on from 127.0.0.1
[Aug 27 16:23:01]   == Manager 'sendcron' logged off from 127.0.0.1
[Aug 27 16:23:04]     -- SIP/intelepeer-0000000c answered Local/91903421xxxx@default-c435,2
[Aug 27 16:23:04]        > Channel Local/91903421xxxx@default-c435,1 was answered.
[Aug 27 16:23:04]     -- Executing [8368@default:1] Playback("Local/91903421xxxx@default-c435,1", "sip-silence") in new stack
[Aug 27 16:23:04]     -- <Local/91903421xxxx@default-c435,1> Playing 'sip-silence' (language 'en')
[Aug 27 16:23:04] WARNING[494]: file.c:1297 waitstream_core: Unexpected control subclass '-1'
[Aug 27 16:23:04]     -- Executing [8368@default:2] AGI("Local/91903421xxxx@default-c435,1", "agi://127.0.0.1:4577/call_log") in new stack
[Aug 27 16:23:04]     -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Aug 27 16:23:04]     -- Executing [8368@default:3] AGI("Local/91903421xxxx@default-c435,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
[Aug 27 16:23:04]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
[Aug 27 16:23:05]     -- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
[Aug 27 16:23:05]     -- Executing [8368@default:4] AGI("Local/91903421xxxx@default-c435,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
[Aug 27 16:23:05]     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
[Aug 27 16:23:06]   == Manager 'sendcron' logged off from 127.0.0.1
[Aug 27 16:23:06]     -- A[code][/code]GI Script agi-VDAD_ALL_outbound.agi completed, returning 0
[Aug 27 16:23:06]     -- Executing [8368@default:5] Hangup("Local/91903421xxxx@default-c435,1", "") in new stack
[Aug 27 16:23:06]   == Spawn extension (default, 8368, 5) exited non-zero on 'Local/91903421xxxx@default-c435,1'
[Aug 27 16:23:06]     -- Executing [h@default:1] DeadAGI("Local/91903421xxxx@default-c435,1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Aug 27 16:23:06]   == Parsing '/etc/asterisk/manager.conf': [Aug 27 16:23:06] Found
[Aug 27 16:23:06]   == Manager 'sendcron' logged on from 127.0.0.1
[Aug 27 16:23:06]   == Manager 'sendcron' logged off from 127.0.0.1
[Aug 27 16:23:07]     -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Aug 27 16:23:07]     -- Executing [h@default:1] DeadAGI("Local/91903421xxxx@default-c435,2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----10-----3") in new stack
[Aug 27 16:23:08]     -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----10-----3 completed, returning 0
[Aug 27 16:23:08]   == Spawn extension (default, 91903421xxxx, 2) exited non-zero on 'Local/91903421xxxx@default-c435,2'


EDIT*** i just noticed this;
Code: Select all
  WARNING[4194]: file.c:1297 waitstream_core: Unexpected control subclass '-1'

which in fact would 'i think' cause the system to think the call was NOT progressing as it should. Could this be a cause and if so, how can it be fixed?

Thanks

Re: Immediate Bye signal

PostPosted: Wed Aug 27, 2014 6:45 pm
by gardo
Have you tried another carrier for comparison?

Re: Immediate Bye signal

PostPosted: Thu Aug 28, 2014 12:18 am
by striker
try this dialplan

exten => _91XXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91XXXNXXXXXX,2,Dial(SIP/flowroute/user_id*${EXTEN:1},,Ttor)
exten => _91XXXNXXXXXX,n,Hangup

Re: Immediate Bye signal

PostPosted: Thu Aug 28, 2014 6:56 am
by Iz3k34l
Gardo,

Yes i have, same problem. All the carriers see a 'Bye' signal terminating the call right after its initiated.

Striker,

Thanks, but still the same thing

Re: Immediate Bye signal

PostPosted: Thu Aug 28, 2014 8:05 am
by geoff3dmg
Have you looked at your firewall/router. Does it have any 'features' for SIP/VoIP for example? As it might be interfering with your SIP traffic.

Re: Immediate Bye signal

PostPosted: Thu Aug 28, 2014 3:46 pm
by gardo
Is your server behind a firewall/router or does it have it's own public IP address?

Re: Immediate Bye signal

PostPosted: Fri Aug 29, 2014 7:56 am
by Iz3k34l
geofff3dmg,

we are already using intelepeer as our primary SIP provider and that connection works fine, it is however the other SIP connections that wont seem to work. I have tried setting up policy route on the firewall to allow direct outside traffic, thinking that was it but still nothing. But since there is already a policy that allows my server range of IP's direct access anyway it didnt help as i suspected.

Gardo,

Yes it is, No, the servers themselves dont have a public IP address, but the public IP they send from is static and is on the list of approved IP's the provider is expecting.

Re: Immediate Bye signal

PostPosted: Sat Aug 30, 2014 12:03 pm
by gardo
You need to adjust your SIP settings so that the SIP packets are sending the public IP address and not your private IP address.

Edit /etc/asterisk/sip.conf and check the following:

Code: Select all
;externip = 192.168.1.1        ; Address that we're going to put in outbound SIP
;externhost=test.test.com     ; Alternatively you can specify a domain
;externrefresh=10               ; How often to refresh externhost if
localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
localnet=10.0.0.0/255.0.0.0     ; Also RFC1918
localnet=172.16.0.0/12          ; Another RFC1918 with CIDR notation
localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
nat=yes


Uncomment "extenip" and replace it with your public IP address. Reload Asterisk when done.

Re: Immediate Bye signal

PostPosted: Sat Aug 30, 2014 6:49 pm
by Iz3k34l
Thank you Gardo, sip.conf is already set that way. I even tried to add that in the carrier section configuration, but sill nothing

Re: Immediate Bye signal

PostPosted: Mon Sep 01, 2014 11:57 pm
by striker
make sure you have opened rtp ports 10000 to 20000 in your router and isp side

Re: Immediate Bye signal

PostPosted: Thu Oct 09, 2014 4:30 pm
by Iz3k34l
UPDATE:
As with most providers they use IP address to restrict access, well in doing so they used what we ASSumed is our public facing IP address which is also the one set in the externip IP settings... WRONG...
i went back and ran
Code: Select all
curl -s icanhazip.com
and got the actual IP address, which in one instance was completely different. So then i was able to add that IP address to the list of accepted address and VIOLA!