I managed (with very much joy :D) to configure chan_mobile with asterisk 1.8 and my iPhone 4 and outgoing calls work nicely.
I have issues with automatic answering incoming calls.
This is what my chan_mobile.conf looks like:
[adapter]
address = 11:11:11:11:11:11
id = box-1
[iphone]
address = 22:22:22:22:22:22
port = 8
context = from-test-phone
adapter = box-1
and in /etc/asterisk/extensions.conf I added
[from-test-phone]
exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Hangup()
But when I call my mobile phone there is no answer.
The bluetooth device is paired and active
# rasterisk
> mobile show devices
ID Address Group Adapter Connected State SMS
iphone 22:22:22:22:22:22 0 box-1 Yes Free No
Am I missing something?
Apparently it was enough to type
rasterisk
> core set verbose 4
> core set debug 4
thanks user1938742!
Related
Precise overview about the flow:
I am calling my initial extension(100) using Zoiper through Twilio sip domain using Zoiper as soft phone which actually direct the call to my asterisk server.
Now when my call is in asterisk server I'm trying to forward it to another extension using Zoiper. I have already configured it according to documentation provided by asterisk will also be attaching the reference links.
I just want to forward the current call to a particular extension. So please can anyone guide me that how it can be possibly done?
ari-client
bridge.once(‘BridgeAttendedTransfer’, event => {
var transferee = new ari.Channel(event.transferee.id);
transferee.continueInDialplan({
context: event.context,
extension: event.exten,
priority: 1
});
});
extension.conf
exten => 201,1,Dial(SIP/201,20,tT)
features.conf
blindxfer = #2 ("#2" or "##" instead of "#1")
atxfer = *2
transferdigittimeout = 1; Number of seconds to wait between digits when transferring a call
xfersound = beep ; to indicate an attended transfer is complete
xferfailsound = beeperr ; to indicate a failed transfer
transferdialattempts = 3 ; Number of times that a transferer may attempt to dial an extension before
being kicked back to the original call.
transferretrysound = "beep" ; Sound to play when a transferer fails to dial a valid extension.
transferinvalidsound = "beeperr" ; Sound to play when a transferer fails to dial a valid extension
Using Zoiper to make a transfer
References:
https://wiki.asterisk.org/wiki/display/AST/Feature+Code+Call+Transfers
https://www.aska-ltd.jp/en/blog/185
https://community.asterisk.org/t/call-transfer-not-working-on-softphones/33817
https://asteriskfaqs.org/2020/12/22/uncategorized/handling-transfers-with-ari.html
Trying to implement blind call transfer.
I am trying to create dialplan for incoming/outgoing for given numbers:
+xx xxx [xxxxxxxxx|xxxxxxxx]
I have already configure my service provider information in sip.conf
[sipprovider]
type=friend
secret=xxxxx
defaultusername=xxxxx
host=xxx.xx.xx.xxx
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
;fromdomain=xxx.xx.xx.xxx
context=default
nat=yes
Now, I want to create incoming/outgoing trunk, my extensions allow to dial international calls and incoming call received on given number.
+xx xxx [xxxxxxxxx|xxxxxxxx]
[default]
switch => Realtime
exten => 55,1,Verbose(1,Echo test application)
exten => 55,n,Dial(SIP/sipprovider/0091XXXXX99999#sipprovider); Here is the outbound call, the exact dialstring depends on outgoing provider and channeltype
exten => 55,n,Hangup()
Display: Calling....
and then, VM Play: Person you are calling is unavailable
Asterisk Console:
== Using SIP RTP CoS mark 5
-- Executing [55#default:1] Verbose("SIP/3001-00000029", "1,Echo test application") in new stack
Echo test application
-- Executing [55#default:2] Dial("SIP/3001-00000029", "SIP/sipprovider/0091XXXXX99999#sipprovider") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/sipprovider/0091XXXXX99999#sipprovider
[Aug 17 18:29:02] WARNING[32467]: chan_sip.c:4024 retrans_pkt: Retransmission timeout reached on transmission 78a9b28011fd522601047c9317adca91#xx.xx.xx.xx:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[Aug 17 18:29:02] WARNING[32467]: chan_sip.c:4053 retrans_pkt: Hanging up call 78a9b28011fd522601047c9317adca91#xx.xx.xx.xx:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [55#default:3] Hangup("SIP/3001-00000029", "") in new stack
== Spawn extension (default, 55, 3) exited non-zero on 'SIP/3001-00000029'
-- Executing [h#default:1] Verbose("SIP/3001-00000029", "Hangup...") in new stack
Hangup...
Basically a dialstring can be in 'SIP/devicename/extension' or 'SIP/username#host' format. SIP/sipprovider/0091XXXXX99999#sipprovider is wrong.
"Retransmission timeout reached" means that asterisk tries to send an INVITE to sipprovider, but sipprovider's SIP port (5060 UDP) isn't accessible. You can see this in SIP debug.
im using asterisk in my application and this is how my extensions.conf looks
[default]
exten => _[*#0-9a-zA-Z+].,1,Answer
exten => _[*#0-9a-zA-Z+].,n,Wait(2)
exten => _[*#0-9a-zA-Z+].,n,Monitor(wav,test123,i)
exten => _[*#0-9a-zA-Z+].,n,Dial(SIP/0000FFFF0001,35,L(2000)|A(hello-world))
i configured 0000FFFF0001 sip phone and that is also playing an announcement.So there are 2 playbacks from both ends.But when i listen to the test123.wav file it contains only the sound that played from 0000FFFF0001 after the hello-world finished.So basically i don't have the sound part from 0000FFFF0001 announcement when when asterisk playback is there.
You have to check flags in Monitor application - url to doc
i - Skip recording of input stream (disables m option).
So in your case you use i flag which disables recording of second side of call. You just have to remove it, then you will receive 2 files, each for one side of call. If you want asterisk to mix them use m flag.
Okey İ handled my problem,
Problem is provider. it is rejected my request! All problem provider that means trunk!
I have a asterisk server 1.6 and a trunk. i tried to call my cell phone on trunk(provider)
when i call my cell phone it gives me :
-- Executing [0506610XXXX#phone:1] NoOp("SIP/1001-0000009b", "") in new stack
-- Executing [0506610XXXX#phone:2] Dial("SIP/1001-0000009b", "SIP/312XXXXXXX
/0506610XXXX") in new stack
== Using SIP RTP CoS mark 5
-- Called 312XXXXXXX/0506610XXXX
-- SIP/3XXXXXXXX-0000009c is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [0506610XXXX#phone:3] Hangup("SIP/1001-0000009b", "") in new stack
== Spawn extension (phone, 0506610XXXX, 3) exited non-zero on 'SIP/1001-0000009b'
i tried varios things;
#sip show peers- all ok all registered
#sip show registry - my trunk is ok registered
my sip.conf
[general]
register=>XXXXXX:XXXXXX#ipaddress/312911
[312911]
type=friend
secret=XXXXX
username=312911
host=ipaddress
insecure=invite ,port
context=aaa
[1001]
type=friend
dtmfmode=rfc2833
context=phone
host=dynamic
secret=XX
callerID="1001"<1001>
nat=yes
my extension.conf
[myphones]
exten=> _XXX.,1,NoOp()
exten=> _XXX.,n,Dial(SIP/312911/${EXTEN})
exten=> _XXX.,n,Hangup()
[incoming]
exten=>_X.,1,NoOp()
exten=>_X.,n,Dial(SIP/1001)
exten=> _X.,n,Hangup()
[internal]
exten=>_1XXX,1,Dial(SIP/${EXTEN})
exten=>_1XXX,n,Hangup()
[phone]
include=>internal
include=>myphones
[aaa]
include=>incoming
include=>myphones
Some common causes which will generate this kind of error:
1) Provider needs registration where you are not giving register and only created peer.
2) The format is wrong. Some provider needs 00 as ISD, some do not. So check that you are using the correct number format.
3) The outbound circuit is full. It happens where there is no channel left from the provider side or you are not allowed to create more channels.
4) Some providers don't support multiple registry.
Fore more details you need to enable "sip set debug ip < provider ip address> and then make the call and check each packet.
on asterisk console:
set verbose 0 // optional
set debug 0 // optional
set sip debug
it seems that your trunk is not working(wrong number format, invalid login/pass,...)
in sip messages U'll see real error
I do need a virtual serial port since a program#1 has to set up a bluetooth connection for a second program (program#2) that uses System.IO.Ports.SerialPort, don't I? It isn't a requirement providing that program#1 and #2 run concurrently using the same serial port.
32Feet.NET: Ok. But I get "No ports available" if I start the SuD 7 times (one after another). COM9 -> COM7 -> COM5 -> COM4 -> COM2 -> COM0 -> "No ports available".
program#1 invokes
bdi.SetServiceState(BluetoothService.SerialPort, true)
32feet.Net creates Key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\Serial\Ports
32feet.Net calls
RegisterDevice(portPrefix, portIndex, "btd.dll", ref pep);
program#2: this.comX.Open(); ... this.comX.Close();
EMDK: An IndexOutOfRangeException is thrown if I start the SuD 7 times (one after another). COM2 -> COM4 -> COM5 -> COM6 -> COM7 -> COM9 -> IndexOutOfRangeException.
program#1: I'm using LocalComPort and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\Serial\Ports isn't updated.
program#2: this.comX.Open(); ... this.comX.Close();
What is the reason? There's no process#1 and process#2 left.
Once you've set the port up one time why do you ever have to do it again? With SetServiceState the configuration is set in the Registry for ever and thus will be there for ever, e.g. after a reboot... Presumably the same is true for the method you are using in EMDK. I don't recognise that name (maybe it is Motorola only) but on my M3 Sky I have used the BTExplorerApi and it has a for-ever and a not-for-ever flag in the port-set-up function.
On 32feet.NET with the MSFT stack. (Note: Peter was the expert in this not me). :-,( As I understand it if you use class BluetoothSerialPort, that will create a port that's configured temporary (not over reboot etc). Maybe that's what you want?
Once you've set the port up one time why do you ever have to do it again?
Use case scenario: Mr. X uses one mobile device and one serial RS232 Bluetooth adapter to communicate with several units. But for the seventh there won't be any virtual serial port left.
I was using 32feet.Net for ES400 trouble-free. For MC55, MC35 the phenomena under discussion appears. And that was the reason why I created this question.
I don't know what's going on under the hood yet. But as far as EMDK concerned: if the connection isn't needed any longer, you have to unpair the device.
I'm using EMDK for Motorola ES400 and MC55:
/// <summary>
/// Removes the pairing, turns Bluetooth off and disables the bluetooth object.
/// </summary>
public void ReleaseLink(){
try{
this.remoteDevice.UnPair();
this.bluetooth.Dispose();
I'm using 32feet.NET for Motorola MC35 (BluetoothSerialPort that invokes RegisterDevice):
if (!bdi.Authenticated)
{
string pair = rd.Pin;
paired = BluetoothSecurity.PairRequest(bdi.DeviceAddress, pair);
if (!paired)
{
return;
}
}
spp = BluetoothSerialPort.CreateClient(new BluetoothEndPoint(remoteAddress,BluetoothService.SerialPort));
public void ReleaseLink()
{
try
{
BluetoothSecurity.RemoveDevice(spp.Address);
spp.Dispose();