Need help truncating inbound ani to the last 10 digits sent

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Need help truncating inbound ani to the last 10 digits sent

Postby ianteller » Wed Jul 23, 2014 1:49 am

Hello all. I am transferring from on vici system to another via sip. I need some help stripping the sip trunk info off of the caller id.

Best case would be to remove everything except the last 10 digits. Below is the inbound context I tried.

[inbound01]
exten => _X.,1,Set(CALLERID(num)=${CALLERID(num)-10})
exten => _X.,2,AGI(agi-DID_route.agi)
exten => _X.,n,Hangup()
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

Thanks to anyone who can help!
Ian
Two separate 3 server Vicidial systems with 2 Quad Core Xenon Processors (3.0 GHz & 32 GB ram)
ViciBox5.x86_64-5.0.3.iso cluster install |3 servers DB/WEB/TEL| VICIDIAL VERSION: 2.8-439a BUILD: 140515-1610 | Asterisk 2.8b0.5 | SVN: 2115
ianteller
 
Posts: 9
Joined: Thu Jun 05, 2014 11:25 pm

Re: Need help truncating inbound ani to the last 10 digits s

Postby striker » Wed Jul 23, 2014 2:56 am

i think you missed ":" as show below

exten => _X.,1,Set(CALLERID(num)=${CALLERID(num):-10})
www.striker24x7.com www.youtube.com/c/striker24x7 Telegram/skype id : striker24x7
striker
 
Posts: 962
Joined: Sun Jun 06, 2010 10:25 am

Re: Need help truncating inbound ani to the last 10 digits s

Postby mflorell » Wed Jul 23, 2014 7:35 am

That's the whole reason we added the DID setting "Clean CID Number"
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Need help truncating inbound ani to the last 10 digits s

Postby ianteller » Wed Jul 23, 2014 11:37 am

Thank you both for the replies.
Couldn't get either solution to quite work. I think the extra info that I am seeing on the agent screen is added after the call is accepted.
What I am doing is transferring from one vicidal system to another. They are registered to each other via a sip connection.
I am currently using the below dialplan entry to send the call:

exten => _977.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _977.,2,Set(CALLERID(num)=${CALLERID(num):-10})
exten => _977.,n,Dial(SIP/${EXTEN:3}@os0101,,tTo)
exten => _977.,n,Hangup

And using the default inbound context to receive the call pointed to a fake DID.
I can see the call is coming in with the correct DID however it is showing all the 20 digit trunk info on the agent screen in the phone field. (V72312320300000003)
How can I fix that?
Here is the incoming info, Caller ID (Ani) looks good here. It must be adding the info before it reaches the agent

[Jul 23 12:21:12] -- Executing [192*168*000*005*9774072221000@default:1] Goto("SIP/voipvoip001-00000086", "default,9774072221000,1") in new stack
[Jul 23 12:21:12] -- Goto (default,9774072221000,1)
[Jul 23 12:21:12] -- Executing [9774072221000@default:1] AGI("SIP/voipvoip001-00000086", "agi://127.0.0.1:4577/call_log") in new stack
[Jul 23 12:21:12] -- AGI Script Executing Application: (EXEC) Options: (Set(_CAMPCUST=CAM001))
[Jul 23 12:21:12] -- <SIP/voipvoip001-00000086>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Jul 23 12:21:12] -- Executing [9774072221000@default:2] Set("SIP/voipvoip001-00000086", "CALLERID(num)=407921xxxx") in new stack
[Jul 23 12:21:12] -- Executing [9774072221000@default:3] Dial("SIP/voipvoip001-00000086", "SIP/4072221000@os0101,,tTo") in new stack
[Jul 23 12:21:12] == Using SIP RTP CoS mark 5
[Jul 23 12:21:12] -- Called SIP/4072221000@os0101
[Jul 23 12:21:12] -- SIP/os0101-00000087 answered SIP/voipvoip001-00000086
[Jul 23 12:21:35] -- Executing [h@default:1] AGI("SIP/voipvoip001-00000086", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----48-----23") in new stack
[Jul 23 12:21:35] -- <SIP/voipvoip001-00000086>AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... -48-----23 completed, returning 0
[Jul 23 12:21:35] == Spawn extension (default, 9774072221000, 3) exited non-zero on 'SIP/voipvoip001-00000086'

Thanks Again!!
Two separate 3 server Vicidial systems with 2 Quad Core Xenon Processors (3.0 GHz & 32 GB ram)
ViciBox5.x86_64-5.0.3.iso cluster install |3 servers DB/WEB/TEL| VICIDIAL VERSION: 2.8-439a BUILD: 140515-1610 | Asterisk 2.8b0.5 | SVN: 2115
ianteller
 
Posts: 9
Joined: Thu Jun 05, 2014 11:25 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 109 guests