Projekat

Općenito

Profil

Akcije

Podrška #14443

Zatvoren

asterisk smsq rmlh-1

Dodano od Ernad Husremović prije više od 16 godina. Izmjenjeno prije više od 14 godina.

Status:
Zatvoreno
Prioritet:
Normalan
Odgovorna osoba:
Kategorija:
-
Početak:
03.06.2008
Završetak:
% završeno:

0%

Procjena vremena:

Opis

apt-get install libopt-dev

asterisk#./configure

... make install ..

http://www.voip-info.org/wiki-Asterisk+cmd+Sms


Povezani tiketi 2 (0 otvoreno2 zatvorenih)

korelira sa voip - Podrška #14444: Adhearsion: asterisk agi ruby, sample.call - asterisk poziv iz externe aplikacijeOdbačenoErnad Husremović04.06.2008

Akcije
korelira sa voip - Podrška #14437: test rmlh servera officesa, privremena zamjena za ifoldZatvorenoErnad Husremović03.06.2008

Akcije
Akcije #1

Izmjenjeno od Ernad Husremović prije više od 16 godina

root@rmlh-1:~/devel/hg/asterisk/utils# cp smsq /usr/bin

Akcije #2

Izmjenjeno od Ernad Husremović prije više od 16 godina

Connected to Asterisk currently running on rmlh-1 (pid = 17241)

Verbosity is at least 38
    -- Accepting voice call from '139000' to '33269291' on channel 0/1, span 1
    -- Executing [33269291@demo:1] Wait("Zap/1-1", "1") in new stack
    -- Executing [33269291@demo:2] Answer("Zap/1-1", "") in new stack
    -- Executing [33269291@demo:3] NoOp("Zap/1-1", "Calleridnum 33269291 Zap/1-1 139000") in new stack
    -- Executing [33269291@demo:4] GotoIf("Zap/1-1", "0?5:6") in new stack
    -- Goto (demo,33269291,6)
    -- Executing [33269291@demo:6] NoOp("Zap/1-1", "Finish if-demo-11") in new stack
    -- Executing [33269291@demo:7] GotoIf("Zap/1-1", "6?8:10") in new stack
    -- Goto (demo,33269291,8)
    -- Executing [33269291@demo:8] NoOp("Zap/1-1", "goto smsphone: 139000 | 2") in new stack
    -- Executing [33269291@demo:9] Goto("Zap/1-1", "smsphone|139000-2|1") in new stack
    -- Goto (smsphone,139000-2,1)
    -- Executing [139000-2@smsphone:1] NoOp("Zap/1-1", "Incoming SMS from 139000| user data | time date | sender | ms reference ") in new stack
    -- Executing [139000-2@smsphone:2] SMS("Zap/1-1", "139000-2|at") in new stack
    -- SMS TX 93 00 6D
    -- SMS RX 91 16 00 09 81 60 11 14 13 F1 00 00 80 60 30 02 54 31 00 04 C1 F7 3C 0C AB
    -- SMS TX 95 02 00 00 69
    -- SMS RX 94 00 6C
    -- Executing [139000-2@smsphone:3] System("Zap/1-1", "smsq -rx --process="/usr/local/bin/asterisk_read_sms"") in new stack
    -- Executing [139000-2@smsphone:4] Hangup("Zap/1-1", "") in new stack
  == Spawn extension (smsphone, 139000-2, 4) exited non-zero on 'Zap/1-1'
    -- Hungup 'Zap/1-1'

Akcije #3

Izmjenjeno od Ernad Husremović prije više od 16 godina

root@rmlh-1:~/devel/hg/asterisk/utils# ls /var/spool/asterisk/sms/mtrx

Akcije #4

Izmjenjeno od Ernad Husremović prije više od 16 godina

root@rmlh-1:~/ruby# /usr/bin/smsq --motx-callerid=33269291 --motx-channel zap/g1/139000 61141311 'officesa trenutni status: AKtiviran'

Akcije #5

Izmjenjeno od Ernad Husremović prije više od 16 godina

http://www.the-asterisk-book.com/unstable/applikationen-settransfercapability.html

SetTransferCapability()

Sets the ISDN transfer capability.

SetTransferCapability(transferCapability)

Allowed values:

SPEECH
0x00 - Speech (default, voice calls)
DIGITAL
0x08 - Unrestricted digital information (data calls)
RESTRICTED_DIGITAL
0x09 - Restricted digital information
3K1AUDIO
0x10 - 3.1 kHz Audio (fax calls)
DIGITAL_W_TONES
0x11 - Unrestricted digital information with tones/announcements
VIDEO
0x18 - Video

[Note]

Internal help for this application in Asterisk 1.4:

= Info about application 'SetTransferCapability' =

[Synopsis]
Set ISDN Transfer Capability

[Description]
SetTransferCapability(transfercapability): Set the ISDN Transfer
Capability of a call to a new value.
Valid Transfer Capabilities are:

SPEECH             : 0x00 - Speech (default, voice calls)
DIGITAL : 0x08 - Unrestricted digital information (data cal
ls)
RESTRICTED_DIGITAL : 0x09 - Restricted digital information
3K1AUDIO : 0x10 - 3.1kHz Audio (fax calls)
DIGITAL_W_TONES : 0x11 - Unrestricted digital information with tone
s/announcements
VIDEO : 0x18 - Video
Akcije #6

Izmjenjeno od Ernad Husremović prije više od 16 godina

hm problem je bio sve do caller id-a

ovo radi

root@rmlh-1:~# smsq --motx-callerid=269291 --motx-channel zap/g1/139000 061141311 'officesa trenutni status: test 10'


    -- Attempting call on zap/g1/139000 for application SMS(0) (Retry 1)
    -- Requested transfer capability: 0x00 - SPEECH
       > Channel Zap/1-1 was answered.
       > Launching SMS(0) on Zap/1-1
    -- SMS RX 93 00 6D
    -- SMS TX 91 29 01 02 09 81 60 11 14 13 F1 00 F1 21 6F B3 39 3D 2E CF C3 20 BA BC EC AE D3 DD 69 D0...
    -- SMS RX 95 09 01 00 80 60 40 01 61 05 00 DA
    -- SMS TX 94 00 6C
    -- Channel 0/1, span 1 got hangup request, cause 16
    -- Hungup 'Zap/1-1'
[Jun  4 10:17:15] NOTICE[12521]: pbx_spool.c:371 attempt_thread: Call completed to zap/g1/139000

ali je bitno bilo da podesim caller-id onako kako zapata traži.

Različito se ponaša u odnosu na misdn-a:
  • traži 139000 za razliku od misdn 13900
  • traži callerid 269291 umjesto misdn 33269291

ovo radi u zapata (smsdial extensions.ael)

context smsdial {
      _X. => {
           //Set(CHANNEL(transfercapability)=DIGITAL);
           //SetTransferCapability('DIGITAL');
           Set(CALLERID(all)=officesa<269291>);
           SMS(${CALLERIDNUM},s,${EXTEN},${CALLERIDNAME});
           SMS(${CALLERIDNUM},s);
           Hangup();
Akcije #7

Izmjenjeno od Ernad Husremović prije više od 16 godina

sinoć sam na root/ruby/ASms ovo za privremeno rješenje napravio

              cmd="/usr/bin/smsq --motx-callerid=#{@@callerid} --motx-channel #{@@channel} #{number}  '#{message}'" 
              @@log.info "cmd = #{cmd}" 

              # hernad
              cmd="cp /root/ruby/alarm.call /var/spool/asterisk/outgoing"  <<<<<<<<<<<<<
              sent = 1
              @@log.info "cmd = #{cmd}" 
              # hernad end

root@rmlh-1:~/ruby# cat alarm.call

#
# This is a sample file that can be dumped in /var/spool/asterisk/outgoing
# to generate a call.  
#
# Obviously, you MUST specify at least a channel in the same format as you
# would for the "Dial" application.  Only one channel name is permitted.
#
Channel: SIP/12
#
# You may also specify a wait time (default is 45 seconds) for how long to
# wait for the channel to be answered, a retry time (default is 5 mins)
# for how soon to retry this call, and a maximum number of retries (default
# is 0) for how many times to retry this call.
#
MaxRetries: 2
RetryTime: 60
WaitTime: 10

#
# Once the call is answered, you must provide either an application/data
# combination, or a context/extension/priority in which to start the PBX.
#
#Context: demo
#Extension: s
#Priority: 1

#
# Alternatively you can specify just an application
# and its arguments to be run, instead of a context
# extension and priority
#
Application: VoicemailMain
Data: 1234
#Application: Playback
#Data: /bs/digits/9

#
# You can set the callerid that will be used for the outgoing call
#
Callerid: Wakeup alarm <(99) 99-9999>

#
# An account code can be specified the following way:
#
#Account: mysuperfunaccountcode

#
# Normally, a call file is always deleted after the call is successful
# or the maximum number of tries is reached even if the modification
# time of the call file was changed during the call to be in the
# future.  By Setting AlwaysDelete to No the modification time of the
# call file will be checked after the call is completed or the maximum
# number of retries is reached.  If the modification time is in the
# future, the call file will not be deleted.
#
#AlwaysDelete: Yes

#
# You can set channel variables that will be passed to the channel.
# This includes writable dialplan functions. To set a writable dialplan
# function, the module containing this function *must* be loaded.
#
#Set: file1=/tmp/to
#Set: file2=/tmp/msg
#Set: timestamp=20021023104500
#Set: CDR(userfield|r)=42

#
# Setting Archive to yes the call file is never deleted, but is moved
# in the subdir "outgoing_done" of the spool directory. In this case 
# will be appended a line with "Status: value", where value can be 
# Completed, Expired or Failed.
#
#Archive: yes

ovaj call fajl smješten u outgoing asterisk spool poziva ext 12 i aktivira aplikaciju VoiceMan - što je najbitnije poziva u slučaju alarm-a

Akcije #8

Izmjenjeno od Ernad Husremović prije skoro 15 godina

Ovo bi takođe moglo koristiti Alenu kad je sale za rmlh podešavao sms.

Akcije #9

Izmjenjeno od Ernad Husremović prije više od 14 godina

  • Status promijenjeno iz Dodijeljeno u Zatvoreno
Akcije

Također dostupno kao Atom PDF