1

The scenario

  • In the UK.
  • I have one (BT openreach) phone line coming into a Cisco SPA232D. That phone line is ringable on a number, let's say 01235AAAAAA.
  • I have a virtual number, 01235BBBBBB, which is redirected to that line. When people dial this number they are redirected to my phone line. Their caller ID is preserved and I can tell who is calling.
  • The line is connected to a SPA232D which does PSTN to VoIP fine and passes the call on to my FreePBX/Asterisk server.

The requirement

I would like to differentiate how I handle calls depending on whether the caller rang A or B. How do I configure the SPA232 to pass this information to Asterisk/FrePbX so that it can handle the calls differently.

The information

The dialplan on the SPA for PSTN to VoIP is:

(S0:@192.168.1.XXX)

The first few lines of the asterisk log for an incoming call, whether it has come to the line direct or via the redirect, is:

VERBOSE[1496][C-000000f7] netsock2.c: == Using SIP RTP TOS bits 184
VERBOSE[1496][C-000000f7] netsock2.c: == Using SIP RTP CoS mark 5
VERBOSE[12405][C-000000f7] pbx.c: -- Executing [+441235AAAAAA@from-trunk-sip-landline:1] Set("SIP/landline-00000226", "GROUP()=OUT_2") in new stack
VERBOSE[12405][C-000000f7] pbx.c: -- Executing [+441235AAAAAA@from-trunk-sip-landline:2] Goto("SIP/landline-00000226", "from-trunk,+441235AAAAAA,1") in new stack
VERBOSE[12405][C-000000f7] pbx.c: -- Goto (from-trunk,+441235AAAAAA,1)
VERBOSE[12405][C-000000f7] pbx.c: -- Executing [+441235AAAAAA@from-trunk:1] Set("SIP/landline-00000226", "__FROM_DID=+441235AAAAAA") in new stack

Looking at that, whether the call is direct to my line or has come via the forwarding service, by the time it gets to asterisk it has the same DID: that of the landline.

  • Do you have redirection from B to A on the ISP side? If so, how do you think a call to B will differ from a call to A for your SPA232? It doesn't have any information about whether this call was redirected from B or somebody just picked up an office phone and dialed A. And both calls look like a regular incoming call. If your provider doesn't support any kind of signalisation that you can use (like put something into CALLERID, and they most likely not) you cannot say exactly where it comes from. – Misha Slyusarev Apr 27 '15 at 18:27
  • @MishaSlyusarev There's no ISP involved - there is the telco who provide me line A and separate call company who provide with line B, which is redirected. The 'caller id' protocol allows for a number of fields (eg it differentiates between the calling number and caller id to allow for the difference between a number and an identity, eg name). I suspect (but can't prove yet) that it also allows for dialled number versus number the call arrived to allow the distinction between callers intent and who it got to. So my question is about how to achieve that second issue in a particular situation. – Neil Townsend Apr 28 '15 at 06:32
  • Yes, and my doubt was that this telco doesn't provide any information in caller id. Because this is a call to landline and an end user won't be able to see this information from a PSTN phone, and they don't need to. So why'd the telco bother to? – Misha Slyusarev Apr 28 '15 at 14:30
  • @MishaSlyusarev Agreed, the forwarding company don't have to. But as they serve a number of businesses, and it won't cost them to, why wouldn't they. The question still stands: if the information was there, how would I get it? – Neil Townsend Apr 28 '15 at 15:24
  • Did you finally have success? I am having trouble with a similar setup. – Synox Sep 27 '15 at 18:53
  • @Synox Afraid I haven't solved this one yet! I have found it hard to determine whether the information is arriving at the SPA232, so therefore hard to know how to make it pass it on. What progress have you made? – Neil Townsend Sep 28 '15 at 06:44
  • It turned out it I had a configuration problem. I used the wrong Caller-ID standard for Line1. – Synox Oct 27 '15 at 08:49
  • What Caller-ID standard did you settle on? – Neil Townsend Oct 27 '15 at 16:57

0 Answers0