[asterisk-users] Asterisk with OpenBTS and mobile phone

Ellen Apolinar ellen.apolinar.td at googlemail.com
Wed Jul 18 05:37:31 CDT 2012


Hey Ioan,

thanks for your answer.

It helped a little bit but I have no idea what exactly could work wrong.

My new situation:

*CLI> originate SIP/123456789101112 application MusicOnHold

>   == Using SIP RTP CoS mark 5
>     -- Got SIP response 482 "Loop Detected" back from 192.168.0.102:5060
> [Jul 18 10:38:27] WARNING[4615]: chan_sip.c:3873 __sip_autodestruct:
> Autodestruct on dialog '
> 446588d34c8b0e2d1920fec416ef0b5d at 192.168.0.102:5060' with owner in place
> (Method: INVITE)
>

*CLI> sip show peers

> Name/username              Host                                    Dyn
> Forcerport ACL Port     Status
> 123456789101112/6202       192.168.0.102
> N             5060     OK (1 ms)
> 6000/6000                  192.168.0.102                            D
> N             5061     Unmonitored
> 6001/6001                  192.168.0.102                            D
> N             5061     Unmonitored
>

*CLI> sip show channels

> Peer             User/ANR         Call ID          Format
> Hold     Last Message    Expiry     Peer
> 192.168.0.102    (None)           2dab9ef669bc9a4  0x0 (nothing)
> No       Rx: OPTIONS                <guest>
> 1 active SIP dialog
>

I thought with 6201 I could build a connection to Asterisk. In the
extensions.conf and in the Asterisk-GUI the numbers from 6000 - 6300 (not
all, just a frew of them) are shown so I choosed one of them like I did
with the softphones.

asterisk -rx doesn't work.

What do you think is wrong with my extensions.conf?

Best regards.
Ellen


On Fri, Jul 13, 2012 at 4:06 PM, Ioan Indreias <indreias at gmail.com> wrote:

> On Thu, Jul 12, 2012 at 3:55 PM, Ellen Apolinar
> <ellen.apolinar.td at googlemail.com> wrote:
> > Hello mailinglist,
> >
> > I want to connect Asterisk with OpenBTS and make a call with a mobile
> phone.
> >
> > I use:
> > Ubuntu 11.10 + Kernel 3.0.22
> > GnuRadio 3.3.0
> > Asterisk 1.8.13
> > OpenBTS 2.8
> > Nokia Mobile Phone
> >
> > OpenBTS works and I can send sms from the OpenBTS server to the
> > mobile phone. What I also need is a call between Asterisk and OpenBTS.
> >
> > I have also two soft phones which works with Asterisk. And also OpenBSC
> > is working with Asterisk successfully (OpenBSC is another project).
> >
> > Perhaps you can help me because I think it is an issue with Asterisk.
> >
> >
> > sip.conf:
> >>
> >> ;SIP-Phones (Twinkle)
> >> [user1]
> >> callerid = 6000
> >> username = 6000
> >> secret = 6000
> >> canreinvite = no
> >> type = friend
> >> context = phones
> >> allow = all
> >> host = dynamic
> >> dtmfmode = info
> >>
> >> [user2]
> >> callerid = 6001
> >> username = 6001
> >> secret = 6001
> >> canreinvite = no
> >> type = friend
> >> context = phones
> >> allow = all
> >> host = dynamic
> >> dtmfmode = info
> >>
> >> ; Mobile phone
> >> [123456789101112]
> >> callerid = 6201
> >> username = 6201
> >> secret = 6201
> >> canreinvite = no
> >> type = friend
> >> context = sip_external
> >> ;context = open-bts
> >> disallow = all
> >> allow = gsm
> >> host = 192.168.0.102
> >> domain = 192.168.0.102
> >> dtmfmode = info
> >
> >
> > extensions.conf
> >>
> >> [internal]
> >> exten => s,1,Verbose(1|Echo test application)
> >> exten => s,n,Echo()
> >> exten => s,n,Hangup()
> >> exten => 6000,1,Verbose(1|Extension 6000)
> >> exten => 6000,n,Dial(SIP/user1,30)
> >> exten => 6000,n,Hangup()
> >> exten => 6001,1,Verbose(1|Extension 6001)
> >> exten => 6001,n,Dial(SIP/user2,30)
> >> exten => 6001,n,Hangup()
> >>
> >> [phones]
> >> include => internal
> >> include => default
> >>
> >> [open-bts]
> >> exten => 6002,1,Playback(demo-echotest)
> >> exten => 6002,n,Echo
> >> exten => 6002,n,Playback(demo-echodone)
> >> exten => 6002,n,HangUp
> >>
> >> [sip_external]
> >> exten => 6201,1,Macro(dialGSM,123456789101112)
> >>
> >> [macro-dialGSM]
> >> exten => s,1,Dial(SIP/${ARG1},20)
> >> exten => s,n,Goto(s-${DIALSTATUS},1)
> >> exten => s-CANCEL,1,Hangup
> >> exten => s-NOANSWER,1,Hangup
> >> exten => s-BUSY,1,Busy(30)
> >> exten => s-CONGESTION,1,Congestion (30)
> >> exten => s-CHANUNAVAIL,1,Read(extension_digits,pbx-invalid)
> >> exten => s-CHANUNAVAIL,n,GoTo(open-bts,${extension_digits},1)
> >
> > I have tried both contexts, [open-bts] and [sip_external] and both don't
> > work
> >
> >
> > If I want to call the mobile phone (6201) with a Twinkle soft phone
> (6000)
> > I get following message in the CLI-window from Asterisk:
> >>
> >>      == Using SIP RTP CoS mark 5
> >>         -- Executing [6201 at DLPN_DialPlan1:1] Macro("SIP/6000-00000013",
> >> "stdexten,6201,SIP/6201") in new stack
> >>         -- Executing [s at macro-stdexten:1] Set("SIP/6000-00000013",
> >> "__DYNAMIC_FEATURES=") in new stack
> >>     [Jul 12 12:14:29] WARNING[7092]: ast_expr2.fl:468 ast_yyerror:
> >> ast_yyerror():  syntax error: syntax error, unexpected '=', expecting
> $end;
> >> Input:
> >>      = 1
> >>      ^
> >>     [Jul 12 12:14:29] WARNING[7092]: ast_expr2.fl:472 ast_yyerror: If
> you
> >> have questions, please refer to
> >> https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
> >>         -- Executing [s at macro-stdexten:2] GotoIf("SIP/6000-00000013",
> >> "?5:3") in new stack
> >>         -- Goto (macro-stdexten,s,3)
> >>         -- Executing [s at macro-stdexten:3] Dial("SIP/6000-00000013",
> >> "SIP/6201,20,") in new stack
> >>     [Jul 12 12:14:29] WARNING[7092]: app_dial.c:2274 dial_exec_full:
> >> Unable to create channel of type 'SIP' (cause 20 - Unknown)
> >>       == Everyone is busy/congested at this time (1:0/0/1)
> >>         -- Executing [s at macro-stdexten:4] Goto("SIP/6000-00000013",
> >> "s-CHANUNAVAIL,1") in new stack
> >>         -- Goto (macro-stdexten,s-CHANUNAVAIL,1)
> >>         -- Executing [s-CHANUNAVAIL at macro-stdexten:1]
> >> Goto("SIP/6000-00000013", "s-NOANSWER,1") in new stack
> >>         -- Goto (macro-stdexten,s-NOANSWER,1)
> >>         -- Executing [s-NOANSWER at macro-stdexten:1]
> >> VoiceMail("SIP/6000-00000013", "6201,u") in new stack
> >>         -- <SIP/6000-00000013> Playing 'vm-theperson.gsm' (language
> 'en')
> >>         -- <SIP/6000-00000013> Playing 'digits/6.gsm' (language 'en')
> >>         -- <SIP/6000-00000013> Playing 'digits/2.gsm' (language 'en')
> >>         -- <SIP/6000-00000013> Playing 'digits/0.gsm' (language 'en')
> >>         -- <SIP/6000-00000013> Playing 'digits/1.gsm' (language 'en')
> >>         -- <SIP/6000-00000013> Playing 'vm-isunavail.gsm' (language
> 'en')
> >>         -- <SIP/6000-00000013> Playing 'vm-intro.gsm' (language 'en')
> >>       == Spawn extension (macro-stdexten, s-NOANSWER, 1) exited non-zero
> >> on 'SIP/6000-00000013' in macro 'stdexten'
> >>       == Spawn extension (DLPN_DialPlan1, 6201, 1) exited non-zero on
> >> 'SIP/6000-00000013'
> >
> >
> >
> > *CLI> sip show peers
> >>
> >>     Name/username              Host
>  Dyn
> >> Forcerport ACL Port     Status
> >>     123456789101112/6201       192.168.0.102
> >> N             5060     Unmonitored
> >>     6000/6000                  192.168.0.102
>  D
> >> N             5061     Unmonitored
> >>     6001/6001                  192.168.0.102
>  D
> >> N             5061     Unmonitored
> >>     (...)
> >>     user1/6000                 (Unspecified)
>  D
> >> N             0        Unmonitored
> >>     user2/6001                 (Unspecified)
>  D
> >> N             0        Unmonitored
> >
> >
> > *CLI> sip show peer 123456789101112
> >>
> >>       * Name       : 123456789101112
> >>       Secret       : <Set>
> >>       MD5Secret    : <Not set>
> >>       Remote Secret: <Not set>
> >>       Context      : sip_external
> >>       Subscr.Cont. : device-hints
> >>       Language     :
> >>       AMA flags    : Unknown
> >>       Transfer mode: open
> >>       CallingPres  : Presentation Allowed, Not Screened
> >>       Callgroup    :
> >>       Pickupgroup  :
> >>       MOH Suggest  :
> >>       Mailbox      :
> >>       VM Extension : asterisk
> >>       LastMsgsSent : 32767/65535
> >>       Call limit   : 0
> >>       Max forwards : 0
> >>       Dynamic      : No
> >>       Callerid     : "" <6201>
> >>       MaxCallBR    : 384 kbps
> >>       Expire       : -1
> >>       Insecure     : no
> >>       Force rport  : Yes
> >>       ACL          : No
> >>       DirectMedACL : No
> >>       T.38 support : No
> >>       T.38 EC mode : Unknown
> >>       T.38 MaxDtgrm: -1
> >>       DirectMedia  : No
> >>       PromiscRedir : No
> >>       User=Phone   : No
> >>       Video Support: No
> >>       Text Support : No
> >>       Ign SDP ver  : No
> >>       Trust RPID   : No
> >>       Send RPID    : No
> >>       Subscriptions: Yes
> >>       Overlap dial : No
> >>       DTMFmode     : info
> >>       Timer T1     : 500
> >>       Timer B      : 32000
> >>       ToHost       : 192.168.0.102
> >>       Addr->IP     : 192.168.0.102:5060
> >>       Defaddr->IP  : (null)
> >>       Prim.Transp. : UDP
> >>       Allowed.Trsp : UDP
> >>       Def. Username: 6201
> >>       SIP Options  : (none)
> >>       Codecs       : 0x80030c7fffff
> >>
> (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|speex16|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14|testlaw|g719)
> >>       Codec Order  : (none)
> >>       Auto-Framing :  No
> >>       Status       : Unmonitored
> >>       Useragent    :
> >>       Reg. Contact :
> >>       Qualify Freq : 60000 ms
> >>       Sess-Timers  : Accept
> >>       Sess-Refresh : uas
> >>       Sess-Expires : 1800 secs
> >>       Min-Sess     : 90 secs
> >>       RTP Engine   : asterisk
> >>       Parkinglot   :
> >>       Use Reason   : No
> >>       Encryption   : No
> >
> >
> > Asterisk log file (path: /var/log/asterisk/cdr-csv/Master.csv):
> >>
> >>     "","6000","6201","DLPN_DialPlan1","""6000""
> >> <6000>","SIP/6000-00000013","","VoiceMail","6201,u","2012-07-12
> >> 10:14:29","2012-07-12 10:14:29","2012-07-12
> >> 10:14:35",6,6,"ANSWERED","DOCUMENTATION","1342088069.31",""
> >
> >
> >
> >
> > If you need more informations write me and I will give you. It would be
> very
> > appreciated if some of you can help me or has an idea how I can fix this
> > erorr.
> >
> > Best regards and thanks for helping.
> > Ellen
> >
> > --
> > _____________________________________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >                http://www.asterisk.org/hello
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> Your extensions.conf looks to be incomplete. Any way, dialling
> SIP/6201 failed as 6201 is not a valid SIP account (you probably like
> to dial SIP/123456789101112
>
> Please try the following command:
> asterisk -rx "originate SIP/123456789101112 application MusicOnHold"
> and check asterisk logs. It should dial to the mobile phone and
> connect to the MOH application.
>
> HTH,
> Ioan
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120718/bc0b2ba7/attachment.htm>


More information about the asterisk-users mailing list