Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: Franco on October 03, 2008, 05:19:08 AM

Title: strip a digit from caller ID
Post by: Franco on October 03, 2008, 05:19:08 AM
Hi,
I'm having a problem with caller ID and different trunk types, if the call comes in via a voip trunk it displays 10 digits, but if it comes via zap it displays 11 digits. They add a '1' in front of the digit.
I found this thread that seem to do the trick, but how can I apply it only to a zap trunk:
http://www.experts-exchange.com/Networking/Telecommunications/IP_Telephony/Asterisk_/Q_23716274.html

Thanks,
Title: Re: strip a digit from caller ID
Post by: SARK devs on October 03, 2008, 08:18:27 AM
Before I answer this....

Why is the "1" which the zap carrier adds causing you a problem?

Kind Regards
Title: Re: strip a digit from caller ID
Post by: Franco on October 03, 2008, 02:18:01 PM
Good question! :)
I have an old Tivo device and I implemented this feature: http://www.bah.org/~greg/tivo/
If it comes with the extra digit then the application (which must have been compiled to handle 10 digits only) does not display the Caller ID.
Works fine via the voip carrier.


Thanks,
Title: Re: strip a digit from caller ID
Post by: SARK devs on October 03, 2008, 09:11:20 PM
You'll have to hack it in a custom app and then either do the dial yourself (in the app), or pass control back to SAIL ....

Code: [Select]
my custom app..
...
...
...
end of my custom app - give control back to SAIL

... exten => _X.,1,agi(selintra,Inbound,${EXTEN})

Best

S
Title: Re: strip a digit from caller ID
Post by: madadam on February 04, 2009, 03:43:57 PM
I want to do something similar in that I want to manipulate the Caller ID Name field to show the department the caller has rung. I have a number of different telephone numbers coming in and a small number of actual phones which serve multiple uses, ie. a phone could be phone tech support or sales so the person answering needs to know what number was rung, or at least what dept.

The way I have done this in the past is to overwrite the Caller ID name field as it is rarely supported or used so that their phone will display first the department required and then the caller's number, ie. SALES: 1234 5678

I cannot get this to work with SAIL. I have tried using the tags in the Trunk definitions but it only seems to append the text and if the caller is unknown it won't seem to do it at all.

So I have written a small custom app which is where the calls go first and it manipulates the Caller ID Name field but I must be making a dumb mistake, at the end it just tells me the extension is unavailble and quotes the telephone number not the extension number. How do I pass it back?

This is what I have:
Code: [Select]
[macro-CallerName]
; ARG1 = Caller ID Name to display on phone
exten => s,1,Set(BLOCKED=$[${CALLINGPRES} / 32])
exten => s,2,GotoIf($["${CALLERIDNUM}" = ""]?4:6)
exten => s,3,GotoIf($[${BLOCKED} = 0]?6)
exten => s,4,SetCallerPres(allowed)
exten => s,5,Set(CALLERID(number)=private)
exten => s,6,Set(CALLERID(name)=${ARG1})

[inSales]
; exten => s,1,Wait(1)
exten => s,1,Macro(CallerName, 'SALES:') ; Set caller display information
exten => s,2,agi(selintra,Inbound,${EXTEN})

Title: Re: strip a digit from caller ID
Post by: SARK devs on February 04, 2009, 03:51:32 PM
Maybe better to wait until we fix the bug in Tags which we created in 701...

TAGS should fill CLID (name) but right now it isn't working correctly.

Best

S

Title: Re: strip a digit from caller ID
Post by: madadam on February 04, 2009, 03:56:46 PM
Bloody hell that was a fast response!

Thank you for your quick reply.

Any idea on when you think you will have the next release ready? I should have mentioned that I was using 713.

Though even when it was working before it didn't seem to fully work, ie. when a caller's number was private it would sho up on our phones as "Unknown Unknown" and the tag wasn't appended at all, only when there was a number present. Is this something perhaps that I stuffed up?

Adam
Title: Re: strip a digit from caller ID
Post by: SARK devs on February 04, 2009, 04:00:05 PM
No you didn't stuff it up, but it doesn't quite work the way Digium would have you believe.  Unfortunately we can't really advise you because we  are using C to load it and it works differently again.

:(

Best

S
Title: Re: strip a digit from caller ID
Post by: SARK devs on February 04, 2009, 10:13:02 PM
-714 fixes your CLIP & TAG woes - its up on the download server now.


Kind Regards

S
Title: Re: strip a digit from caller ID
Post by: madadam on February 05, 2009, 02:04:59 AM
Fantastic - that really was fast!

The tag is now coming up in the Caller ID Name field, so incoming calls look like this: "SALES: 1234 5678"

It's good to have this working properly. BUT it still doesn't work when the caller is private, all that comes up is "Unknown Unknown". Is there a way we can fix this rather large problem. It's a large problem because here in Australia many businesses (annoyingly) hide their Caller ID, so when some of my clients and suppliers ring I don't know what line they rang on all I know is that my Snom phone screen says "Unknown Unknown" - really helpful!!!!!

Many thanks,

Adam
Title: Re: strip a digit from caller ID
Post by: madadam on February 05, 2009, 02:39:46 AM

I was Googling this problem and it seems quite common. Someone suggested the use of the SetCallerPres command:
http://www.voip-info.org/wiki-Asterisk%20cmd%20SetCallerPres (http://www.voip-info.org/wiki-Asterisk%20cmd%20SetCallerPres)

Any thoughts/comments about this?

Cheers,

Adam

Title: Re: strip a digit from caller ID
Post by: SARK devs on February 06, 2009, 11:34:58 PM
Quote
Any thoughts/comments about this?

Yes - it explains something we didn't fully understand... nice work mate.

Back shortly on this issue.

Kind Regards

S
Title: Re: strip a digit from caller ID
Post by: SARK devs on February 07, 2009, 12:57:16 AM
OK Adam... We have a patch for you to try

log onto your linux box and do the following....

Code: [Select]
cd /var/lib/asterisk/agi-bin
mv selintra selintra_save
wget http://aelintra.com/selintra
chmod +x selintra


Now...

Restart asterisk and run your tests again.  Then let us know what happend.
If anything major goes bang, then simply move the selintra_save back to selintra to regress.


Kind Regards

S
Title: Re: strip a digit from caller ID
Post by: madadam on February 07, 2009, 04:32:16 AM
YAY!!!!!

It seems to work. I will watch it over the next week and get back to you.

Well done guys - just fantastic!

Adam