i have VoIP infrastructure in company,
end points can dial mobile numbers in this case:
they call 9... they wait for pstn dial ton...after dial-ton they can dial their number.
i do this in this way:
exten => 9,1,dial(sip/8003)
witch sip/8003 is a sip account that is connected to FXO gateway and connected to asterisk via sip trunk.
i want to do this:
the end points dial:
909121111111
instead of
9... after-dialton.... 09121111111
Without having seen more of your dial plan, typically what you can do is, in an accessible context, a way to dial the whole thing -- and then use a substring to strip out parts of it.
exten => _9XXXXXXXXXX,1,Dial(SIP/8003/${EXTEN:1})
The first part of the extension matches a 10-digit number prefixed with a 9: _9XXXXXXXXXX. Check out the article on pattern matching on the Asterisk wiki
Next, on our dial application, what we do is dial your sip device, but, we pass it back the dialed extension, but, notice the colon? Like ${EXTEN:1} That's to strip digits. Namely it strips the first digit. You can learn more about manipulating variables on the wiki, too.
Related
I am working with an asterisk software pbx.
I have an IP phone which is configured with asterisk.
What i want to do is make call to a special number when the user hangs the phone. I do not want him to have to compose a number.
Do you know if it possible ?
Thanks
You have call, part A(caller) call to party B(called).
So.
You can setup your dialplan if B hangup, asterisk connect A with next number.
You can't setup your dialplan if A hangup, B connected to other number, except variant when you do connect A&B via conference(not via Dial command).
If you want phone call B when A get it, that called HOTLINE and it is feature of phone, not asterisk.
I am trying to figure out a way to send DTMF commands to my ISDN modem (throught BRI Card) to enable some services it provides. For example, for call forward I need to send the DTMF 21#. I have successfully did that with mISDN but I need to do it with DAHDI now.
So far I have managed to do this that does not work:
[from-internal-custom]
exten => 4321,1,Answer
exten => 4321,n,Noop(Enable Callforward)
exten => 4321,n,Dial(DAHDI/g0/,10,M(dtmf))
[macro-dtmf]
exten => s,1,SendDTMF(*21*<number>#,,DAHDI)
Where number is the number I want to to do the call forward (without the <>).
If I put a ISDN Phone on the ISDN Modem I just need to dial the featurecode 21< number ># and it works.
Is there a way to do this with DAHDI?
There is special key for that
D([called][:calling[:progress]]): Send the specified DTMF strings
*after* the called party has answered, but before the call gets bridged.
The <called> DTMF string is sent to the called party, and the <calling>
DTMF string is sent to the calling party. Both arguments can be used
alone. If <progress> is specified, its DTMF is sent immediately after
receiving a PROGRESS message.
We have a soft phone that's dialing out, on a SIP trunk, through our Asterisk server. The soft phone is sending X Headers that we want to send on to the destination.
We see the headers coming into Asterisk, but not going out. Is there something we can do to forward the headers along to the destination?
Asterisk is no SIP proxy but a B2BUA. This actually means, that it is not forwarding the original request. The call from your softphone gets terminated on Asterisk. Asterisk starts a second call to the logical destination of your call and connects both calls together.
This is why on the outgoing call you don't have the headers you added on the incoming call. The outgoing call is initiated by Asterisk. If you want to add any headers from the incoming call, you manually have to to it like miken32 said:
exten => _X.,n,SIPAddHeader(X-Foobar: ${SIP_HEADER(X-Foobar)})
exten => _X.,n,Dial(SIP/${EXTEN})
Just tell your dialplan to pass them on; maybe something like this:
exten => _X.,n,SIPAddHeader(X-Foobar: ${SIP_HEADER(X-Foobar)})
exten => _X.,n,Dial(SIP/${EXTEN})
Is there any way that i can forward a call from my landline number to my DID number and handle that call with asterisk code??
Is this type of forwarding possible?
There are 2 posible variants
1) Ask your landline provider support about number portability(depend of country and provider) or forward number to sip.
2) Put on your line FXO gateway device(pstn2sip gate, $100-$200 cost) and setup it to work as did for asterisk.
I need to create a ring group (222) which would dial several SIP accounts, and PSTN numbers as well.
For PSTN I have a different context (ToPSTN) with it's own billing rules, so the question is:
How can I ring several SIP acc's and PSTN's simultaneously ?
Here is how I am trying to do that:
exten => 222,1,Dial(SIP/ca-444&SIP/ca-433)
exten => 433,1,Goto(ToPSTN,0035853855453,1)
Or maybe it's possible to do several tasks at the same priority somehow ?
To make dialing into dialplan instead of real channel driver you should use Local channel. This is how it look in your case:
exten => 222,1,Dial(SIP/ca-444&Local/0035853855453#ToPSTN)
So first call goes to SIP peer ca-444 and second directly to dialplan extension 0035853855453 and context ToPSTN.