Page 1 of 1

DID inbound Issue

PostPosted: Mon Nov 05, 2012 10:39 am
by ctc_olsen
Hi All, I've been reading the threads about this but I got nothing so far. I hope that you could help us out. We have this carrier and we use it both for outbound and inbound. Right now, outbound is working fine but inbound is not.

Here are the logs:
Code: Select all
<--- SIP read from 205.129.10.77:5061 --->
INVITE sip:5717652657@xx.xx.xx.xx:5060 SIP/2.0
h323-conf-id: 703643198-4010173098-2248988526-2873738829
Via: SIP/2.0/UDP 205.129.10.77:5061;branch=z9hG4bK-ebc37gah5gdoc27h;rport
From: <sip:+19492689100@205.129.10.77>;tag=dc6crvlmkm7374zo.o
Content-disposition: session
Expires: 300
User-Agent: Sippy
To: <sip:5717652657@xx.xx.xx.xx>
Contact: Anonymous <sip:205.129.10.77:5061>
CSeq: 586 INVITE
cisco-GUID: 703643198-4010173098-2248988526-2873738829
Max-Forwards: 70
Call-ID: CXC-469-8cac1f50-c9d5ed0-13c4-5097d58e-159256a1-c42e00b@208.94.157.10
Content-Length: 280
Content-Type: application/sdp

v=0
o=Sippy 72184400 0 IN IP4 205.129.10.77
s=SIP Media Capabilities
t=0 0
m=audio 31440 RTP/AVP 0 18 101
c=IN IP4 208.94.157.10
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=maxptime:30
a=sendrecv

<------------->
[Nov  5 10:04:47] --- (15 headers 13 lines) ---
[Nov  5 10:04:47] Sending to 205.129.10.77 : 5061 (NAT)
[Nov  5 10:04:47] Using INVITE request as basis request - CXC-469-8cac1f50-c9d5ed0-13c4-5097d58e-159256a1-c42e00b@208.94.157.10
[Nov  5 10:04:47] Found no matching peer or user for '205.129.10.77:5061'
[Nov  5 10:04:47] Found RTP audio format 0
[Nov  5 10:04:47] Found RTP audio format 18
[Nov  5 10:04:47] Found RTP audio format 101
[Nov  5 10:04:47] Found audio description format PCMU for ID 0
[Nov  5 10:04:47] Found audio description format G729 for ID 18
[Nov  5 10:04:47] Found audio description format telephone-event for ID 101
[Nov  5 10:04:47] Capabilities: us - 0x6 (gsm|ulaw), peer - audio=0x104 (ulaw|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
[Nov  5 10:04:47] Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
[Nov  5 10:04:47] Peer audio RTP is at port 208.94.157.10:31440
[Nov  5 10:04:47] Looking for 5717652657 in default (domain xx.xx.xx.xx)
[Nov  5 10:04:47]
<--- Reliably Transmitting (NAT) to 205.129.10.77:5061 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 205.129.10.77:5061;branch=z9hG4bK-ebc37gah5gdoc27h;received=205.129.10.77;rport=5061
From: <sip:+19492689100@205.129.10.77>;tag=dc6crvlmkm7374zo.o
To: <sip:5717652657@xx.xx.xx.xx>;tag=as0d1386a0
Call-ID: CXC-469-8cac1f50-c9d5ed0-13c4-5097d58e-159256a1-c42e00b@208.94.157.10
CSeq: 586 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


<------------>
[Nov  5 10:04:47] NOTICE[3801]: chan_sip.c:15147 handle_request_invite: Call from '' to extension '5717652657' rejected because extension not found.
[Nov  5 10:04:47] Scheduling destruction of SIP dialog 'CXC-469-8cac1f50-c9d5ed0-13c4-5097d58e-159256a1-c42e00b@208.94.157.10' in 32000 ms (Method: INVITE)
[Nov  5 10:04:47]
<--- SIP read from 205.129.10.77:5061 --->
ACK sip:5717652657@xx.xx.xx.xx:5060 SIP/2.0
Via: SIP/2.0/UDP 205.129.10.77:5061;rport;branch=z9hG4bK-ebc37gah5gdoc27h
From: <sip:+19492689100@205.129.10.77>;tag=dc6crvlmkm7374zo.o
User-Agent: Sippy
To: <sip:5717652657@xx.xx.xx.xx>;tag=as0d1386a0
CSeq: 586 ACK
Max-Forwards: 70
Call-ID: CXC-469-8cac1f50-c9d5ed0-13c4-5097d58e-159256a1-c42e00b@208.94.157.10
Content-Length: 0

SIP Debug:
<------------->
[Nov  5 10:04:47] --- (9 headers 0 lines) ---
[Nov  5 10:04:47]   == Parsing '/etc/asterisk/manager.conf': [Nov  5 10:04:47] Found
[Nov  5 10:04:47]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov  5 10:04:47]   == Spawn extension (default, 8600060, 1) exited non-zero on 'SIP/xxxxxxxxx-00001d0e'
[Nov  5 10:04:47]     -- Executing [h@default:1] DeadAGI("SIP/xxxxxxxx-00001d0e", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Nov  5 10:04:47] Really destroying SIP dialog 'CXC-469-8cac1f50-c9d5ed0-13c4-5097d58e-159256a1-c42e00b@208.94.157.10' Method: ACK
[Nov  5 10:04:47]   == Parsing '/etc/asterisk/manager.conf': [Nov  5 10:04:47] Found
[Nov  5 10:04:47]   == Manager 'sendcron' logged on from 127.0.0.1
[Nov  5 10:04:47]     -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------- completed, returning 0
[Nov  5 10:04:47] Scheduling destruction of SIP dialog '0ddd686078592a221deb7ea16e8b1fd7@xx.xx.xx.xx' in 7680 ms (Method: INVITE)
[Nov  5 10:04:47] set_destination: Parsing <sip:205.129.10.77:5060;transport=udp;lr> for address/port to send to
[Nov  5 10:04:47] set_destination: set destination to 205.129.10.77, port 5060
[Nov  5 10:04:47] Reliably Transmitting (NAT) to 205.129.10.77:5060:
BYE sip:205.129.10.77:5061 SIP/2.0
Via: SIP/2.0/UDP xx.xx.xx.xx:5060;branch=z9hG4bK2e2a86eb;rport
Route: <sip:205.129.10.77:5060;transport=udp;lr>
From: "V1105100339001288228" <sip:5408274383@xx.xx.xx.xx>;tag=as13c6f241
To: <sip:15017447934@205.129.10.77;cpd=on>;tag=iyotzxab6mfocm6g.i
Call-ID: 0ddd686078592a221deb7ea16e8b1fd7@xx.xx.xx.xx
CSeq: 103 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
Remote-Party-ID: "V1105100339001288228" <sip:5408274383@xx.xx.xx.xx>;privacy=off;screen=no
X-Asterisk-HangupCause: Unknown
X-Asterisk-HangupCauseCode: 0
Content-Length: 0


extensions.conf
Code: Select all
[trunkinbound]
; DID call routing process
exten => _5408274383,1,AGI(agi-DID_route.agi)
exten => _5717652657,1,AGI(agi-DID_route.agi)
exten => _5408274382,1,AGI(agi-DID_route.agi)
exten => s,1,AGI(agi-DID_route.agi)
exten => _X.,1,AGI(agi-DID_route.agi)

; FastAGI for VICIDIAL/astGUIclient call logging
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})


Carrier account entry
[iEtherSpeak]
disallow=all
allow=alaw
allow=ulaw
type=peer
host=205.129.10.77
dtmfmode=rfc2833
canreinvite=no
qualify=4000
context=trunkinbound


Dial Plan Entry:
exten => _981XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _981XXXXXXXXXX,2,Dial(${SIPTRUNKD}/${EXTEN:2},60,tTor)
exten => _981XXXXXXXXXX,3,Hangup


Image

Can someone point us to the right direction? Do we need to set any extra config at extensions.conf under trunkinbound?

Re: DID inbound Issue

PostPosted: Mon Nov 05, 2012 10:49 am
by williamconley
Found no matching peer or user for '205.129.10.77:5061'

You'll need to match this up. They are on port 5061 instead of 5060 which may or may not affect the ability to "match up". A common method is to set the default context to "trunkinbound" in sip.conf, but be careful as that can cause problems in other areas depending on your version and other configuration.

The goal is to either get '205.129.10.77:5061' to match the sip account (which has context=trunkinbound in it ...) or to modify the default behavior to go there for anyone who can get past your firewall while making a call.

It may be as simple as creating a second sip account with the port directive in it to match up ...

Your problem is that without a match, the call goes to default instead of trunkinbound and fails.

Re: DID inbound Issue

PostPosted: Mon Nov 05, 2012 11:32 am
by ctc_olsen
Wow!!!!!! Problem resolved in an instant! I spent the whole weekend looking for an answer for this. A million thanks for you William! :)

Re: DID inbound Issue

PostPosted: Mon Nov 05, 2012 6:30 pm
by williamconley
cool. now stay and help the next guy! 8-)

Re: DID inbound Issue

PostPosted: Wed Nov 07, 2012 11:55 pm
by broken850
If i call inside from Vicidial one number, will i be charged or not?
How can i see if this call is inbound or outbound?

Re: DID inbound Issue

PostPosted: Thu Nov 08, 2012 8:39 pm
by williamconley
broken850 wrote:If i call inside from Vicidial one number, will i be charged or not?
How can i see if this call is inbound or outbound?

Yes. You will be charged.

If you call, it was outbound.

If it is an agent who received or called... the real time status will show A (automated outbound) or M (manual dial outbound) or I (Inbound) next to each agent's status.