<font color="#000066"><font face="courier new,monospace">Hi all.<br><br>I am searching for a way to send SMS via our E1 PRI line.<br><br>We are in Portugal and I have seen some Internet/TV/Phone providers (ZON for those who know it) who install normal phones with SMS support in landline.<br>
<br>So I just found a page from PT (Portugal Telecom) stating that the SMC number is either 12999 or 129990 (<a href="http://www.ptcom.pt/PTResidencial2/Tabs/MyPTPublico/Apoio_a_Clientes/Servi%C3%A7os/SMS/caracteristicas/sms_caracteristicas.htm">http://www.ptcom.pt/PTResidencial2/Tabs/MyPTPublico/Apoio_a_Clientes/Servi%C3%A7os/SMS/caracteristicas/sms_caracteristicas.htm</a>)<br>
<br>Now I was trying to send a SMS via a PRI from PT (same provider)<br><br>context of dialplan is services<br><br></font></font><div style="margin-left: 40px;"><div class="highlight"><pre><span class="pygment">[root@asterisk ~]# tail /etc/asterisk/extensions_services.ael -n 12</span><br>
<span class="pygment">        _00019XXXXXXXX => { // TEST SMS</span><br><span class="pygment">                Noop(Testing SMS to ${EXTEN:4}...);</span><br><span class="pygment">                Answer();</span><br><span class="pygment">                SMS(services,,00351932485457,bla);</span><br>
<span class="pygment">                SMS(services);</span><br><span class="pygment">                Hangup();</span><br><span class="pygment">        //        129990</span><br><span class="pygment">        }</span><br><br><span class="pygment">///////////////////////////// FINISHED TESTING /////////////////////////////////</span><br>
<br><span class="pygment">}</span><br><span class="pygment"> [root@asterisk ~]# cat test.call </span><br><span class="pygment">Channel: DAHDI/g7/12999</span><br><span class="pygment">MaxRetries: 1</span><br><span class="pygment">RetryTime: 60</span><br>
<span class="pygment">WaitTime: 30</span><br><span class="pygment">Context: services</span><br><span class="pygment">Extension: 0001932485457</span><br><span class="pygment">Priority: 1</span><br><span class="pygment">SetVar: MSG=hello</span><br>
<br><br><span class="pygment">cp test.call /var/spool/asterisk/outgoing/ && chown asterisk.asterisk /var/spool/asterisk/outgoing/test.call && chmod 777 /var/spool/asterisk/outgoing/test.call && asterisk -vvvvvvr</span><br>
<br><span class="pygment">Asterisk 1.6.2.9-rc2, Copyright (C) 1999 - 2010 Digium, Inc. and others.</span><br><span class="pygment">Created by Mark Spencer <<a href="mailto:markster@digium.com">markster@digium.com</a>></span><br>
<span class="pygment">Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.</span><br><span class="pygment">This is free software, with components licensed under the GNU General Public</span><br>
<span class="pygment">License version 2 and other licenses; you are welcome to redistribute it under</span><br><span class="pygment">certain conditions. Type 'core show license' for details.</span><br><span class="pygment">=========================================================================</span><br>
<span class="pygment"> == Parsing '/etc/asterisk/asterisk.conf': == Found</span><br><span class="pygment"> == Parsing '/etc/asterisk/extconfig.conf': == Found</span><br><span class="pygment">Connected to Asterisk 1.6.2.9-rc2 currently running on asterisk (pid = 12521)</span><br>
<span class="pygment">Verbosity is at least 14</span><br><span class="pygment"> -- Attempting call on DAHDI/g7/12999 for 0001932485457@services:1 (Retry 1)</span><br><span class="pygment">-- Making new call for cr 32792</span><br>
<span class="pygment"> -- Requested transfer capability: 0x00 - SPEECH</span><br><span class="pygment">> Protocol Discriminator: Q.931 (8) len=28</span><br><span class="pygment">> Call Ref: len= 2 (reference 24/0x18) (Originator)</span><br>
<span class="pygment">> Message type: SETUP (5)</span><br><span class="pygment">> [04 03 80 90 a3]</span><br><span class="pygment">> Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)</span><br>
<span class="pygment">> Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)</span><br><span class="pygment">> User information layer 1: A-Law (35)</span><br>
<span class="pygment">> [18 03 a1 83 81]</span><br><span class="pygment">> Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Preferred Dchan: 0</span><br><span class="pygment">> ChanSel: As indicated in following octets</span><br>
<span class="pygment">> Ext: 1 Coding: 0 Number Specified Channel Type: 3</span><br><span class="pygment">> Ext: 1 Channel: 1 ]</span><br><span class="pygment">> [6c 02 21 80]</span><br>
<span class="pygment">> Calling Number (len= 4) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)</span><br><span class="pygment">> Presentation: Presentation permitted, user number not screened (0) '' ]</span><br>
<span class="pygment">> [70 06 a1 31 32 39 39 39]</span><br><span class="pygment">> Called Number (len= 8) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '12999' ]</span><br>
<span class="pygment">> [a1]</span><br><span class="pygment">> Sending Complete (len= 1)</span><br><span class="pygment">q931.c:3134 q931_setup: call 32792 on channel 1 enters state 1 (Call Initiated)</span><br><span class="pygment">< Protocol Discriminator: Q.931 (8) len=32</span><br>
<span class="pygment">< Call Ref: len= 2 (reference 24/0x18) (Terminator)</span><br><span class="pygment">< Message type: CALL PROCEEDING (2)</span><br><span class="pygment">< [18 03 a9 83 81]</span><br><span class="pygment">< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0</span><br>
<span class="pygment">< ChanSel: As indicated in following octets</span><br><span class="pygment">< Ext: 1 Coding: 0 Number Specified Channel Type: 3</span><br><span class="pygment">< Ext: 1 Channel: 1 ]</span><br>
<span class="pygment">< [28 14 43 48 41 4d 41 44 41 20 45 4d 20 50 52 4f 47 52 45 53 53 4f]</span><br><span class="pygment">< Display (len=20) [ CHAMADA EM PROGRESSO ]</span><br><span class="pygment">-- Processing IE 24 (cs0, Channel Identification)</span><br>
<span class="pygment">-- Processing IE 40 (cs0, Display)</span><br><span class="pygment">q931.c:3683 q931_receive: call 32792 on channel 1 enters state 3 (Outgoing call Proceeding)</span><br><span class="pygment">< Protocol Discriminator: Q.931 (8) len=52</span><br>
<span class="pygment">< Call Ref: len= 2 (reference 24/0x18) (Terminator)</span><br><span class="pygment">< Message type: DISCONNECT (69)</span><br><span class="pygment">< [08 02 84 9c]</span><br><span class="pygment">< Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the remote user (4)</span><br>
<span class="pygment">< Ext: 1 Cause: Invalid number format (28), class = Normal Event (1) ]</span><br><span class="pygment">< [1c 17 91 a1 14 02 01 2e 02 01 24 30 0c 30 0a a1 05 30 03 02 01 00 82 01 00]</span><br>
<span class="pygment">< Facility (len=25, codeset=0) [ 0x91, 0xA1, 0x14, 0x02, 0x01, '.', 0x02, 0x01, '$0', 0x0C, '0', 0x0A, 0xA1, 0x05, '0', 0x03, 0x02, 0x01, 0x00, 0x82, 0x01, 0x00 ]</span><br>
<span class="pygment">PROTOCOL 11</span><br><span class="pygment">A1 0014 (CONTEXT SPECIFIC [1])</span><br><span class="pygment"> 02 0001 2E (INTEGER: 46)</span><br><span class="pygment"> 02 0001 24 (INTEGER: 36)</span><br>
<span class="pygment"> 30 000C (SEQUENCE)</span><br><span class="pygment"> 30 000A (SEQUENCE)</span><br><span class="pygment"> A1 0005 (CONTEXT SPECIFIC [1])</span><br><span class="pygment"> 30 0003 (SEQUENCE)</span><br>
<span class="pygment"> 02 0001 00 (INTEGER: 0)</span><br><span class="pygment"> 82 0001 00 (CONTEXT SPECIFIC [2])</span><br><span class="pygment">< [1e 02 82 88]</span><br><span class="pygment">< Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)</span><br>
<span class="pygment">< Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]</span><br><span class="pygment">< [28 0c 49 4d 50 55 4c 53 4f 53 20 3d 20 30]</span><br>
<span class="pygment">< Display (len=12) [ IMPULSOS = 0 ]</span><br><span class="pygment">-- Processing IE 8 (cs0, Cause)</span><br><span class="pygment">-- Processing IE 28 (cs0, Facility)</span><br><span class="pygment">Handle Q.932 ROSE Invoke component</span><br>
<span class="pygment"> [ Handling operation 36 ]</span><br><span class="pygment">-- Processing IE 30 (cs0, Progress Indicator)</span><br><span class="pygment">-- Processing IE 40 (cs0, Display)</span><br><span class="pygment">q931.c:3826 q931_receive: call 32792 on channel 1 enters state 12 (Disconnect Indication)</span><br>
<span class="pygment"> -- Channel 0/1, span 7 got hangup request, cause 28</span><br><span class="pygment"> -- Channel 0/1, span 7 received AOC-E charging 0 units</span><br><span class="pygment">NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, peerstate Disconnect Request</span><br>
<span class="pygment">q931.c:2967 q931_release: call 32792 on channel 1 enters state 19 (Release Request)</span><br><span class="pygment">> Protocol Discriminator: Q.931 (8) len=9</span><br><span class="pygment">> Call Ref: len= 2 (reference 24/0x18) (Originator)</span><br>
<span class="pygment">> Message type: RELEASE (77)</span><br><span class="pygment">> [08 02 81 9c]</span><br><span class="pygment">> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)</span><br>
<span class="pygment">> Ext: 1 Cause: Invalid number format (28), class = Normal Event (1) ]</span><br><span class="pygment"> -- Hungup 'DAHDI/187-1'</span><br><span class="pygment">[Jun 22 22:50:04] NOTICE[11983]: pbx_spool.c:339 attempt_thread: Call failed to go through, reason (1) Hangup</span><br>
<span class="pygment">< Protocol Discriminator: Q.931 (8) len=5</span><br><span class="pygment">< Call Ref: len= 2 (reference 24/0x18) (Terminator)</span><br><span class="pygment">< Message type: RELEASE COMPLETE (90)</span><br>
<span class="pygment">q931.c:3766 q931_receive: call 32792 on channel 1 enters state 0 (Null)</span><br><span class="pygment">NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null</span><br><span class="pygment">NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null</span><br>
<br></pre></div></div><font color="#000066"><font face="courier new,monospace"><br></font></font>