Hi,
We are having a strange issue with inbound calls and destination.... let me paint the picture.
If I dial in from my cellphone for example... the desk phone with the LCD display shows my correct cellphone number (line 1), but under that, it shows some others tenants DID. (line 2 = destination)
It seems that on some double line LCD phones - it shows incoming call ID on line 1 and destination "account" (or DID) on line two.
For us - 2nd line on the phones LCD always shows the number of another tenant. Doesn’t matter who you dial - also happens if you dial internally (on their full DID's).
So if Tennant 1 calls tenant 2 then the screen on the LCD of the phone show:
Tennant Name <- line 1 - Correct Tennant
XXXXXX <- line 2 - some other tenant (destination), usually the last tenant that we add.
Then if i call from a cellphone is shows:
+2783XXXXXX <- line 1 - the correct incoming callerID
XXXXXX <- line 2 - some other tenant (destination), usually the last tenant that we add.
Of course what makes it all so strange is that all the CDR and ivr's, call flow etc etc all works 100% correctly. So its reaching the correct tennant (destination) when you dial in. just displays it wrong to the phone devices.
Last point... For testing i have another trunk with another voip provider. When call come from these other guys, it works correctly. (We are using a2billing to trunk the calls into thridlane)
Any ideas?
howzit Erik! Well im using a
howzit Erik!
Well im using a Snom 300 - so there is quite a bit visible to me at the web interface. Take this for example:
=========================================
Received from udp:41.221.5.107:5060 at 9/11/2010 16:03:42:777 (566 bytes):
OPTIONS sip:100-Euphoria@192.168.1.104:2048;line=k4xj0ji5 SIP/2.0
Via: SIP/2.0/UDP 41.221.5.107:5060;branch=z9hG4bK6608ab25;rport
Max-Forwards: 70
From: "unknown" ;tag=as5da0d6d5
To:
Contact:
Call-ID: 188c5ca956302c78094be36b74fbdabb@41.221.5.107
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.0.6
Date: Tue, 09 Nov 2010 14:05:00 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Length: 0
Sent to udp:41.221.5.107:5060 at 9/11/2010 16:03:42:785 (626 bytes):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 41.221.5.107:5060;branch=z9hG4bK6608ab25;rport=5060
From: "unknown" ;tag=as5da0d6d5
To:
Call-ID: 188c5ca956302c78094be36b74fbdabb@41.221.5.107
CSeq: 102 OPTIONS
Contact: ;reg-id=1
User-Agent: snom300/7.3.30
Accept-Language: en
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Content-Length: 0
==================================================
Now the interesting part is that at the same time i get this in CLI:
==================================================
-- Executing [27879434870@from-outside:1] Wait("SIP/27212000451-0a04e2c0", "1") in new stack
-- Executing ...blah blah blah
.... It goes on refering to this call as "SIP/27212000451..." <--- this account/did/context has nothing to do with this tennant.
==================================================
Could it be something to do with the way the call is getting TO the box, no so much with the ways it handled FROM the box to the phone? It just seem like by the time Thridlane has the call its already confused the incoming call ID and the NAME.
I created an extension quick
I created an extension quick and placed a call to it... this is what Wireshark shows:
INVITE sip:105-Euphoria@196.210.129.104:62749;rinstance=42e417889ba11e12 SIP/2.0
Via: SIP/2.0/UDP 41.221.5.107:5060;branch=z9hG4bK1222b223;rport
Max-Forwards: 70
From: "+27837977605" sip:27212000451@41.221.5.107 ;tag=as6f1f9779 <- WRONG!!
To: sip:105-Euphoria@196.210.129.104:62749;rinstance=42e417889ba11e12
Contact: sip:27212000451@41.221.5.107 <- WRONG!!
Call-ID: 63f1541b26b03f72398044247805f9fe@41.221.5.107
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.6
Date: Tue, 09 Nov 2010 15:31:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 307
v=0
o=root 531017138 531017138 IN IP4 41.221.5.107
s=Asterisk PBX 1.6.0.6
c=IN IP4 41.221.5.107
t=0 0
m=audio 11678 RTP/AVP 18 3 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
On the a2billing side, it does seem to be passing the call along fine tho?
-- AGI Script Executing Application: (DIAL) Options: (SIP/27879434870|60|HiL(3600000:61000:30000))
OK do a sip capture with
OK do a sip capture with wireshark for both the traffic going to the phone (just like you did) and for the same call also capture the traffic from the carrier to the MTE box. This will let you know if this from header is corrupt all the way from the source.
I think your problem is in sip.conf you aren't using a sip router like opensips, openser, kamillio are you?
I think your problem is in
I think your problem is in sip.conf you aren't using a sip router like opensips, openser, kamillio are you?
No, but im using a2billing (box 1) to "pick up" the call from my voip provider, then fowarding them onto Thirdlane (box 2), in a kind of call forward manner rather than a proxy.
Here is the CLI dump of an incoming call being directed to my extention. I find this interesting "__INCOMINGCLI=27212000451"
==================================================
-- Executing [27879434870@from-outside:1] Wait("SIP/27212000451-09d4aab0", "1") in new stack
-- Executing [27879434870@from-outside:2] Set("SIP/27212000451-09d4aab0", "__INCOMINGCLI=27212000451") in new stack
-- Executing [27879434870@from-outside:3] Goto("SIP/27212000451-09d4aab0", "from-outside-redir,27879434870,1") in new stack
-- Goto (from-outside-redir,27879434870,1)
-- Executing [27879434870@from-outside-redir:1] Set("SIP/27212000451-09d4aab0", "DIALED_PUBLIC_NUMBER=27879434870") in new stack
-- Executing [27879434870@from-outside-redir:2] Set("SIP/27212000451-09d4aab0", "DIALED_NUMBER=27879434870") in new stack
-- Executing [27879434870@from-outside-redir:3] Set("SIP/27212000451-09d4aab0", "status=1") in new stack
-- Executing [27879434870@from-outside-redir:4] GotoIf("SIP/27212000451-09d4aab0", "1?7") in new stack
-- Goto (from-outside-redir,27879434870,7)
-- Executing [27879434870@from-outside-redir:7] GotoIfTime("SIP/27212000451-09d4aab0", "*,*,*,*?from-outside-27879434870-tl-allhours-Euphoria,27879434870,1") in new stack
-- Goto (from-outside-27879434870-tl-allhours-Euphoria,27879434870,1)
-- Executing [27879434870@from-outside-27879434870-tl-allhours-Euphoria:1] Set("SIP/27212000451-09d4aab0", "__tenant=Euphoria") in new stack
-- Executing [27879434870@from-outside-27879434870-tl-allhours-Euphoria:2] Set("SIP/27212000451-09d4aab0", "CDR(userfield)=Euphoria") in new stack
-- Executing [27879434870@from-outside-27879434870-tl-allhours-Euphoria:3] Set("SIP/27212000451-09d4aab0", "MOH=default-Euphoria") in new stack
-- Executing [27879434870@from-outside-27879434870-tl-allhours-Euphoria:4] GotoIf("SIP/27212000451-09d4aab0", "0?nomoh") in new stack
-- Executing [27879434870@from-outside-27879434870-tl-allhours-Euphoria:5] Set("SIP/27212000451-09d4aab0", "CHANNEL(musicclass)=default-Euphoria") in new stack
-- Executing [27879434870@from-outside-27879434870-tl-allhours-Euphoria:6] Macro("SIP/27212000451-09d4aab0", "tl-goto-userextension,105,") in new stack
-- Executing [s@macro-tl-goto-userextension:1] Set("SIP/27212000451-09d4aab0", "CALLERID(name)=+27837977605") in new stack
-- Executing [s@macro-tl-goto-userextension:2] Goto("SIP/27212000451-09d4aab0", "local-extensions-Euphoria,105,1") in new stack
-- Goto (local-extensions-Euphoria,105,1)
== Channel 'SIP/27212000451-09d4aab0' jumping out of macro 'tl-goto-userextension'
-- Executing [105@local-extensions-Euphoria:1] Macro("SIP/27212000451-09d4aab0", "tl-stdexten,SIP/105-Euphoria,105@default-Euphoria,") in new stack
-- Executing [s@macro-tl-stdexten:1] Set("SIP/27212000451-09d4aab0", "__DIALED_NUMBER=105") in new stack
-- Executing [s@macro-tl-stdexten:2] Set("SIP/27212000451-09d4aab0", "__PICKUPMARK=105-Euphoria") in new stack
-- Executing [s@macro-tl-stdexten:3] ExecIf("SIP/27212000451-09d4aab0", "0?SIPAddHeader(Alert-Info: <>)") in new stack
-- Executing [s@macro-tl-stdexten:4] GotoIf("SIP/27212000451-09d4aab0", "0?doingringgroup") in new stack
-- Executing [s@macro-tl-stdexten:5] Macro("SIP/27212000451-09d4aab0", "tl-userexten-base,SIP/105-Euphoria,105@default-Euphoria,") in new stack
-- Executing [s@macro-tl-userexten-base:1] GotoIf("SIP/27212000451-09d4aab0", "1?set_options") in new stack
-- Goto (macro-tl-userexten-base,s,8)
-- Executing [s@macro-tl-userexten-base:8] Set("SIP/27212000451-09d4aab0", "OPTIONS=rtT") in new stack
-- Executing [s@macro-tl-userexten-base:9] Set("SIP/27212000451-09d4aab0", "__PHONE=SIP/105-Euphoria") in new stack
-- Executing [s@macro-tl-userexten-base:10] Set("SIP/27212000451-09d4aab0", "__VM_MBOX=105@default-Euphoria") in new stack
-- Executing [s@macro-tl-userexten-base:11] Set("SIP/27212000451-09d4aab0", "THISEXT=TL/Euphoria-105") in new stack
-- Executing [s@macro-tl-userexten-base:12] Set("SIP/27212000451-09d4aab0", "DB(TL/Euphoria-105/lastcallerid)=27212000451") in new stack
-- Executing [s@macro-tl-userexten-base:13] Set("SIP/27212000451-09d4aab0", "_CLIMYID=Euphoria-105") in new stack
-- Executing [s@macro-tl-userexten-base:14] Set("SIP/27212000451-09d4aab0", "THISCHAN=TL/105-Euphoria") in new stack
-- Executing [s@macro-tl-userexten-base:15] GotoIf("SIP/27212000451-09d4aab0", "0?beenhere") in new stack
-- Executing [s@macro-tl-userexten-base:16] Set("SIP/27212000451-09d4aab0", "_ORIG_EXTEN=105") in new stack
-- Executing [s@macro-tl-userexten-base:17] Set("SIP/27212000451-09d4aab0", "_ORIG_EXTEN_USER=TL/Euphoria-105") in new stack
-- Executing [s@macro-tl-userexten-base:18] Macro("SIP/27212000451-09d4aab0", "tl-notify") in new stack
-- Executing [s@macro-tl-notify:1] Set("SIP/27212000451-09d4aab0", "ADDRESS=") in new stack
-- Executing [s@macro-tl-notify:2] UserEvent("SIP/27212000451-09d4aab0", "TlNotify|dialed: 105|callerID: 27212000451|tenant: Euphoria") in new stack
-- Executing [s@macro-tl-notify:3] NoOp("SIP/27212000451-09d4aab0", "TL/Euphoria-105") in new stack
-- Executing [s@macro-tl-notify:4] GotoIf("SIP/27212000451-09d4aab0", "1?s-exit,1") in new stack
-- Goto (macro-tl-notify,s-exit,1)
-- Executing [s-exit@macro-tl-notify:1] MacroExit("SIP/27212000451-09d4aab0", "") in new stack
-- Executing [s@macro-tl-userexten-base:19] Goto("SIP/27212000451-09d4aab0", "checkformat") in new stack
-- Goto (macro-tl-userexten-base,s,21)
-- Executing [s@macro-tl-userexten-base:21] GotoIf("SIP/27212000451-09d4aab0", "1?cont1") in new stack
-- Goto (macro-tl-userexten-base,s,23)
-- Executing [s@macro-tl-userexten-base:23] Set("SIP/27212000451-09d4aab0", "RECORD_CALLEE=") in new stack
-- Executing [s@macro-tl-userexten-base:24] Macro("SIP/27212000451-09d4aab0", "tl-set-myvariables") in new stack
-- Executing [s@macro-tl-set-myvariables:1] Set("SIP/27212000451-09d4aab0", "MY_CHAN=27212000451-09d4aab0") in new stack
-- Executing [s@macro-tl-set-myvariables:2] NoOp("SIP/27212000451-09d4aab0", "THECHANNEL=SIP/27212000451-09d4aab0") in new stack
-- Executing [s@macro-tl-set-myvariables:3] Set("SIP/27212000451-09d4aab0", "zap=0") in new stack
-- Executing [s@macro-tl-set-myvariables:4] GotoIf("SIP/27212000451-09d4aab0", "1?usechannel") in new stack
-- Goto (macro-tl-set-myvariables,s,9)
-- Executing [s@macro-tl-set-myvariables:9] Set("SIP/27212000451-09d4aab0", "local=0") in new stack
-- Executing [s@macro-tl-set-myvariables:10] GotoIf("SIP/27212000451-09d4aab0", "1?useit") in new stack
-- Goto (macro-tl-set-myvariables,s,12)
-- Executing [s@macro-tl-set-myvariables:12] Set("SIP/27212000451-09d4aab0", "__MYEXTENSION=27212000451") in new stack
-- Executing [s@macro-tl-set-myvariables:13] Set("SIP/27212000451-09d4aab0", "__MYID=Euphoria-27212000451") in new stack
-- Executing [s@macro-tl-userexten-base:25] Set("SIP/27212000451-09d4aab0", "RECORD_CALLER=") in new stack
-- Executing [s@macro-tl-userexten-base:26] Set("SIP/27212000451-09d4aab0", "VM=1") in new stack
-- Executing [s@macro-tl-userexten-base:27] Set("SIP/27212000451-09d4aab0", "VMT0=") in new stack
-- Executing [s@macro-tl-userexten-base:28] Set("SIP/27212000451-09d4aab0", "CFNAEXT=") in new stack
-- Executing [s@macro-tl-userexten-base:29] Set("SIP/27212000451-09d4aab0", "CFNAAN=") in new stack
-- Executing [s@macro-tl-userexten-base:30] GotoIf("SIP/27212000451-09d4aab0", "1?done_checkrecord") in new stack
-- Goto (macro-tl-userexten-base,s,48)
-- Executing [s@macro-tl-userexten-base:48] NoOp("SIP/27212000451-09d4aab0", "") in new stack
-- Executing [s@macro-tl-userexten-base:49] NoOp("SIP/27212000451-09d4aab0", "RECORD_CALLEE=") in new stack
-- Executing [s@macro-tl-userexten-base:50] NoOp("SIP/27212000451-09d4aab0", "RECORD_CALLER=") in new stack
-- Executing [s@macro-tl-userexten-base:51] NoOp("SIP/27212000451-09d4aab0", "OPTIONS=rtT") in new stack
-- Executing [s@macro-tl-userexten-base:52] NoOp("SIP/27212000451-09d4aab0", "TOUCH_MONITOR=") in new stack
-- Executing [s@macro-tl-userexten-base:53] GotoIf("SIP/27212000451-09d4aab0", "0?next1") in new stack
-- Executing [s@macro-tl-userexten-base:54] Set("SIP/27212000451-09d4aab0", "TIMEOUT=") in new stack
-- Executing [s@macro-tl-userexten-base:55] GotoIf("SIP/27212000451-09d4aab0", "0?next1") in new stack
-- Executing [s@macro-tl-userexten-base:56] Set("SIP/27212000451-09d4aab0", "TIMEOUT=20") in new stack
-- Executing [s@macro-tl-userexten-base:57] Set("SIP/27212000451-09d4aab0", "CDR(userfield)=Euphoria") in new stack
-- Executing [s@macro-tl-userexten-base:58] Set("SIP/27212000451-09d4aab0", "SCREEN=") in new stack
-- Executing [s@macro-tl-userexten-base:59] Set("SIP/27212000451-09d4aab0", "CONFIRM=") in new stack
-- Executing [s@macro-tl-userexten-base:60] GotoIf("SIP/27212000451-09d4aab0", "1?getblock") in new stack
-- Goto (macro-tl-userexten-base,s,65)
-- Executing [s@macro-tl-userexten-base:65] Set("SIP/27212000451-09d4aab0", "BLOCK=") in new stack
-- Executing [s@macro-tl-userexten-base:66] GotoIf("SIP/27212000451-09d4aab0", "1?getrecord") in new stack
-- Goto (macro-tl-userexten-base,s,70)
-- Executing [s@macro-tl-userexten-base:70] Set("SIP/27212000451-09d4aab0", "RECORD=") in new stack
-- Executing [s@macro-tl-userexten-base:71] NoOp("SIP/27212000451-09d4aab0", "calleridnum=27212000451 ") in new stack
-- Executing [s@macro-tl-userexten-base:72] GotoIf("SIP/27212000451-09d4aab0", "1?screening") in new stack
-- Goto (macro-tl-userexten-base,s,104)
-- Executing [s@macro-tl-userexten-base:104] GotoIf("SIP/27212000451-09d4aab0", "1?recording") in new stack
-- Goto (macro-tl-userexten-base,s,130)
-- Executing [s@macro-tl-userexten-base:130] GotoIf("SIP/27212000451-09d4aab0", "1?forwarding") in new stack
-- Goto (macro-tl-userexten-base,s,132)
-- Executing [s@macro-tl-userexten-base:132] Set("SIP/27212000451-09d4aab0", "FORWARD=") in new stack
-- Executing [s@macro-tl-userexten-base:133] GotoIf("SIP/27212000451-09d4aab0", "1?followmecheck") in new stack
-- Goto (macro-tl-userexten-base,s,140)
-- Executing [s@macro-tl-userexten-base:140] Set("SIP/27212000451-09d4aab0", "FORWARD=") in new stack
-- Executing [s@macro-tl-userexten-base:141] Set("SIP/27212000451-09d4aab0", "__FOLLOWME=0") in new stack
-- Executing [s@macro-tl-userexten-base:142] GotoIf("SIP/27212000451-09d4aab0", "1?checkchannel") in new stack
-- Goto (macro-tl-userexten-base,s,154)
-- Executing [s@macro-tl-userexten-base:154] ChanIsAvail("SIP/27212000451-09d4aab0", "SIP/105-Euphoria") in new stack
== Using SIP RTP CoS mark 5
== Using SIP VRTP CoS mark 6
== Using UDPTL CoS mark 5
-- Executing [s@macro-tl-userexten-base:155] GotoIf("SIP/27212000451-09d4aab0", "1?chanavail") in new stack
-- Goto (macro-tl-userexten-base,s,157)
-- Executing [s@macro-tl-userexten-base:157] GotoIf("SIP/27212000451-09d4aab0", "1?dial") in new stack
-- Goto (macro-tl-userexten-base,s,163)
-- Executing [s@macro-tl-userexten-base:163] Dial("SIP/27212000451-09d4aab0", "SIP/105-Euphoria,20,rtT") in new stack
== Using SIP RTP CoS mark 5
== Using SIP VRTP CoS mark 6
== Using UDPTL CoS mark 5
-- Called 105-Euphoria
-- SIP/105-Euphoria-0a115208 is ringing
-- Got SIP response 480 "Temporarily Unavailable" back from 196.210.129.104
-- SIP/105-Euphoria-0a115208 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-tl-userexten-base:164] Goto("SIP/27212000451-09d4aab0", "s-orig-CONGESTION,1") in new stack
-- Goto (macro-tl-userexten-base,s-orig-CONGESTION,1)
-- Executing [s-orig-CONGESTION@macro-tl-userexten-base:1] Goto("SIP/27212000451-09d4aab0", "s-NA,1") in new stack
-- Goto (macro-tl-userexten-base,s-NA,1)
-- Executing [s-NA@macro-tl-userexten-base:1] GotoIf("SIP/27212000451-09d4aab0", "0?s-exit,1") in new stack
-- Executing [s-NA@macro-tl-userexten-base:2] GotoIf("SIP/27212000451-09d4aab0", "1?s-NA-VOICEMAIL,1") in new stack
-- Goto (macro-tl-userexten-base,s-NA-VOICEMAIL,1)
-- Executing [s-NA-VOICEMAIL@macro-tl-userexten-base:1] Answer("SIP/27212000451-09d4aab0", "") in new stack
-- Executing [s-NA-VOICEMAIL@macro-tl-userexten-base:2] GotoIf("SIP/27212000451-09d4aab0", "0?ringing") in new stack
-- Executing [s-NA-VOICEMAIL@macro-tl-userexten-base:3] GotoIf("SIP/27212000451-09d4aab0", "0?ringing") in new stack
-- Executing [s-NA-VOICEMAIL@macro-tl-userexten-base:4] VoiceMail("SIP/27212000451-09d4aab0", "105@default-Euphoria,u") in new stack
-- Playing 'vm-theperson.gsm' (language 'en')
-- Playing 'digits/1.gsm' (language 'en')
-- Playing 'digits/0.gsm' (language 'en')
-- Playing 'digits/5.gsm' (language 'en')
== Spawn extension (macro-tl-userexten-base, s-NA-VOICEMAIL, 4) exited non-zero on 'SIP/27212000451-09d4aab0' in macro 'tl-userexten-base'
== Spawn extension (macro-tl-stdexten, s, 5) exited non-zero on 'SIP/27212000451-09d4aab0' in macro 'tl-stdexten'
== Spawn extension (local-extensions-Euphoria, 105, 1) exited non-zero on 'SIP/27212000451-09d4aab0'
Thanks for your help with
Thanks for your help with this Erik, ill have to book this in with the support guys. It’s just become super critical... just to let you know - it appears that the "fake" incoming caller ID is actually recoding in all the CDR's and we have just had a client freak out at us. I’ll just have to pay to get this one fix i don’t have the time to mess around on this one.
Tenant Caller ID Source Destination Call Date Secs Account Code Disposition
===================================================
Euphoria "+27837977605" <27212000451> 27212000451 105 2010-11-09 18:33:20 3 NO ANSWER
Im not sure how we missed this one.
it sounds like A2billing
it sounds like A2billing might be rewriting your callerid, or the sip trunk you set up for a2billing has a callerid set on it (trunks should never have a callerid value as it re-writes callerid)
Phew... crisis over... and
Phew... crisis over... and yes your last post helped us figure it out. "...or the sip trunk you set up for a2billing has a callerid set on it (trunks should never have a callerid value as it re-writes callerid)"
My trunks to a2billing had callerid! took them off and it was fine.
Thanks for your help Erik
you should use wireshark and do a sip capture to see whats in the sip packet being sent to the phone.