Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 1:33 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Can I re-write/change the received DID to something else?
PostPosted: Sat May 23, 2015 9:23 am 
Offline

Joined: Fri Mar 06, 2009 9:12 pm
Posts: 188
Hello,

My provider sends their DIDs with a prefix number and # before the number, for example 1234567#123456789123.
This is how is received in sip:

From: <sip:[email protected]>;tag=1041231023-212435
To: 1234567#123456789123 <sip:1234567#[email protected]>

Does anybody know how can I change the DID in order to show only the number (i.e 123456789123)?
Using the did with the static prefix 1234567# is not easy or practical as I need to refer to that format inside a2b as well.
It would be more sensible to only use the did number alone.

Any ideas?

N


Top
 Profile  
 
 Post subject: Re: Can I re-write/change the received DID to something else?
PostPosted: Mon May 25, 2015 2:28 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
If you have a search around there are quite a few dialplan snippets for removing a plus sign from the front of an incoming call, like this - http://orourketech.com/elastix-plus-sig ... ng-things/

You should be able to do the same sort of thing to strip the number off the front. Run the dial plan before passing the call to the a2billing PHP


Top
 Profile  
 
 Post subject: Re: Can I re-write/change the received DID to something else?
PostPosted: Mon May 25, 2015 2:30 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
Actually that link was for removing it from the caller ID. You want something like this - http://www.freepbx.org/support/document ... alled-numb - for stripping it from EXTEN (the number called)


Top
 Profile  
 
 Post subject: Re: Can I re-write/change the received DID to something else?
PostPosted: Tue May 26, 2015 6:48 am 
Offline

Joined: Fri Mar 06, 2009 9:12 pm
Posts: 188
bucasia wrote:
Actually that link was for removing it from the caller ID. You want something like this - http://www.freepbx.org/support/document ... alled-numb - for stripping it from EXTEN (the number called)


It worked! I am providing below the working custom context for others to refer in the future.

[FROM-PROVIDER-CUSTOM]
exten => _1234567#X!,1,Noop(Stripping 1234567# from start of DID number received)
exten => _1234567#X!,n,Goto(from-trunk,${EXTEN:8},1)
exten => _[*0-9]!,1,Goto(from-trunk,${EXTEN},1)
exten => h,1,Hangup()

I have however another task now which is to playback a certain audio file to outside callers that reached a DID which is not –yet- assigned to a user. I have created the following extension which works fine if I call it directly however I am not sure how to combine it with the above context, when the DID received is not in use. Any ideas?

[custom-unassigned-number]
; This extension plays a message to the caller, notifying them that the number is not currently assigned to a user.

exten => 1244,1,Progress()
exten => 1244,n,Wait(1)
exten => 1244,n,Set(VOLUME(TX)=0)
exten => 1244,n,Playback(unassigned-number,noanswer)
exten => 1244,n,Hangup()


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group