Problem with extensions

Discussion in 'General' started by grinder, Apr 7, 2010.

  1. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    Hello! I am new to the Asterisk/Elastix world (not new to Unix/Linux though). I 've setup two Elastix servers for a university project. I 've created some extensions in one of these servers in order to test the thing and continue with the project. I 've used the web interface for that, but one of the extensions I 've set it up manually creating my own conf files, which I included in the main ones(extensions.conf, sip.conf). The problem is that when I am calling this extension from a client, it keeps failing... Here is my configurations:

    extensions_mine.conf

    Code:
    [myincoming]
    
    exten => 1100,1,Answer()
    exten => 1100,n,Playback(hello-world)
    exten => 1100,n,Hangup()

    sip.conf

    Code:
    [general]
    
    allow=all
    register => 1100:1100@192.168.1.2/1100

    sip_mine.conf

    Code:
    [1100]
    type=friend
    context=myincoming
    username=1100
    secret=1100
    host=192.168.1.2
    Any ideas? Thank you very much in advance...
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Read "Elastix Without Tears", it will explain why your included extensions are not working. There is a strict methodology in FreePBX as to where to put your customizations.

    dicko
     
  3. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    Yes, I have the "Elastix Without Tears" pdf. Will check this bit that you are pointing. In the meantime here is the log of what's going on when I am trying to call the extension that I manually created:

    Code:
    [Apr  7 19:45:49] VERBOSE[2886] chan_sip.c:  Reloading SIP
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_general_additional.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_mine.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_general_custom.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_nat.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_registrations_custom.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_registrations.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_custom.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_additional.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_custom_post.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/users.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_notify.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_notify_custom.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Parsing '/etc/asterisk/sip_notify_additional.conf': [Apr  7 19:45:49] VERBOSE[2886] config.c:   == Found
    [Apr  7 19:45:49] VERBOSE[2886] chan_sip.c:     -- Registered SIP '1100' at 192.168.1.2 port 5060
    [Apr  7 19:47:08] VERBOSE[2886] netsock.c:   == Using SIP RTP TOS bits 184
    [Apr  7 19:47:08] VERBOSE[2886] netsock.c:   == Using SIP RTP CoS mark 5
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [1100@from-internal:1] Macro("SIP/2000-0000000b", "user-callerid,SKIPTTL,") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/2000-0000000b", "AMPUSER=2000") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:2] GotoIf("SIP/2000-0000000b", "0?report") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:3] ExecIf("SIP/2000-0000000b", "1?Set(REALCALLERIDNUM=2000)") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:4] Set("SIP/2000-0000000b", "AMPUSER=2000") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/2000-0000000b", "AMPUSERCIDNAME=Test2") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/2000-0000000b", "0?report") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:7] Set("SIP/2000-0000000b", "AMPUSERCID=2000") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:8] Set("SIP/2000-0000000b", "CALLERID(all)="Test2" <2000>") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:9] ExecIf("SIP/2000-0000000b", "0?Set(CHANNEL(language)=)") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:10] GotoIf("SIP/2000-0000000b", "1?continue") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Goto (macro-user-callerid,s,19)
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [s@macro-user-callerid:19] NoOp("SIP/2000-0000000b", "Using CallerID "Test2" <2000>") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [1100@from-internal:2] NoCDR("SIP/2000-0000000b", "") in new stack
    [Apr  7 19:47:08] VERBOSE[3090] pbx.c:     -- Executing [1100@from-internal:3] Wait("SIP/2000-0000000b", "1") in new stack
    [Apr  7 19:47:09] VERBOSE[3090] pbx.c:     -- Executing [1100@from-internal:4] Playback("SIP/2000-0000000b", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack
    [Apr  7 19:47:09] VERBOSE[3090] file.c:     -- <SIP/2000-0000000b> Playing 'silence/1.gsm' (language 'en')
    [Apr  7 19:47:10] VERBOSE[3090] file.c:     -- <SIP/2000-0000000b> Playing 'cannot-complete-as-dialed.gsm' (language 'en')
    [Apr  7 19:47:12] VERBOSE[3090] file.c:     -- <SIP/2000-0000000b> Playing 'check-number-dial-again.gsm' (language 'en')
    [Apr  7 19:47:15] VERBOSE[3090] pbx.c:     -- Executing [1100@from-internal:5] Wait("SIP/2000-0000000b", "1") in new stack
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Executing [1100@from-internal:6] Congestion("SIP/2000-0000000b", "20") in new stack
    [Apr  7 19:47:16] WARNING[3090] channel.c: Prodding channel 'SIP/2000-0000000b' failed
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:   == Spawn extension (from-internal, 1100, 6) exited non-zero on 'SIP/2000-0000000b'
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Executing [h@from-internal:1] Macro("SIP/2000-0000000b", "hangupcall") in new stack
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Executing [s@macro-hangupcall:1] GotoIf("SIP/2000-0000000b", "1?skiprg") in new stack
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Goto (macro-hangupcall,s,4)
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Executing [s@macro-hangupcall:4] GotoIf("SIP/2000-0000000b", "1?skipblkvm") in new stack
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Goto (macro-hangupcall,s,7)
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Executing [s@macro-hangupcall:7] GotoIf("SIP/2000-0000000b", "1?theend") in new stack
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Goto (macro-hangupcall,s,9)
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:     -- Executing [s@macro-hangupcall:9] Hangup("SIP/2000-0000000b", "") in new stack
    [Apr  7 19:47:16] VERBOSE[3090] app_macro.c:   == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/2000-0000000b' in macro 'hangupcall'
    [Apr  7 19:47:16] VERBOSE[3090] pbx.c:   == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/2000-0000000b'
     
  4. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    So, I 've checked the documentation for the conf files. OK, so i have to put my customizations regarding the dialplan to extensions_custom.conf. But in which file do I have to put my manually created SIP/IAX extensions?
     
  5. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Your manually created extensions count as customizations, you have a little (lot of) reading to do as to what needs including in what contexts and why before it will work, but that is the cost of "custom work"

    http://voip-info.org

    is a good place to start.

    dicko
     
  6. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    I am talking about this thing:

    sip_mine.conf

    Code:
    [1100]
    type=friend
    context=myincoming
    username=1100
    secret=1100
    host=192.168.1.2
    I see neither "Elastix without tears" nor www.freepbx.org/configuration_files mentioning in which "custom conf" file I should put these things that I have currently in sip_mine.conf As for http://voip-info.org I know it already. Thanx for mentioning it though :)
     
  7. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    You are the college student, it's your project, the library "stacks" of my youth have largely been replaced by google.

    Good luck with your project, but this is not a place you will get free tutorials above and beyond Elastix (probably not even that as "Elastix Without Tears" is largely complete in that coverage), just do what your professor says "If you don't know how to do it yet, go find out, then you will" :):)


    How the various files are "include" in Asterisk is very well documented, the specifics of this implimentation are better covered at FreePBX, you gotta read more than one book to pass this course.
    dicko
     
  8. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    Excuse me, but do you know me and my background to be aggressive like that? What do you think, that I am a wee 20 years old student without any prior professional experience that expects somebody else to solve his problems and do his MSc project? I asked a simple question. If you or anyone else is able to answer then do it and stop preaching me! If not then, absolutely NO PROBLEM :) It is an online forum after all and I haven't signed a support contract. :p

    Anyway, I did a "workaround" let's say and worked fine. Thanx for your time... :)
     
  9. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    grinder:

    You asked a question and I answered, perhaps elliptically, but with a little more reading you have discovered that all customizations go in *_custom.conf in FreePBX, as they will be automatically included as per the "basic inclusion rules" of Asterisk configurations, which I assume you eventually found at http://voip-info.org or some such well known source.

    That you would want to present an asterisk based solution either as a student to a prof. or a prof. for a student worried me, (and true I assumed the former, if it walks like a duck etc. ) as without some basic knowledge, someone will make a boo-boo.

    If I offended you I apologize, my intention was to get you to do some basic research, and possibly I did. I am glad you figured out your "work-around", if you find me aggressive I think you will find that, around here anyway, I am more than supportive of those that have actually done their homework first, although some just call me grumpy.
    And Yes it is MY time too, but you are welcom to a little of it.

    regards

    dicko
     
  10. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    Regarding the bolds: Don't worry and I am not the kind of person that does not do his reading and research before asking a question. Yes, I eventually saw that ALL customisations go in *_custom.conf, but some times it happens to read something again and again while the solution is already in front of your eyes, but maybe because you are tired or whatever reason, you miss it! It happens all the time... I would like to apologise as well for exaggerating, but being for looooong hours every day in a lab with many racks full of routers, switches and a number of other machines with their fans working in full blast, unfortunately doesn't help... Anyway, it became too personal. So long for now and thanx once again :)
     
  11. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    I appreciate and accept your apology, thank you.

    Personally, I worry about nothing, that is your job, (I did my worrying a long time ago) , there is no replacement for learning and ultimately adsorbing that acquired knowledge, and bluntly no excuses are allowed, neither in academe or the real world, Please understand that the bigger the pressure you are under, the stronger you will feel when you prevail, again I suggest you RTFM at least twice, if you don't get it then start over, that's surely a no-brainer.

    Anyway, good luck with your project, I hope we can can "fill in the blanks" here when you are really stuck, and are not just being "blank brained".

    regards

    dicko

    p.s.

    Judas Priest! WTF! no wonder you are stuck! I suspect head-bangers have largely managed to reduce their brains to saw-dust by now :) :)
     
  12. grinder

    Joined:
    Apr 7, 2010
    Messages:
    7
    Likes Received:
    0
    I don't disagree with all that. I told you I am not new in the neighborhood. I was in the R&D industry (INAP/CAMEL based systems, they are really a pain in the :X :p) you know, but I decided to quit for the sake of doing an MSc course ;)


    Haha! It doesn't work like that I am afraid! :laugh: :laugh:
     

Share This Page